HornetQ & JBoss7 clustering questions
qtm Mar 20, 2012 6:42 AMHello,
Thanks for your support until now, I'm getting a better picture of HornetQ and JBoss7. Still, I have some more questions:
1. I've been using JBM 1.4.5 + JBoss 4.x so JNP is the main tool for my remote clients. Now that is gone, I'm looking for solutions to replace it.
Until now I've discovered the remote protocol:
final Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
Context ctx = new InitialContext(env);
Its main draw-back is the lack of support for multiple hosts - "remote://[host1]:[port1],remote://[host2]:[port2]" fails. I'm interested in high availability in a cluster. When the live server is down and the back-up is available how can I connect to it? A try-catch block with a new connection in the catch(the back-up host and port) is my main option, but it's ugly. Is there a better way to do this?
2. Does the old HA-JNDI port have an equivalent?
3. Regarding clustering - my understanding for setting up a cluster is this: each live node and its back-ups have a shared stored, but that shared stored is different for each live-backup combo. Is this correct? Would it be a problem to have a single shared store for the entire cluster? I'm accepting the single point of failure risk.
4. Data replication - "Replication will be available in the next release of HornetQ". Do you mean the 2.2.x family or the 2.3.x family or something else?
5. In the live + back-up + remote client scenario. Let's say I've got a connection to the live and my thread is doing something while the live goes down and the back-up becomes live. Will the connection be usable or should I create a new one? From what I've tested, a new one should be created, but I might be wrong.
6. In the live + back-up + remote client scenario: I'm getting some warnings(2 types): int the back-up server:
(Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Error trying to connect to any providers for xa recovery
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.13.Final.jar:]
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.13.Final.jar:]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]
Caused by: HornetQException[errorCode=2 message=null]
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:351) [hornetq-jms-2.2.13.Final.jar:]
at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.13.Final.jar:]
... 7 more
WARN [org.hornetq.core.server.cluster.impl.BroadcastGroupImpl] (Activation for server HornetQServerImpl::serverUUID=58899408-71a1-11e1-9dda-b8ac6f2ea395) local-bind-address specified for broadcast group but no local-bind-port specified so socket will NOT be bound to a local address/port
WARN [org.hornetq.core.client.impl.ClientSessionFactoryImpl] (Thread-1 (HornetQ-client-global-threads-33379524)) Failed to connect to server.
WARN [org.hornetq.core.client.impl.ServerLocatorImpl] (Thread-1 (HornetQ-client-global-threads-33379524)) null
Is my configuration(attached) wrong or are they expected? I'm running on localhost, back-up server port offset =1 .
Thank you
-
hqcluster_backup.xml 27.0 KB
-
hqcluster_live.xml 27.1 KB