Issue with HA JNDI and Singleton MDB
topizio Jan 11, 2011 4:16 AMHi guys,
I'm trying to build an develop environment with two JBoss AS in cluster mode balanced via Apache mod_jk to deploy an EAR application with two WAR and two MDBs in HA mode.
Unfortunately something goes wrong because when one server is online the application run correctly. When the second server enter in the cluster it's unable to reach the MDBs defined in the master node. Every time I've got the exception javax.naming.NameNotFoundException: queue not bound.
As the guide said I left untouched the jndi.properties and I've changed the jboss.xml for Engine MDB as the follows:
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>Engine</ejb-name>
<resource-ref>
<res-ref-name>queue/Engine</res-ref-name>
<jndi-name>jnp://localhost:1100/queue/Engine</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
<resource-managers>
</resource-managers>
</jboss>
and ejb-jar.xml as the follows:
<ejb-jar >
<description><![CDATA[No Description.]]></description>
<display-name>Engine</display-name>
<enterprise-beans>
<message-driven >
<description><![CDATA[Bean to access messages]]></description>
<display-name>Engine</display-name>
<ejb-name>Engine</ejb-name>
<ejb-class>com.web.ejb.engine.EngineBean</ejb-class>
<transaction-type>Bean</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-type>javax.jms.Queue</res-type>
<res-ref-name>queue/Engine</res-ref-name>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
</assembly-descriptor>
</ejb-jar>
I've done something similiar for the descriptors for the other MDB.
I've tried to query the service JNDIView in jmx-console and HA-JNDI Namespace is still empty.
Have somebody got any idea?
Thanks a lot for your attention.
Best regards