Special thanks for my colleague Michel Schildmeijer for inspiring me to make this flexible script and off course for the necessary WLST code.
Important to know.
- Run this script on the AdminServer, else it won't find the Resource Adapter Plans
- First you need to create a Plan for the 3 Resource Adapters (Db,Aq,Jms) and add a dummy entry, think how you name it and where you put it.
- When a plan is changed and you have a soa cluster or the soa weblogic instance is running on a different server then you need to copy the plan to all servers or put it on a shared storage.
If you don't like this then you can always create new Resource Adapters by following this blogpost.
Let's explain how it works
first you need to change some variables in this build.properties
default this scripts runs against the weblogic dev settings. You can change this to your own and configure the dev entries ( dev entries at the bottom of the build.properties )
Where are the adapter rars located in your FMW domain, this can be in your SOA or OSB Home of the FMW domain.
Then add your own EIS entries, these ones in this var will be added to weblogic.
Think if you need to set the XA or Not XA datasource property or in Jms the connectionFactoryLocation.
# AQ entry
# DB entry
# JMS entries
After you can run the ANT script
ant -f build.xml createResourceAdapterEntries
Here you can download the code on github
Here is the whole build.properties file
The wlst part with the wlRedeployResourceAdapter and wlCreateResourceAdapter macrodefs
And at last the build.xml