tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Bourque <christian.bour...@gmail.com>
Subject Re: accessing openejb resources from a servlet
Date Wed, 07 Apr 2010 20:28:38 GMT
Thanks for the link Stephen!

Apparently the guy has the same problem:

"And that is just for starters... there seems to be a whole host of other
JNDI strangeness between jetty's side and openejb's side
The side effect of all this is that if you want resource refs to work
correctly, you need to fish them out of openejb's JNDI context and push them
into jetty's JNDI context"

Christian

On Wed, Apr 7, 2010 at 3:27 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Did you have a look at:
>
> http://javaadventure.blogspot.com/2010/03/openejb-jetty-and-maven-transaction.html
>
> On 7 April 2010 06:45, Christian Bourque <christian.bourque@gmail.com
> >wrote:
>
> > Hi,
> >
> > Is it possible to access a resource provided by OpenEJB (a JMS queue in
> my
> > case) from a servlet using the standard java:comp/env namespace?
> >
> > I'm currently testing this with OpenEJB and Jetty (both in embedded mode)
> > and it works fine if I use the global jndi name:
> >
> >
> >
> context.lookup("java:openejb/Resource/com.cep.mavenproject2.MessageBean/queue");
> >
> > but not when I use the portable format
> (javax.naming.NameNotFoundException:
> > Name "comp/env/jms/processQueue" not found):
> >
> > context.lookup("java:comp/env/jms/processQueue");
> >
> > This is what I have in my web.xml:
> >
> > <resource-env-ref>
> >    <resource-env-ref-name>jms/processQueue</resource-env-ref-name>
> >    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
> >
> >
> >
> <mapped-name>java:openejb/Resource/com.cep.mavenproject2.MessageBean/queue</mapped-name>
> > </resource-env-ref>
> >
> > Any idea?
> >
> > Thanks
> >
> > Christian
> >
>

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