tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Outbound resource injection in an ejb
Date Fri, 29 Jan 2010 16:26:20 GMT

On Jan 29, 2010, at 3:21 PM, Jason Russo wrote:

> That sounds pretty neat.  I did not modify any of the resource adapter
> code.  What I did was add this file
> as /META-INF/com.sun.genericra/service-jar.xml inside the adapter jar,
> and drop that library into the container lib folder along with the jms
> client libraries needed for the jms provider(s).
>
> So, who shall I send my service-jar.xml to, and how?  Do you want me  
> to
> submit it to this mailing list, or the dev list, check it in somehow,
> other details?  This would be the first contribution I've provided to
> the openejb community, so I'm not sure what the procedures would be.
>
> One thing I'd like to mention is, when I was first using this with
> Tibco, I had defined some properties in the service-jar.xml that  
> needed
> to be null.  It appears, however, that if a property is defined in
> service-jar.xml and no value is assigned to it, openejb will auto  
> assign
> an empty string value to them.  This had caused some problems with
> Tibco, specifically with the client id property.  When Tibco saw the
> client id as an empty string, I had issues with 'duplicate' client ids
> (all being empty strings).  My solution was to remove the property  
> from
> the service provider in the service-jar.xml file.  I bring this up to
> make you aware of this possible pitfall, as other providers might also
> have issues with other properties.  Not sure if I should just remove  
> all
> properties from the service providers, and maybe allow them to be
> overridden in openejb.xml or not, but right now I just did this for  
> the
> client id property.
>
> Anyways, let me know how to proceed with this contribution, and I will
> act accordingly.

Created a JIRA here where you can attach the service-jar.xml:

  https://issues.apache.org/jira/browse/OPENEJB-1229

Good note on the null thing.  Trick there is java.lang.Properties  
doesn't allow null values.  It's actually that same class that fills  
in the empty string, IIRC.

One option would be to yank out all the empty string key/value pairs.   
Not too sure how we'd want to design it, but it's theoretically  
possible if we felt we needed it.


-David


Mime
View raw message