The hajms-examples.sar.zip does not work at 4.2.4 and 4.2.5
wangchen_ca Jun 29, 2004 9:34 PMI'm testing the HAJMS in jboss 4.2.4 and 4.2.5. I find the example at http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQHA
I find the example can't be deployed correctly. Can the author double check it?
The error shows :
Failed to find META-INF/jboss-service.xml
I try to make a new one as this:
----- <?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="org.jboss.mq.il.ha.examples.HAJMSClient" name="user:service=HAJMSClient"/> </server> ----
But the the problem still happens.
I put the problem aside and checked the source code; I find most big change is localhost:1100 and XAconnectionFaction :
Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces"); p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port. InitialContext iniCtx = new InitialContext(p); Object tmpConnFactory = iniCtx.lookup("XAConnectionFactory");
and I copy the code to my JMS client code.
When my two clustered 4.2.5 both started, my code works fine. However, when I stop one jboss, the JMS singleton moves, my code can't connect to the Queue any more.
some log is listed
15:28:25,513 INFO [JMSContainerInvoker] Trying to reconnect to JMS provider
15:28:25,528 WARN [Connection] Connection failure:
org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.io.EOFException)
at org.jboss.mq.Connection.asynchFailure(Connection.java:429)
at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:145)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:398)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:332)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2603)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:279)
... 1 more
15:28:35,524 ERROR [JMSContainerInvoker] Could not stop JMS connection
HAILReceiver or HAILSender is my client JMS class
15:29:21,465 INFO [HAILReceiver] Connecting to HAIL JMS.
15:29:35,606 ERROR [DLQHandler] Initialization failed DLQHandler
javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory
at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:171)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:237)
at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:164)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:542)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:764)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1267)
at org.jboss.mq.Connection.asynchFailure(Connection.java:439)
at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:145)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:398)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:332)
at java.lang.Thread.run(Thread.java:534)
----------------------
I know I still need to make other changes for my MDBeans to make them load-balanced. But right now, Want to fix the JMS client as the first step.
I use mysql as JMS persistense DB.
Thanks.