Hello Dan,

Thanks for responding. Without going too much into the code, I am trying to
understand whether Tomcat does support the concept of a Naming Server. With
JMS, it is possible to create and store administration objects such as
ConnectionFactory, Destinations in a Naming Service (such as LDAP). Is it
possible to use and external independent Naming Service, such as LDAP to
store JMS Admin objects in conjunction with Tomcat?  The whole idea of
having a Naming Service was to separate objects. Thus your Naming Service
hold the details of the objects one really wants to use.

>From the code, we connect to the Naming Service and obtain reference to the
ConnectionFactory, say. We then use this reference to connect to the
underlying JMS server encapsulated in the ConnFactory.

Supposing my Naming Service URL/port is A.B.C.D/nnnn and my JMS Server URL
is E.F.G.H/mmmm - What should one use as the Provider URL in this context?

Does Tomcat have a Naming Service running inside it which stores the admin
objects? If so, is it accessible via a URL?

Thanks
ViK


On Thu, Dec 12, 2013 at 1:03 PM, Daniel Mikusa <dmik...@gopivotal.com>wrote:

> On Dec 12, 2013, at 4:25 AM, Vic Katte <vicnka...@gmail.com> wrote:
>
> > Hello,
>
> What version of Tomcat are you using?
>
> >
> > How does one configure tomcat so that a hosted application could connect
> to
> > a JMS Message server such as WebSphereMQ?
> >
> > I have managed to write a small test application in JMS and deployed it
> to
> > tomcat and configured it to connect to MQ. This application defines the
> > default initial context using
> >
> > InitialContext context = new InitialContext()
>
> Could you give us a larger code sample?  This doesn't really show much.
>
> > And have configured the context.xml and web.xml.
>
> What have you configured in these files?  Include that too, minus comments.
>
> > I have deployed and tested and it works quite well.
> >
> > However, I do not want to use the default context.
>
> Why do you not want to use the defaults?
>
> > I want to use code something like below:
> >
> > Hashtable env = new Hashtable()
> >
> > env.put(Context, "contextValue")
> > env.put(ProviderURL, "theURL)
> > etc
> >
> > InitialContext context = new InitialContext(env)
>
> Again, why?  What are you trying to achieve here?  Why doesn't the default
> work?  More context and information will help someone on this list to give
> you a better answer.
>
> > My question is - What does this ProviderURL represents? Is it the URL to
> > the JNDI service or is it the URL to the JMS message server?
>
> Not ringing any bells.  Probably something specific to your JMS
> implementation.
>
> >
> > If it is the URL to the JNDI server, does tomcat have a separate JNDI
> > server? If so, what is its URL?
>
> Tomcat has a JNDI implementation that you can use to access resources
> defined on the server.
>
>   http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html
>
> If you were to make your MQ resources available through JNDI (using the
> <Resource/> tag), you could access them in your application through JNDI.
>
>
> http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Using_resources
>
> Dan
>
> >
> > Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to