Search code examples
migrationwebspherejythonearwsadmin

Export EARs from Websphere Application Server with resources


I need a little help from you.

I have to migrate several applications from WAS 7 to WAS 8.5 with a script in Jython using wsadmin. The thing is that on WAS 7 there are a lot of Datasources and i only need to import the Datasources that are used by the applications that i have to migrate.

Long story short: i have to get the datasource properties for a specific application.

Thanks for your help!

UPDATE: After this I have to install the applications using the exported properties of datasources.


Solution

  • If your application developers were smart enough to use resource references, you can find JNDI names of the Datasources used by the application in the web admin console Applications > applicationName > Resource References. If not, you will have to somehow learn what the datasources are (application documentation, developers, sources). There is no other way than references to know datasources used by given app.

    Then I'd suggest you to use Property files wsadmin commands to extract relevant information from one environment and apply to the other. (Or just give you datasources configuration for use in jython scripts).

    If don't want to use Property files commands you can use command assistance in the console to help you create jython files, or use some already provide Jython script library

    For details see: