[jboss-user] [JBoss Messaging] - Connecting MDB to remote topic

paduffy do-not-reply at jboss.com
Thu Dec 20 12:41:17 EST 2007


Must connect EJB3 MDB in server X to remote topic on server Y.
  | 
  | First confirmed that server Y is up and topic deployed (via JMXConsole to Y).
  | 
  | I added a Remote provider to deploy/jms-ds.xml on server X.
  | 
  |   <!-- Remote JMS provider -->
  |   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  | 	 name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider,server=remotehost">
  |     <attribute name="ProviderName">RemoteJMSProvider</attribute>
  |     <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
  |     <!-- The connection factory -->
  |     <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
  |     <!-- The queue connection factory -->
  |     <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
  |     <!-- The topic factory -->
  |     <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
  |     <!-- Connect to JNDI on the host "the-remote-host-name" port 1099-->
  |     <attribute name="Properties">
  |        java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  |        java.naming.factory.url.pkgs=org.jnp.interfaces
  |        java.naming.provider.url=10.86.147.208:1099
  |     </attribute>
  |   </mbean>
  | 
  | Annotations on the topic listener MDB as below (running on server X).
  | 
  | 
  | @MessageDriven(activationConfig = {
  |     @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
  |     @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/edgeGroupRequestTopic"),
  |     @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue="java:/RemoteJMSProvider"),
  |     @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "60"),
  |     // TBD: need ability to setup selector at installation/configuration time.
  |     @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "EDU_ID IN ('ALL', 'EDU_0001')")})
  | 
  | AS startup on server X gives the following error when MDB tries to connect to remote topic (typical of a JNDI problem?).
  | 
  | 
  | 2007-12-19 18:58:37,342 WARN  [org.jboss.ejb3.mdb.MessagingContainer] Could not find the topic destination-jndi-name=/topic/edgeGroupRequestTopic
  | 2007-12-19 18:58:37,342 WARN  [org.jboss.ejb3.mdb.MessagingContainer] destination not found: topic/topic/edgeGroupRequestTopic reason: javax.naming.NameNotFoundException: topic not bound
  | 2007-12-19 18:58:37,342 WARN  [org.jboss.ejb3.mdb.MessagingContainer] creating a new temporary destination: topic/topic/edgeGroupRequestTopic
  | 2007-12-19 18:58:37,358 WARN  [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:ear=mdpe-1.0-SNAPSHOT.ear,jar=eduRequestRouter-ejb-1.0-SNAPSHOT.jar,name=EDURequestRouterMDB,service=EJB3
  | javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.
  | 	at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653)
  | 	at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
  | 	at org.jboss.ejb3.jms.DestinationManagerJMSDestinationFactory.createDestination(DestinationManagerJMSDestinationFactory.java:75)
  | 	at org.jboss.ejb3.mdb.MessagingContainer.createTemporaryDestination(MessagingContainer.java:557)
  | 	at org.jboss.ejb3.mdb.MessagingContainer.createDestination(MessagingContainer.java:496)
  | 
  | 
  | What am I doing wrong?
  | 
  | 
  | --------------------
  | 
  | Further DEBUG turned up...llosk like the DefaultJMSProvider is being used tot he remote lookup instead of RemoteJMSProvider?
  | 
  | 
  | 
  | 2007-12-20 11:51:08,744 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] Initializing
  | 2007-12-20 11:51:08,744 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] Looking up provider adapter: java:/DefaultJMSProvider
  | 2007-12-20 11:51:08,744 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter at 1781288
  | 2007-12-20 11:51:08,744 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] context: javax.naming.InitialContext at e8a298
  | 2007-12-20 11:51:08,744 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] Got destination type Topic for EDURequestRouterMDB
  | 2007-12-20 11:51:08,744 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] jndiSuffix: topic/edgeGroupRequestTopic
  | 2007-12-20 11:51:08,744 WARN  [org.jboss.ejb3.mdb.MessagingContainer] Could not find the topic destination-jndi-name=/topic/edgeGroupRequestTopic
  | 2007-12-20 11:51:08,744 WARN  [org.jboss.ejb3.mdb.MessagingContainer] destination not found: topic/topic/edgeGroupRequestTopic reason: javax.naming.NameNotFoundException: topic not bound
  | 2007-12-20 11:51:08,744 WARN  [org.jboss.ejb3.mdb.MessagingContainer] creating a new temporary destination: topic/topic/edgeGroupRequestTopic
  | 2007-12-20 11:51:08,759 DEBUG [org.jboss.ejb3.mdb.MdbDelegateWrapper] Starting failed jboss.j2ee:ear=mdpe-1.0-SNAPSHOT.ear,jar=eduRequestRouter-ejb-1.0-SNAPSHOT.jar,name=EDURequestRouterMDB,service=EJB3
  | javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.
  | 	at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:653) 
  |                     		      
  | 
  | 
  | 
  | [code]

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114736#4114736

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114736



More information about the jboss-user mailing list