[JBoss Messaging Users] - Remote JMS Provider | Connecting EJB3 to a remote Topic ?
by artima
Hi All,
I am using JBoss 5.1 + JBM2.0 BETA 4. I have a server, Server1 which has a topic and I need to receive messages on this topic on server 2. On Server 2, I am creating an RemoteJMSProvider, and using it in the EJB3 MDB, however, the connection b/w server 1 and server2 aint seems to be happening. I have gone through all the post on this site about this topic and I think I am doing exactly what the examples recommends. Can someone please help me with this problem.
Server 2 [jms-ds.xml]
<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.10.111.11:13001
| </attribute>
| </mbean>
EJB on Server 2:
| @MessageDriven(mappedName = "jms/Topic11",activationConfig =
| {
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "/topic/topictarget"),
| @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
| @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue="java:/RemoteJMSProvider"),
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic")
| })
|
If however I create a POJO that directly consumes message from 10.10.111.11:13001, then I am able to get it fine. That atleast tells me that the server 1 is getting the message.
Thanks in advance,
amit.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251370#4251370
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251370
16 years, 8 months
[JBoss Messaging Users] - Messaging not working reliably on failover
by vink
I'm using JBoss 4.2.3GA with Messaging 1.4.2GA-SP1.
I'm having 2 Jboss nodes. I'm having application deployed on these servers, which are firing events to a clustered queue & topic.
I'm having a client which is listening to these events. I can see servers load balancing the calls invoked by clients resulting in jms messages, which is listened on clustered topic by the clients.
I crash node1, all invocation calls are diverted to node2.
The messages are seamlessly received by node2. (No exceptions on node2)
Then I bring-up node1 again & wait until invocation calls are shared by both servers.
Then I crashed node2, I see lot of exceptions on node1 for the failover. It takes few seconds until the failover is complete & then everything comes to normal.
Problem: during the time failover is taking place, events are getting lost.
- 1st case: It is successful in switching the load to next server; with no exception; no event loss; seamless to client.
- 2nd case: The nodes which are once down, are not joining the cluster seamlessly on server side; as some failover sequence runs during the switchover. Events are getting lost in this process, & it is seamless to client.
Why? this is critical & not the expectation.
Is it a bug?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251364#4251364
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251364
16 years, 8 months