users@glassfish.java.net

where to put an RA's connection factory interface in an EAR file

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Tue, 2 Mar 2010 13:20:25 +1100

Hi,

While trying to run an app that worked on GFv2.1 and not in GFv3 I got
confused about where to put what classes.
Could you shed some light on it?

I have a resource adapter packaged in a RAR file. I use it from an EJB,
which is packaged in an ejb-jar. The EJB is accessed from a Java
application client, packaged in a jar file.

On GFv2.1, I deploy the RAR first, then deploy an EAR file which
contains the ejb-jar and client jars. Even though the ejb-jar and the
EAR file do not contain the RA's interfaces, this works fine.

On GFv3, I can also successfully deploy the applications, but when I
access the EJB a ClassNotFoundException occurs.

Next, on GFv3, I tried adding the RAR to the EAR, but then I got a
ClassCastException (of the connection factory implementation class) in
the statement where I do the JNDI lookup of the connection factory in
the EJB.

How should I package and deploy this?

Thanks,
Dies