Oracle Service Bus, use of shared resources

At the moment i’m busy with a migration of an alsb 2.6 enviroment to an alsb 3.0 enviroment.
In the alsb processes extra functionality is invoked by making use of the java call outs.
Nothing wrong with this if you ask me, the only thing which i’m wondering is, wont these java call outs mess up the transactional context of alsb processes itself.

At the moment the libraries which are being used are deployed with every servicebus process itself.
So we have/had some sort of default structure like

  • business services
  • proxy services
  • lib
  • wsdl

Works fine, but not really the ideal situation if you have reusable resources over servicebus projects.
You’re able to reuse the components from other projects and link to them by using relative links (for example when you want to reuse xsd’s from other projects) or link to the library of an other servicebus project.

These situations force you to create dependencies between the projects, something we don’t want either.


First solution

The solution we implement at the moment to keep everying on-going is the next.
We created a ‘Shared Resources’ servicebus project with folders for libraries/wsdl/xsd/business services/etc. Every resource which will be reused by other projects will be created in here. Every servicebus project itself which is going to use a resource will link to this project and the resource it needs.

This works great if you’re working with components which exists only in the servicebus itself.
When integration is happening and for example applications from vendors are integrating with our servicebus projects they could use certain resources from the ‘shared resources’ project. But in this case my servicebus project will be some sort of repository of resources available for not only the servicebus projects. So i’m creating an extra dependency between the servicebus and the other applications.

Better solution (imho)

Remove all the re-usable resource from the servicebus itself. We need to bring those to some higher level of sharing of which both the servicebus and the other applications will make use. In this case a product like ‘Oracle Enterprise Repository’ could be used.
In this repository we can store all the resources and artifacts which will be used enterprise wide.

To make use of a java call out, we need to create the resource in the servicebus project itself. So we can’t store these libraries on the repository.
Maybe a short coming which is ok for this situation.

If we want to store these java libraries on a repository we have the intention to share these enterprise wide. But in these situations we must investigate if a plain java class is the best way to make the functionality available or should we ‘service enable’ the java classes so they can be used more easily for integration in other projects.
The userguide / Usage Guidelines gives as a few situations/best practices when to use ejb functionality instead of plain pojos.

Do we have functionality delivered by the java classes which is only used in the servicebus projects to support the servicebus process itself then we could just registrate the libraries in the shared resources servicebus project (jar resource) and reuse it from here.


For reuse of resources and artifacts in servicebus projects we could use the next setup.

Shared Resources servicebus project for storing the business services/proxy services/servicebus-only used java libraries/etc.
Enterprise Repository for storing resources like xsd/wsdl/etc
Service enable java classes which are used enterprise wide,so we don’t need to store functionality on several places

Any of you doing osb/alsb projects and have a better ‘solution’ for these situations ?

Original blog

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

8 Responses to “Oracle Service Bus, use of shared resources”


Cool, so you can’t use the ent repos for the java libs or can you use it for the dependencies libs.

How do you handle the dependencies between the jars. your lib can need libraries, these libs can also needs lib. I noticed when you replace these libs , the dependencies are lost.

thanks Edwin

Eric Elzinga | May 4th, 2009 at 7:48 pm

Need to dive more into the enterprise repository..haven’t used it yet. But what i’ve read about i don’t see any functionality in it. Resources like wsdl xsd etc dont need a jvm, the java libs do need it to run in. If we just copy resources and libs out of the repository local to all projects we still don’t have the one-point-of-thrut. I assume you should use the repository just like the uddi for runtime lookup ?

Dependency or jars i still need to test…at the moment we just have basic helper methods in the jars without dependencies on other custom jars..will come back on this one.


Whenever your lib needs common libs, like apache commons, custom transport libraries or other common used libs, they should be in the libs directory of your installation, you can also put them on the classpath of the server. But… when you change them, you need to restart the server, that’s not always appreciated.



Nice solution if you have the Enterprise Repository!!

In your first solution, how another OSB project will “link” to the resource of the OSBSharedLib project?
Do you mean by Unix link or somehow differently?



Hi George,

In the shared lib folder we will only registrate libraries which are OSB specific (jars). Then other osb projects can link/re-use those resources just like every other osb resource (bs/ps/wsdl/xsd/etc)


How do you handle an update of a callout jar used as a shared resource ?
How do you deploy a new version of a java callout ?

the only way I know now is deleting the resource and recreating it ?!
Not really a production ready mechanism me thinks



If you click on the jar resource in the sbconsole, at the bottom you can update the resource.
In the next screen you can select the new updated archive.

is that what you mean ?

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>