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.

Solutions

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.

Conclusion

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 ?

Advertisements

About Eric Elzinga
Eric Elzinga I'm an integration consultant located in The Netherlands. Mainly doing projects based on Oracle integration stacks (Oracle SOA Suite/Oracle Service Bus (OSB)), Java development, and opensource integration products.

10 Responses to Oracle Service Bus, use of shared resources

  1. 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

    • Gerben says:

      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.

      Gerben

  2. Eric Elzinga says:

    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.

  3. George says:

    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?

    Thanks,
    George.

  4. Eric Elzinga says:

    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)

  5. Danny says:

    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

    Danny

    • Eric Elzinga says:

      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 ?

      • Ravi says:

        Hi Eric

        couple of questions . we are not using OER. regarding sharing of artifacts solution-1 might work only when u use sbconsole. we are using OEPE as our environment for development and there are no options of using shared resources.

        Thanks
        R

  6. Pingback: Oracle Service Bus, use of shared resources | Oracle .. Java .. OpenSource .. SOA

  7. Eric Elzinga says:

    For development in OEPE you always need to include the resources in your OSB Configuration project.
    You could make use of symbolic links in subversion to point to the real location of your shared resources.

    So you could add a new Shared Resources project > folder xsd. En make the xsd link to the xsd folder on some other location in your subversion. But the make it available on runtime in OSB it still needs to be deployed, but on design time you can use the resources from an other location

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: