users@glassfish.java.net

JNDI lookup resource access error to genericra admin object

From: <forums_at_java.net>
Date: Fri, 23 Dec 2011 05:21:04 -0600 (CST)

 Hi

I've followed the instructions to access Websphere MQ 7 resources from
glassfish 3.1 using genericjmsra.

In the Websphere MQ side:

- Create Queue manager and queues in Websphere MQ

- Create JMS admin objects for QM and queues

Also in the glassfish side:

- Deploy genericra resource adapter

- Create resource adapter config with the right properties

- Create connection pool for this resource adapter using as
ConnectionFactoryJndiName property value the QueueManager name. The ping
action is working OK.

- Create conector resource  (JNDI name jms/PDDQueueFactory) for this
pool.

- Create admin object (JNDI name jms/pddConsumer) for this resource adapter
using as DestinationJndiName property value the Queue name

When I access the resources using a Stateless session bean 3.x I can lookup
the QueueFactory  jms/PDDQueueFactory with no problems.

But, when I lookup the queue I can see the error:
*Lookup failed for 'jms/pddConsumer' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming}|#]*

I've tried to acces the resource in several manners:

- Using @Resource annotation with name or mappedName attributes

- Using ctx.lookup("jms/pddConsumer")

- Using ctx.lookup("java:comp/env/jms/pddConsumer")

I'm not currently using any additional descriptor files (as
glassfish-resources.xml, glassfish-ejb-jar.xml), but I've also made some
tries using these files with no success.   It sounds strange to me to be
able to access the QueueManager and not the Queue itself.   Some help will
be appreciated.   Thanks  
 


--
[Message sent by forum member 'fgavilan']
View Post: http://forums.java.net/node/876863