[jboss-user] [Messaging, JMS & JBossMQ] - Tibco EMS messaging integration fails

romanchr do-not-reply at jboss.com
Thu Sep 28 07:31:19 EDT 2006


Hi all,

I try to set up an environment where I have JBoss 4.0.4GA Patch1 with EJB3.0RC9 and Tibco EMS 4.2.
In JBOss I would like to run an MDB and EMS the queues for my messaging.
I followed the configuration guide lines stated here:http://wiki.jboss.org/wiki/Wiki.jsp?page=IntegrationWithTibcoEMS

I managed to apply all config changes but as you probably can imagine some problems came along.

Before I explain the problems let me state the bean and the important configurations.
MDB:

  | @MessageDriven(
  | 		activationConfig={
  | 			@ActivationConfigProperty(
  | 				propertyName="destinationType",
  | 				propertyValue="javax.jms.Queue"), 
  | 			@ActivationConfigProperty(
  | 				propertyName="destination"				propertyValue="gameserver.sender.queue"), 
  | 			@ActivationConfigProperty(
  | 				propertyName="providerAdapterJNDI",
  | 				propertyValue="java:/TibcoJMSProvider"), 
  | 			@ActivationConfigProperty(
  | 				propertyName="maxPoolSize",
  | 				propertyValue="1"), 
  | 			@ActivationConfigProperty(
  | 				propertyName="useDLQ",
  | 				propertyValue="false")})
  | public class MessageDispatcher extends ReceiverProxy implements MessageListener
  | {
  | 	private static final Logger logger = Logger.getLogger(MessageDispatcher.class);
  | 	public MessageDispatcher(Object arg)
  | 	{
  | 		super(arg);
  | 	}
  | 
  | 	@Override
  | 	public void onMessage(Message arg0)
  | 	{
  | 		// do stuff
  |                                 [...]
  | 	}
  | 	
  | 	
  | }
  | 

In jboss-service.xml I added a JMSProvider and an alias as described on the wiki:

  | <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  | 	 name=":service=JMSProviderLoader,name=TibcoJMSProvider">
  |     <attribute name="ProviderName">TIBCOJMSProvider</attribute>
  |     <attribute name="ProviderAdapterClass">
  |       com.tibco.tibjms.appserver.jboss.JBossAdapter
  |     </attribute>
  |      <!-- The queue connection factory -->
  |     <attribute name="QueueFactoryRef">XAQueueConnectionFactory</attribute>
  |     <!-- The topic factory -->
  |     <attribute name="TopicFactoryRef">XATopicConnectionFactory</attribute>
  |     <!-- Access JMS via JNDI to tibco -->
  |     <attribute name="Properties">
  |        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory       
  |        java.naming.provider.url=tibjmsnaming://localhost:7222
  |     </attribute>
  |   </mbean>
  |   
  |   <mbean code="org.jboss.naming.NamingAlias"
  |   		name="DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory">      
  |       <attribute name="ToName">tibjmsnaming://localhost/XAQueueConnectionFactory</attribute>
  |       <attribute name="FromName">QueueConnectionFactory</attribute>
  |    </mbean>
  | 
In anonymous wrote : standardjboss.xml I replaced the following lines:

  | <JMSProviderAdapterJNDI>TIBCOJMSProvider</JMSProviderAdapterJNDI>
  | 
and

  | <DestinationQueue>tibjmsnaming://localhost/queue/DLQ</DestinationQueue>
  | 

Last step is to enhance the jndi.properties:

  | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:com.tibco.tibjms.naming
  | 

I deployed the bean and started JBoss (EMS is running of course). Checking the boot.log I could not find any errors. How ever  in our standard log file I found the following exception:

  | [org.jboss.system.ServiceController] Problem starting service DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory
  | javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
  | 	at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1317)
  | 	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1446)
  | 	at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:484)
  | 	at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:477)
  | 	at javax.naming.InitialContext.rebind(InitialContext.java:367)
  | 	at org.jboss.util.naming.Util.createLinkRef(Util.java:279)
  | 	at org.jboss.util.naming.Util.createLinkRef(Util.java:246)
  | 	at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)
  | 	at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)
  | [...]
  | 

After some googeling and checking this forum I found a solution for this problem. I had to add the following line to the anonymous wrote : jndi.properties file:

  | jnp.disableDiscovery=true
  | 

Restarting JBoss and checking the log files again I learned that my original problem is solved but there was a new exception:


  | 2006-09-28 13:23:14,347 WARN  [org.jboss.system.ServiceController] Problem starting service DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory
  | javax.naming.ConfigurationException: No valid Context.PROVIDER_URL was found
  | 	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1449)
  | 	at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:484)
  | 	at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:477)
  | 	at javax.naming.InitialContext.rebind(InitialContext.java:367)
  | 	at org.jboss.util.naming.Util.createLinkRef(Util.java:279)
  | 	at org.jboss.util.naming.Util.createLinkRef(Util.java:246)
  | 	at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)
  | 	at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | [...]
  | 

I googled and searched a bit more but this time I could not find a solution. I only found out that other users expierence similar problems (always in conjuction with an external system call).
I see to possible explanations for this exception:

1. I just missed some really simple config settings
2. There is a bug in JBoss

Any help is greatly appreciated!

Regards

Christoph

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

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



More information about the jboss-user mailing list