users@jmsjca.java.net

RE: how to specify multiple ConnectionURLs?

From: <coccic75386_at_mypacks.net>
Date: Wed, 9 Apr 2008 18:03:36 -0400 (GMT-04:00)

It looks like I got things working! Thanks for all your help, Frank. I could not have done it without you.

In case anyone else is reading this on the list, here are the changes I had to make to the example values in the RAJNDI page:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
JMSJCA.TopicCF=TopicConnectionFactory
JMSJCA.QueueCF=QueueConnectionFactory
JMSJCA.UnifiedCF=ConnectionFactory
JMSJCA.NoXA=true

The tricky one was setting JMSJCA.NoXA to true. I had to work through the code upwards from the exception to determine where the XA vs non-XA decision was made, and I was able to find the property JMSJCA.NoXA.

To support two provider URLs (for redundancy), I did what you suggested and changed the separator to a vertical bar, then used a comma to separate the two URLs. It worked like a champ.

Thanks for clarifying that jndi:// goes into the ConnectionURL property. This didn't make intuitive sense and I'm glad you confirmed it. To be honest, it's still a bit fuzzy to me why I'm using the RAJNDI and not RAJBoss adapter, but since it works, I'm not complaining. Actually, the entire concept of needing a resource adapter for JNDI doesn't make sense to me, since typically one thinks of having an adapter per JMS provider.

Thanks again!

Ted



-----Original Message-----
>From: Frank Kieviet <fkieviet_at_iname.com>
>Sent: Apr 8, 2008 4:58 PM
>To: users_at_jmsjca.dev.java.net
>Subject: RE: how to specify multiple ConnectionURLs?
>
>Hi Ted,
>
>Sorry for my tardy reply. See responses inline.
>
>Frank
>
>> -----Original Message-----
>> From: coccic75386_at_mypacks.net [mailto:coccic75386_at_mypacks.net]
>> Sent: Monday, April 07, 2008 15:04
>> To: users_at_jmsjca.dev.java.net
>> Subject: RE: how to specify multiple ConnectionURLs?
>>
>> Hi Frank -
>>
>> Thanks for the feedback. I have to admit I'm having some difficulty.
>>
>> >The easiest way to accomplish this is to use the raunifiedjms connector.
>>
>> Great, I was able to build the code snapshot from CVS and generated a
>> raunifiedjms.rar file. I was also able to successfully deploy this to
>> Glassfish.
>>
>> >For the URL you would specify jndi:// and you would set an additional
>> field
>> Options that has all the JNDI properties.
>>
>> OK, I did this as well. But I'm getting the following exception from
>> Glassfish:
>>
>> javax.jms.JMSException: The JNDI name is null at
>> com.stc.jmsjca.jndi.RAJNDIObjectFactory.getJndiObject(RAJNDIObjectFactory.
>> java:100)
>> at
>> com.stc.jmsjca.jndi.RAJNDIObjectFactory.createConnectionFactory(RAJNDIObje
>> ctFactory.java:186)
>[fkieviet] I suspect that you did not set the properties
>JMSJCA.TopicCF=...
>JMSJCA.QueueCF=...
>JMSJCA.UnifiedCF=...
>The values should point to the JNDI names of the connection factories, as
>described here:
><https://jmsjca.dev.java.net/source/browse/*checkout*/jmsjca/jmsjca/jndi/src
>/userdoc/rajndi-readme.html>
>
>
>>
>> It seems that when I set java.naming.provider.url to jnp://localhost:1099
>> in the Options field, the value is not used for the JNDI lookup.
>>
>> I'm actually trying to get the new resource adapter to work with only a
>> single URL for now. I also tried setting the ConnectionURL to
>> jnp://localhost:1099 like I did for JMSJCA but that didn't work either.
>[fkieviet] Yes, that's expected: only the jboss:// url is recognized, not
>the jnp:// url. See
><https://jmsjca.dev.java.net/source/browse/*checkout*/jmsjca/jmsjca/unifiedj
>ms/src/userdoc/raunifiedjms-readme.html> for a table of recognized prefixes.
>
>
>>
>> Also, I'm not sure it makese sense to me to set the ConnectionURL to
>> jndi://, which of course is blank.
>[fkieviet] That actually is correct: by specifying jndi:// as the URL, the
>raunifiedjms will instantiate the rajndi connector which in turn will look
>at the options field to do its work.
>
>Feel free to give me a call if you think that would help: 626-471-6322. I'm
>in the PDT timezone.
>
>>
>> Any ideas?
>>
>> Thanks!
>>
>> Ted
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jmsjca.dev.java.net
>> For additional commands, e-mail: users-help_at_jmsjca.dev.java.net
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jmsjca.dev.java.net
>For additional commands, e-mail: users-help_at_jmsjca.dev.java.net
>