So I believe I have the exact same problem. I tried creating my generic resource adapter using this:
create-resource-adapter-config --property SupportsXA=true:ProviderIntegerationMode=jndi:RMPolicy=OnePerPhysicalConnection:JndiProperties=java.naming.factory.url.pkgs\\=com.ibm.mq.jms.naming,java.naming.factory.initial\\=com.sun.jndi.fscontext.RefFSContextFactory,Context.PROVIDER_URL\\=file\\:\\/\\/\\/opt\\/mqm\\/jndi:LogLevel=finest genericra
and that looks like this when I list it via verbose mode:
asadmin> list-resource-adapter-configs --verbose
genericra
SupportsXA=true
RMPolicy=OnePerPhysicalConnection
LogLevel=finest
ProviderIntegerationMode=jndi
JndiProperties=java.naming.factory.url.pkgs=com.ibm.mq.jms.naming,java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,Context.PROVIDER_URL=file:///opt/mqm/jndi
However I still see this exception:
[#|2009-09-04T20:58:08.777-0400|FINE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=org.springframework.jms.listener.DefaultMessageListenerContainer#0-1;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=internalGetConnection;_RequestID=283cfdbc-df6d-4305-ba1e-395898d8c4b1;|ConnectionMgr: poolName MsfQueueConnectionFactory txLevel : 0|#]
[#|2009-09-04T20:58:08.777-0400|FINEST|sun-appserver2.1|com.sun.genericjmsra|_ThreadID=20;_ThreadName=org.springframework.jms.listener.DefaultMessageListenerContainer#0-1;ClassName=com.sun.genericra.GenericJMSRAProperties;MethodName=getProviderIntegrationMode;_RequestID=283cfdbc-df6d-4305-ba1e-395898d8c4b1;|ProviderIntegrationMode null|#]
[#|2009-09-04T20:58:08.778-0400|FINE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=20;_ThreadName=org.springframework.jms.listener.DefaultMessageListenerContainer#0-1;ClassName=com.sun.enterprise.resource.AbstractResourcePool;MethodName=createSingleResource;_RequestID=283cfdbc-df6d-4305-ba1e-395898d8c4b1;|Connection creation failed for 1 time. It will be retried, if connection creation retrial is enabled.
java.lang.NullPointerException
at com.sun.genericra.outbound.AbstractManagedConnectionFactory.initializeConnectionFactory(AbstractManagedConnectionFactory.java:168)
at com.sun.genericra.outbound.AbstractManagedConnectionFactory.createManagedConnection(AbstractManagedConnectionFactory.java:118)
at com.sun.enterprise.resource.NoTxConnectorAllocator.createResource(NoTxConnectorAllocator.java:115)
at com.sun.enterprise.resource.AbstractResourcePool.createResource(AbstractResourcePool.java:934)
at com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:910)
at com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1832)
at com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:976)
at com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:226)
This sample code works just fine for me via the container:
try {
Hashtable props = new Hashtable();
props.put("java.naming.packaging.url.pkgs", "com.ibm.mq.jms.naming");
props.put("java.naming.factory.initial", "com.sun.jndi.fscontext.RefFSContextFactory");
props.put("java.naming.provider.url", "file:/opt/mqm/jndi");
InitialContext mInitCtx = new InitialContext(props);
log.info("looking up DEV_QCF");
javax.jms.QueueConnectionFactory qcf = (javax.jms.QueueConnectionFactory)mInitCtx.lookup("DEV_QCF");
javax.jms.QueueConnection con = qcf.createQueueConnection();
javax.jms.Session mSession = con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
javax.jms.Session sesion1 = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
javax.jms.Queue myq = (javax.jms.Queue)mInitCtx.lookup("PROXYGEN_BKR_Q");
javax.jms.MessageProducer prod = mSession.createProducer(myq);
log.info("Sending message");
javax.jms.TextMessage msg = mSession.createTextMessage("file based jndi test");
prod.send(msg);
log.info("Message sent");
con.start();
try {
Thread.sleep(8000);
} catch (Exception e) {
e.printStackTrace();
}
log.info("sent message after delay");
} catch (javax.jms.InvalidDestinationException e) {
e.getLinkedException().printStackTrace();
e.printStackTrace();
} catch (Exception ge) {
ge.printStackTrace();
}
[Message sent by forum member 'drfence' (markrstephens_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=363003