WLST based OSB domain creation

Oh WLST how I love thee, let me count the ways.. Even thought the scripting is something you can and should do, there are times when doing it manually, i.e. using the graphical tools, is still preferred. When is that time? When you have spent countless hours trying to create a new clustered domain with exactly the correct and wonderful configuration that you require. And sometimes even when you could do with just the bare bones, vanilla as they come, single cluster domain.

So the WLST script for creating a clustered domain is simple, right? You just do this:

  1. readTemplate(WL_HOME + ‘/common/templates/wls.jar’)
  2. <create clusters and managed servers etc>
  3. writeDomain(DOMAIN_HOME)

Easy as 1-2-3. As long as you are not making an Oracle Service Bus domain, because that process has some serious issues. There are some attempts to fix this, but here is a way of doing it with the standard OSB templates.

First the bird’s eye view:

  1. readTemplate(WL_HOME + ‘/common/templates/wls.jar’)
  2. addTemplate(WL_HOME + ‘/common/templates/applications/wls_webservice.jar’)
  3. addTemplate(OSB_HOME + ‘/common/templates/applications/wlsb.jar’)
  4. delete(‘osb_server1’, ‘Server’)
  5. <create clusters and managed servers etc>
  6. <!! retarget everything !!>
  7. writeDomain(DOMAIN_HOME)

So the magic lies in the retargeting of everything. How to do that? The answer is in the wi^H^HOracle Forums, where someone named PetervanNesatTheFutureGroup gives a nice partial answer to that question. What it boils down to, is using the WLST Offline commands for listing the resource names, looping through that list of names and then using those names to access and changing the resources. And the reason to do all of this, is because the OSB templates do not target the resources correctly to the defined environment, even though they should.

List of resources you will need to retarget:

  • Some of the Application Deployments
  • All of the Libraries
  • All of the Startup classes
  • All of the Shutdown classes

So what is the application list that you will need to retarget? Well, for the first Management Server only (these are the singleton services), you target: ALSB Cluster Singleton Marker Application, ALSB Domain Singleton Marker Application and Message Reporting Purger.

For the Admin server only, you target: ALSB UDDI Manager and FMW Welcome Page Application#11.1.0.0.0.

And for the cluster, you target: ALSB Coherence Cache Provider, ALSB Resource, ALSB Subscription Listener, ALSB WSIL, JMS Reporting Provider and WS Transport Async Applcation.

Everything else is targeted to both Admin server and the cluster. And there you go, you have a correctly formed, clustered Oracle Service Bus domain. Oh and by the way, it would seem that the old bug which left out the XACMLAuthorizerInit.ldift and DefaultAuthorizerInit.ldift files from an OSB domain created from the templates has been fixed. Which is just super!

Leave a Reply

Your email address will not be published. Required fields are marked *