users@glassfish.java.net

GenericJMSRA: Cannot find JNDI-name of physical destination

From: <glassfish_at_javadesktop.org>
Date: Wed, 24 Sep 2008 05:45:55 PDT

Hi,

i am trying to configure a GlassFish cluster to use MQS as messaging service. I followed the tutorial at https://genericjmsra.dev.java.net/docs/websphere-mq-integration-guide/webspheremq_integration_guide.html and got beyond the first problems.

But now I am kinda stuck because when I try to deploy my MDB it can't lookup the ConnectionFactory that I specified in the sun-ejb-jar.xml under activation-config. Here is the relevant snippet:

 <mdb-resource-adapter>
            <!-- resource-adapter-mid points to the Generic Resource Adapter for JMS -->
            <resource-adapter-mid>[b]genericra[/b]</resource-adapter-mid>
            <activation-config>
                    <activation-config-property>
                            <activation-config-property-name>DestinationType</activation-config-property-name>
                            <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
                    </activation-config-property>
                    <!activation-config-property>
                            <activation-config-property-name>ConnectionFactoryJndiName</activation-config-property-name>
                            <activation-config-property-value>[b]BEA10TEST.JNDI.QCF[/b]</activation-config-property-value>
                    </activation-config-property>
                <activation-config-property>
                            <activation-config-property-name>DestinationJndiName</activation-config-property-name>
                            <activation-config-property-value>[b]BEA10TEST.JNDI.QUEUE[/b]</activation-config-property-value>
                    </activation-config-property>

Now the lookup for BEA10TEST.JNDI.QCF fails (it says bea here because I am reusing a binding that has been initially created for a bea test scenario but the output of the JMSAdmin tool is not dependent on the appserver). I set the initial context factory to com.sun.jndi.fscontext.RefFSContextFactory and referenced the directory containing the .bindings file as provider url. But still the lookup fails. There are some log messages that look a bit suspicious to me:

[#|2008-09-24T14:37:26.817+0200|FINEST|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=22;_ThreadName=httpWorkerThread-1648-0;ClassName=com.sun.genericra.GenericJMSRA
Properties;MethodName=setResourceAdapter;_RequestID=7b48e375-620b-4c9c-b8de-c77f60ee74af;|setResourceAdapter com.sun.genericra.GenericJMSRA_at_403e9a1b{ConnectionFactory
ClassName = null},{QueueConnectionFactoryClassName = null},{TopicConnectionFactoryClassName = null},{XAConnectionFactoryClassName = null},{XAQueueConnectionFactoryCla
ssName = null},{XATopicConnectionFactoryClassName = null},{QueueClassName = null},{TopicClassName = null},{UnifiedDestinationClassName = null},{ConnectionFactoryPrope
rties = null},{JndiProperties = java.naming.factory.url.pkgs=com.ibm.mq.jms.naming,java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.
provider=file://www/sungf/mqm},{[b]ProviderIntegrationMode = jndi[/b]},{CommonSetterMethodName = null},{SupportsXA = true},{UseFirstXAForRedelivery = false},|#]

[#|2008-09-24T14:37:26.862+0200|FINEST|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=22;_ThreadName=httpWorkerThread-1648-0;ClassName=com.sun.genericra.GenericJMSRA
Properties;MethodName=getProviderIntegrationMode;_RequestID=7b48e375-620b-4c9c-b8de-c77f60ee74af;|[b]ProviderIntegrationMode null[/b]|#]

[#|2008-09-24T14:37:26.865+0200|FINE|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=22;_ThreadName=httpWorkerThread-1648-0;ClassName=com.sun.genericra.inbound.Activa
tionSpec;MethodName=validate;_RequestID=7b48e375-620b-4c9c-b8de-c77f60ee74af;|com.sun.genericra.inbound.ActivationSpec_at_7ca58b69{ConnectionFactoryClassName = null},{Qu
eueConnectionFactoryClassName = null},{TopicConnectionFactoryClassName = null},{XAConnectionFactoryClassName = null},{XAQueueConnectionFactoryClassName = null},{XATop
icConnectionFactoryClassName = null},{QueueClassName = null},{TopicClassName = null},{UnifiedDestinationClassName = null},{ConnectionFactoryProperties = null},{JndiPr
operties = java.naming.factory.url.pkgs=com.ibm.mq.jms.naming,java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.provider=file://www/s
ungf/mqm},{[b]ProviderIntegrationMode = jndi[/b]},{CommonSetterMethodName = null},{SupportsXA = true},{UseFirstXAForRedelivery = false},{RedeliveryInterval = 1},{RedeliveryA
ttempts = 0},{ClientID = null},{MessageSelector = null},{SubscriptionDurability = Non-Durable},{ConnectionFactoryJNDIName = BEA10TEST.JNDI.QCF},{SubscriptionName = nu
ll},{DestinationJNDIName = BEA10TEST.JNDI.QUEUE},{DestinationType = javax.jms.Queue},{DeadMessageDestinationType = javax.jms.Destination},{MaxPoolSize = 32},{Destinat
ionProperties = null},{DeadMessageDestinationJndiName = null},{DeadMessageConnectionFactoryJndiName = null},{DeadMessageConnectionFactoryProperties = null},{DeadMessa
geDestinationClassName = null},{DeadMessageDestinationProperties = null},{SendBadMessagesToDMD = false},{EndpointReleaseTimeOut = 180},{InstanceCount = 1},{LoadBalanc
ingRequired = true},{Instance ID = 0},{CustomLoadBalancingMessageSelector = },{ShareClientID = false}|#]

[#|2008-09-24T14:37:26.867+0200|FINEST|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=22;_ThreadName=httpWorkerThread-1648-0;ClassName=com.sun.genericra.GenericJMSRA
Properties;MethodName=getProviderIntegrationMode;_RequestID=7b48e375-620b-4c9c-b8de-c77f60ee74af;|[b]ProviderIntegrationMode jndi[/b]|#]

[#|2008-09-24T14:37:26.868+0200|FINEST|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=22;_ThreadName=httpWorkerThread-1648-0;ClassName=com.sun.genericra.GenericJMSRA
;MethodName=getInstance;_RequestID=7b48e375-620b-4c9c-b8de-c77f60ee74af;|GenericJMSRA - getInstance() orig com.sun.genericra.GenericJMSRA_at_403e9a1b{ConnectionFactoryCl
assName = null},{QueueConnectionFactoryClassName = null},{TopicConnectionFactoryClassName = null},{XAConnectionFactoryClassName = null},{XAQueueConnectionFactoryClass
Name = null},{XATopicConnectionFactoryClassName = null},{QueueClassName = null},{TopicClassName = null},{UnifiedDestinationClassName = null},{ConnectionFactoryPropert
ies = null},{JndiProperties = java.naming.factory.url.pkgs=com.ibm.mq.jms.naming,java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory,java.naming.pr
ovider=file://www/sungf/mqm},{[b]ProviderIntegrationMode = jndi[/b]},{CommonSetterMethodName = null},{SupportsXA = true},{UseFirstXAForRedelivery = false},|#]

[#|2008-09-24T14:37:26.870+0200|FINEST|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=22;_ThreadName=httpWorkerThread-1648-0;ClassName=com.sun.genericra.GenericJMSRA
Properties;MethodName=getProviderIntegrationMode;_RequestID=7b48e375-620b-4c9c-b8de-c77f60ee74af;|[b]ProviderIntegrationMode null[/b]|#]

As you see the ProviderIntegrationMode property is sometimes printed as jndi and sometimes as null even though it is defined as jndi in the domain.xml which is logged correctly too. But everytime before the failing lookup takes place the last log states that it is null. So I assume this is why the lookup fails, but I cannot figure out what I am doing wrong here.

Just in case it matters, the domain is set up as a cluster but I am only using one instance and the corresponding DAS on the same machine, the other instance is shut down.

Does anyone have a clue what's wrong here?

Thanks,
Chris
[Message sent by forum member 'candlejack' (candlejack)]

http://forums.java.net/jive/thread.jspa?messageID=301272