users@jmsjca.java.net

RE: how to specify multiple ConnectionURLs?

From: Frank Kieviet <fkieviet_at_iname.com>
Date: Fri, 4 Apr 2008 11:41:32 -0700

Hi Ted,

The easiest way to accomplish this is to use the raunifiedjms connector. For
the URL you would specify jndi:// and you would set an additional field
Options that has all the JNDI properties. A problem is that Glassfish only
allows one single line entry for each property. As a workaround you should
start this entry with JMSJCA.sep=|, and then use | as a separator to
separate each line. There's an example here:
https://jmsjca.dev.java.net/source/browse/*checkout*/jmsjca/jmsjca/jndi/src/
userdoc/rajndi-readme.html .

Another important thing: you can deploy the raunifiedjms without any
configuration settings. You should specify the jndi:// connectionurl and the
jndi properties in Options when you create the connection pool. Bind the
pool to a JNDI name, e.g. jms/myjboss.

I've made some changes to jmsjca so that in the activation spec that you use
for inbound, you can specify the connection factory jndi name that you just
chose, e.g. jms/myjboss.

I haven't checked in these changes yet. If you plan to use them, I'll do
that today.

Setting the JNDI properties is a little bit of a hassle. Perhaps we should
extend the support for jboss to include comma delimited URLs. We may do
that; it helps prioritizing things to know if this is an important feature
for "the community" (read: you).

BTW, we've created some plugins for NetBeans to make the use of JMS even
easier than it already is. Are you using NetBeans? As part of CAPS we've
created a configuration page in the Glassfish console to make the setting of
configuration properties a lot easier.

Frank



> -----Original Message-----
> From: coccic75386_at_mypacks.net [mailto:coccic75386_at_mypacks.net]
> Sent: Friday, April 04, 2008 10:57
> To: users_at_jmsjca.dev.java.net
> Subject: RE: how to specify multiple ConnectionURLs?
>
> Thanks for being encouraging, Frank. I'm a bit new to all this so it's
> hard to ask questions knowing I might look ignorant. I was asked to help
> out for a few days on this project and don't know the background of the
> design/architecture/technology.
>
> >If JBoss JMS allows you to use JNDI, you can easily use the JMSJCA's JNDI
> >provider. You can specify a properties set in the configuration; this
> >properties set will be passed directly to the new InitialContext()
> creation.
>
> Great! Uhm, where do I specify the JNDI provider? I currently do it in
> the Glassfish web admin console when I deploy JMSJCA as a Connector
> Module. There is a single field called ConnectionURL that I fill in with
> value "jnp://jbossIpAddr:1099".
>
> Is there an alternative way to specify the JNDI provider URL(s) that can
> handle two comma-delimited URLs, such as
> "jnp://jboss2:1099,jnp://jboss2:1099"?
>
> >I'm not sure in what environment you're running, so I can not give you
> any
> >more direct advice.
>
> I have a message-driven bean (MDB) running on Glassfish to receive
> messages from a JMS provider on JBoss. I'm using JMSJCA on Glassfish to
> connect to JBoss. This works fine with a single Connection URL.
>
> Thanks!
>
> Ted
>
>
>
>
> -----Original Message-----
> >From: Frank Kieviet <fkieviet_at_iname.com>
> >Sent: Apr 4, 2008 12:36 PM
> >To: users_at_jmsjca.dev.java.net
> >Subject: RE: how to specify multiple ConnectionURLs?
> >
> >Hi Ted,
> >
> >If JBoss JMS allows you to use JNDI, you can easily use the JMSJCA's JNDI
> >provider. You can specify a properties set in the configuration; this
> >properties set will be passed directly to the new InitialContext()
> creation.
> >
> >I'm not sure in what environment you're running, so I can not give you
> any
> >more direct advice.
> >
> >I'm interested what you find out! If you need any further help, let me
> know!
> >
> >Frank
> >
> >
> >> -----Original Message-----
> >> From: coccic75386_at_mypacks.net [mailto:coccic75386_at_mypacks.net]
> >> Sent: Thursday, April 03, 2008 16:05
> >> To: users_at_jmsjca.dev.java.net
> >> Subject: RE: how to specify multiple ConnectionURLs?
> >>
> >> Thanks for the response, Frank.
> >>
> >> It seems that to add support of multiple connection URLs one would need
> to
> >> change how the JMSJCA resource adapter properties are assigned to the
> >> InitialContext of the JMS client (message-driven bean). Do you happen
> to
> >> know which JMSJCA class/method is invoked by the application server to
> >> retrieve the properties used for the InitialContext? (I'm not familiar
> >> with JCA.)
> >>
> >> Would it be one of the following?
> >> - RAJMSResourceAdapter
> >> - XManagedConnectionFactory
> >>
> >> Thanks!
> >>
> >> Ted
> >>
> >> > There's currently no support for JBoss JMS HA, although I would think
> >> it's
> >> > not difficult to add. The URL would have to change, just like it
> works
> >> for
> >> > JMS Grid (Wave) and JMQ (SunOne) so that it will accept commas. Next,
> >> the
> >> > list of URLs need to be passed to the JBoss JMS runtime client.
> >>
> >> > I don't know much about the JBoss JMS HA client. Is it the same one
> as
> >> is
> >> > used for JBoss JMS? How do you specify multiple URLs for it?
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jmsjca.dev.java.net
> For additional commands, e-mail: users-help_at_jmsjca.dev.java.net