0

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.

adimoise91
  • 558
  • 1
  • 7
  • 26
  • Hi, Have you considered using the migration tool? It's packed with WAS 8.5 and it can migrate all configuration and the applications from WAS 7 to WAS 8.5.x directly. Let me know if you would like to try that. If you do, I can post a detailed answer with step by step guide on how to use it. Regards! – groo Oct 06 '14 at 11:13
  • This exercise has a semi didactical purpose and i need to create a script/scripts to do that so i am not allowed to use the migration tool. :( Thank you! – adimoise91 Oct 06 '14 at 11:16
  • So, let me understand better. You need a script that create the datasource properties in WAS? – groo Oct 06 '14 at 11:34
  • I need a script that creates a config file or some text file that contains properties of DataSource, per application. Each application should have a separate config file. After this i will use that config file to create Datasource in WAS 8.5 for the new installed application. Can you understand my needs? If you need more explanations i can write an example. – adimoise91 Oct 06 '14 at 12:57

1 Answers1

0

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:

Gas
  • 17,601
  • 4
  • 46
  • 93