tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Russo <>
Subject Re: Outbound resource injection in an ejb
Date Thu, 14 Jan 2010 15:27:46 GMT
Let me see if I have this straight.  What goes in the openejb.base/lib
folder is the rar file, or the jar that normally is wrapped by the
adapter rar?  And I would need to add a service-jar.xml file into the
META-INF folder of which package?  In other words, is the resulting
structure like:




However it works, I like this idea because it allows configuration at
the container level.  It's something worth looking into if time
constraints don't limit my ability to research this more. 

Regarding your first suggestion, however, if I do define configuration
properties in the ra.xml file for the outbound resource, it sounds like
I would only be able to define one outbound resource (destination) per
adapter.  So, my question here is: can I define multiple jms
destinations in an ear package using just one adapter?  If not, would I
be able to install multiple adapters in an ear to define more than one
jms destination?  I hate to say the more I learn the more questions I
have. :)

Jason Russo

Application Developer

Genscape– See the Energy

445 E. Market St, Suite 200

Louisville, KY 40202

Tel: 502-583-2091

On Wed, 2010-01-13 at 19:35 -0500, David Blevins wrote:

> On Jan 13, 2010, at 11:12 PM, Jason Russo wrote:
> > Hi all,
> >
> > Previously, I created a message driven bean that can connect to a jms
> > queue through an external provider (Tibco) using a jca resource  
> > adapter.
> > What I am trying to figure out is how I can write an ejb that can  
> > post a
> > message to this external queue.  Does openejb support the injection of
> > such a resource and how can it be configured?  Thanks.
> Anything declared as an outbound resource in the ra.xml should just be  
> injectable via plain old @Resource.  The configuration in the ra.xml  
> is what will be used, unless... and I wish there was an easier way to  
> set this up, but...
> You *can* just unzip all your resource adapter jars into the  
> openejb.base/lib/ directory and install it as an OpenEJB service by  
> giving it a service-jar.xml file.  Essentially, this is what we are  
> doing under the covers anyway when you put your rar file in the ear.   
> I wish we had some syntactic sugar for this but we don't.  I looked  
> into it a bit ago and just didn't have time to finish.
> The end result of rewrapping your rar with a service-jar.xml is that  
> you can declare and configure the MDB container, the resource adapter,  
> and outbound resources in the openejb.xml via <Container> and  
> <Resource> tags.
> Basically, you pack META-INF/service-jar.xml file into jar and put it  
> into the openejb.base/lib/ directory.  It's not well documented as it  
> isn't quite intended for typical use, but it did come up recently and  
> there are some details available here:
> Here is the service-jar.xml that contains the declarations for the  
> ActiveMQ resource adapter and outbound resources:
> -David

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message