tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laird Nelson <>
Subject RARs, LocalClients and JNDI naming
Date Wed, 17 Feb 2010 19:42:02 GMT
I am sure that I am missing something obvious, but perhaps not, as I cannot
find any information on this subject.

I am writing a resource adapter.  For its unit tests, I am attempting to
deploy it, unpackaged, into an instance of OpenEJB 3.1.3-SNAPSHOT.  A patch
that was committed in January somewhere seems to let OpenEJB 3.1.3-SNAPSHOT
auto-discover @LocalClients, such as my unit test, in projects that have an
META-INF/ra.xml file present.  This is great--I can tell from some of the
logging messages that OpenEJB is at least attempting to instantiate my
ResourceAdapter implementation.

I've used @LocalClient before, too, and so I have the InitialContext all set
up, and I can tell that indeed, OpenEJB is firing up.  So far so good.

Now the obvious/stupid part.  I've built this resource adapter
implementation, I have the ra.xml...but where...where do I indicate what
JNDI name I would like it to have?  Obviously this information shouldn't be
part of the final resource adapter hairball, since by definition you're
supposed to be able to pick a .rar file up, put it in an app server, and
have it install itself.

In JBoss, I believe I'd accomplish this with some sort of .xml file a la
*-ds.xml; either its name or some element within that file would designate
the JNDI name.  I'm not terribly familiar with JBoss.

In Glassfish, I believe I'd have to do this with the Glassfish command line
tools; something like asadmin deploy myrar.rar.

What do I do in OpenEJB in an in-memory unit testing scenario?

My ultimate goal is to have my @LocalClient simply do:

  @Resource(name="...") // whatever the name is
  private MyConnectionFactoryImplementation myConnector;

and have it "just work".

Any pointers in any direction are gratefully accepted.


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