-
1. Re: JNDI Provider URL When Connecting to HQ Cluster
clebert.suconic Oct 21, 2010 10:03 AM (in response to aengineer)I thought you were having a JNDI error after failover. The exception you posted is clearly a hornetq exception.
How did you do it? did you lookup the factory after failover, or you kept the same factory before failover and created a connection right after?
Can you show me some code on how you're doing it?
-
2. Re: JNDI Provider URL When Connecting to HQ Cluster
wdfink Oct 21, 2010 10:07 AM (in response to aengineer)Normally this will be not JMS specific.
with host:port[,host:port] you configure a number of cluster members that are ask for the JNDI lookup.
You might also use the autodiscovery feature (AFAIK by default 230.0.0.4:1002) but you must be able to send/receive multicast.
What port do you try as :port? Is it 1099 or 1100, 1100 will be the HA-JNDI port, that might be a difference.
-
3. Re: JNDI Provider URL When Connecting to HQ Cluster
aengineer Oct 21, 2010 11:43 AM (in response to clebert.suconic)Once the failover has completed, I try to create a new JMS connection using the exact same code/client that was used before the failover. The exact same code works when the active instance (richmond2:6146) is still alive. The same code fails after the failover has occurred and the backup instance is now active.
6146 is the value that I pass in via the JVM setting "-Djnp.port=6146"Thanks
AspiCode fragments:
static {
HQEnv.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
HQEnv.put(Context.PROVIDER_URL, "jnp://richmond2.putnaminv.com:6146,richmond1.putnaminv.com:6146");
HQEnv.put(Context.SECURITY_PRINCIPAL, "jndiuser");
HQEnv.put(Context.SECURITY_CREDENTIALS, "putnam");
HQEnv.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
}
InitialContext ctx = new InitialContext(HQEnv)
connFactory = (ConnectionFactory) ctx.lookup("cn=PUT_DEV.Extended.QueueConnectionFactory");
conn = connFactory.createConnection("jmsuser", "putnam");
log.info("Created connection..."); -
4. Re: JNDI Provider URL When Connecting to HQ Cluster
clebert.suconic Oct 22, 2010 3:29 PM (in response to aengineer)Aspi, this is probably a HornetQ issue.
Can you please open an issue on HornetQ and we will investigate? This may be moot with the new Failover, but we will investigate it anyway.
Also:
I'm asking privileges to helpdesk to give me privileges on this formum also but it may take a day or two..
if someone who already have privileges could move this to the HornetQ user's forum please...
-
5. Re: JNDI Provider URL When Connecting to HQ Cluster
jaikiran Oct 23, 2010 2:01 AM (in response to clebert.suconic)Clebert Suconic wrote:
if someone who already have privileges could move this to the HornetQ user's forum please...
Done
Clebert Suconic wrote:
Also:
I'm asking privileges to helpdesk to give me privileges on this formum also but it may take a day or two..
Libor on #jbossorg (internal IRC) setup the privileges for me.