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