users@glassfish.java.net

Re: Way to set resource adapter via annotations?

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Sat, 30 Jan 2010 20:31:49 +0530

1) If ra-mid is not specified and "messaging-type" is specified in
ejb-jar.xml (or its equivalent annotation) container will choose the
appropriate RAR that supports the specified message-listener type and an
INFO message will be thrown. (If multiple RARs deployed in the server
supports the requested message-listener exception will be logged as it
is not possible to arbitrarily choose an RAR)

2) To use a global default for ra-mid, try using the jvm-option (system
wide property) in domain.xml :
"<jvm-options>-Dcom.sun.enterprise.connectors.inbound.ramid=RAR_NAME</jvm-options>"
Restart GlassFish for changes to take effect.
If no ra-mid is specified in the descriptor, then the jvm-option will be
considered.

Thanks,
-Jagadish


On Fri, 2010-01-29 at 14:36 -0800, Jacques wrote:
> I'm using a non-default resource adapter for MDBs. Is there a way to
> select a resource adapter without using sun-ejb-jar.xml? If not, is
> there a way to select a resource adapter for all mdbs in
> sun-ejb-jar.xml without having to list out each individual bean?
>
> Thanks,
> Jacques