Tuesday, September 13, 2011

Oracle Service Bus (OSB) and JCA Adapters

We were recently working on a project that had the need to create a custom JCA adapter to connect from the OSB to a legacy C application.  We figured this would be something fairly easy to do since the WebLogic Server, BPEL and OSB all support JCA adapter out of the box.  It turns out that the current OSB (11g) doesn't fully support the JCA adapter specification.  It only supports the following JCA compliant adapters provided by Oracle:
  • Oracle Adapter for Oracle Applications
  • Oracle JCA Adapter for AQ
  • Oracle JCA Adapter for Database
  • Oracle JCA Adapter for Files
  • Oracle JCA Adapter for FTP
  • Oracle BAM Adapter
  • PeopleSoft Adapter
  • SAP R/3 Adapter
  • Siebel
  • J.D. Edwards
The OSB already has transports that support File/FTP so these really are not needed.  We actually tried using these on the bus and didn't have much success so quickly reverted back to the built in OSB functionality.

Anyway, we were looking for a way to utilize the custom JCA adapter on the bus and came across the OSB Transport API. It appeared that this would do the trick but seemed extremely complicated so we kept digging. We eventually settled on deploying the JCA adapter to the WebLogic Server and writing a small wrapper class that made it easy to access the adapter with a JNDI lookup. 

We were then able to simply use a Java Callout from the OSB to access the adapter.  This is obviously not the most elegant solution but has proved to work extremely well.  We were a little concerned about performance so we did a little testing.  We were able to push a single WLS managed server to over 3,000 adapter calls/second which is more then sufficient for our application. 

A few details:

  • The JCA wrapper class takes and returns an XML document as a string
  • It then uses JAXB to marshall/unmarshall it and calls the adapter
  • The marshaller has been optimized to not destory itself every time to prevent marshalling bottlenecks
  • The JCA wrapper also caches the JCA connection information

4 comments:

Alessandro Sammarco said...

very interesting! Is it possible to have more details?
Thanks

Anonymous said...

I knοw thіs if off tορic but I'm looking into starting my own blog and was curious what all is required to get set up? I'm аѕsuming havіng a blog like
youгs would cost a pгetty penny?
I'm not very web savvy so I'm not 100% positive. Any tips or advice would be greatly appreciated. Cheers

My webpage: premature ejaculation pills

Anonymous said...

Sіnce the admіn оf this ωеbsіte is woгking, nο dοubt very ѕoon it will bе famοus, ԁuе tо іts fеаturе сοntеnts.


mу webpage: premature ejaculation pills

Anonymous said...

Нmm is аnyone else hаving problеms
with thе images οn thiѕ blоg loading?

I'm trying to figure out if its a problem on my end or if it's the
blοg. Any feеd-back woulԁ bе gгeatly apprесiatеd.


Μy site :: legal herbal highs spice