MDB: Problem connecting to remote destination, using discovery group
kristjan.steinar Jan 11, 2011 11:00 AMI have two JBoss AS 6 Final clusters, each cluster has two nodes. Cluster one is purely for messaging and cluster two contains the applications.
1. MessagingCluster with nodes M1 and M2
2. ApplicationCluster with nodes A1 and A2
After an application, containing an MDB, has been been deployed it is not able to find the destination.
However, changing the resource adapter from using discovery groups to using fixed ip / port, enables the MDBs to find the destinations.
What is your experience with remote destinations and MDBs? Do you use discovery group to find remote destinations and have had any problems with that?
This is the resource adapter definition.
ra.xml
{code:xml}
<resourceadapter>
<resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
<config-property>
<description>The discovery group address</description>
<config-property-name>DiscoveryAddress</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>239.193.128.1</config-property-value>
</config-property>
<config-property>
<description>The discovery group port</description>
<config-property-name>DiscoveryPort</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>9876</config-property-value>
</config-property>
<config-property>
<description>Should clean server shutdown trigger failover?</description>
<config-property-name>FailoverOnServerShutdown</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>
<config-property>
<description>The default session type</description>
<config-property-name>SessionDefaultType</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>javax.jms.Queue</config-property-value>
</config-property>
<config-property>
<description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
<config-property-name>UseTryLock</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>0</config-property-value>
</config-property>
<connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
<connection-interface>javax.jms.Session</connection-interface>
<connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class>
</connection-definition>
<transaction-support>XATransaction</transaction-support>
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
<inbound-resourceadapter>
<messageadapter>
<messagelistener>
<messagelistener-type>javax.jms.MessageListener</messagelistener-type>
<activationspec>
<activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class>
<required-config-property>
<config-property-name>destination</config-property-name>
</required-config-property>
</activationspec>
</messagelistener>
</messageadapter>
</inbound-resourceadapter>
</resourceadapter>
{code:xml}
When the application is deployed it tries to connect, but ends without the being able to find the destination
15:52:34,643 INFO [BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@838c3a into MC at org.jboss.ejb.bean.inst
antiator/jb.itu.tes.jboss.messaging/jb.itu.tes.jboss.messaging.ejb/TopicListener
15:52:34,674 WARN [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
15:52:35,440 INFO [JBossASKernel] Created KernelDeployment for: jb.itu.tes.jboss.messaging.ejb.jar
15:52:35,440 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=jb.itu.tes.jboss.messaging.ear,jar=jb.itu.tes.jboss.messaging.ejb.jar,name=TopicListener,serv
ice=EJB3
15:52:35,440 INFO [JBossASKernel] with dependencies:
15:52:35,440 INFO [JBossASKernel] and demands:
15:52:35,440 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService; Required: Described
15:52:35,440 INFO [JBossASKernel] jboss-switchboard:appName=jb.itu.tes.jboss.messaging,module=jb.itu.tes.jboss.messaging.ejb,name=TopicListener; Required:
Create
15:52:35,486 INFO [JBossASKernel] jboss-injector:topLevelUnit=jb.itu.tes.jboss.messaging.ear,unit=jb.itu.tes.jboss.messaging.ejb.jar,bean=TopicListener; R
equired: Described
15:52:35,486 INFO [JBossASKernel] and supplies:
15:52:35,486 INFO [JBossASKernel] jndi:null
15:52:35,486 INFO [JBossASKernel] Class:javax.jms.MessageListener
15:52:35,486 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=jb.itu.tes.jboss.messaging.ear,jar=jb.itu.tes.jboss.messaging.ejb.jar,name=TopicListener,service=EJ
B3) to KernelDeployment of: jb.itu.tes.jboss.messaging.ejb.jar
15:52:35,565 INFO [EJBContainer] STARTED EJB: dk.jyskebank.jboss.messaging.TopicListener ejbName: TopicListener
15:52:35,611 WARN [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
15:52:36,518 INFO [HornetQActivation] awaiting topic/queue creation jb.itu.tes.jms.test.topic.c
15:52:36,861 INFO [TomcatDeployment] deploy, ctxPath=/jb.itu.tes.jboss.messaging.web
15:52:36,955 INFO [service] Removing bootstrap log handlers
15:52:37,049 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-10.26.241.102-8380
15:52:37,049 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-10.26.241.102-8309
15:52:37,049 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.Final "Neo"] Started in 51s:482ms
15:52:38,627 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResour
ceAdapter@1036682 destination=jb.itu.tes.jms.test.topic.c destinationType=javax.jms.Topic ack=Auto-acknowledge durable=false clientID=null user=guest password=*
*** maxSession=15)
15:52:38,658 INFO [org.hornetq.ra.inflow.HornetQActivation] awaiting topic/queue creation jb.itu.tes.jms.test.topic.c
15:52:40,720 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResour
ceAdapter@1036682 destination=jb.itu.tes.jms.test.topic.c destinationType=javax.jms.Topic ack=Auto-acknowledge durable=false clientID=null user=guest password=*
*** maxSession=15)
15:52:40,736 INFO [org.hornetq.ra.inflow.HornetQActivation] awaiting topic/queue creation jb.itu.tes.jms.test.topic.c
15:52:42,767 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResour
ceAdapter@1036682 destination=jb.itu.tes.jms.test.topic.c destinationType=javax.jms.Topic ack=Auto-acknowledge durable=false clientID=null user=guest password=*
*** maxSession=15)
15:52:42,783 INFO [org.hornetq.ra.inflow.HornetQActivation] awaiting topic/queue creation jb.itu.tes.jms.test.topic.c
15:52:44,845 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResour
ceAdapter@1036682 destination=jb.itu.tes.jms.test.topic.c destinationType=javax.jms.Topic ack=Auto-acknowledge durable=false clientID=null user=guest password=*
*** maxSession=15)
15:52:44,877 INFO [org.hornetq.ra.inflow.HornetQActivation] awaiting topic/queue creation jb.itu.tes.jms.test.topic.c
15:52:46,908 INFO [org.hornetq.ra.inflow.HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResour
ceAdapter@1036682 destination=jb.itu.tes.jms.test.topic.c destinationType=javax.jms.Topic ack=Auto-acknowledge durable=false clientID=null user=guest password=*
*** maxSession=15)