| Author |
JMS and Websphere 6
|
T Masga
Greenhorn
Joined: Jun 25, 2008
Posts: 6
|
|
Hi, I'm new to JMS and I'm trying to implement a JMS producer/consumer in Websphere 6. My objective is to use standard J2EE specs, and end with a simple example, with no MDB around, just plain java objects. So I created a a servlet that posts a message, then I have a timertask that queries the queue for any messages to process. The process is simple, and it works fine, but I have a small issue: I'm retrieving an instance of ConnectionFactory and Queue using the following code: Although this works like a charm, I get the following warning on the console: That also happened with datasources when I used the jndi name "jdbc/my-dbcon". I then started using "java:comp/env/jdbc/my-dbcon" and those datasource warnings vanished, but if I use "java:comp/env/jms/my-connection" I receive an error and it stops working. Something like "Error 500: Name comp/env/jdbc not found in context "java:".". In my web.xml, I have the following data: If I remove the resource-ref of "jms/my-connection", the JMS still works, as long as I don't prefix the jndi with "java:comp/env/". So it raises another question: do I really need the resource-ref definition there, if it still works without it? (JMS works without ""java:comp/env/" prefixing, so I assume the JMS is configured properly on Websphere server.) Any help on successfull JMS referencing using jndi "java:comp/env/" prefix would be great. Thanks
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
"muaddib", Please check your private messages regarding an important administrative matter. -Ben
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: JMS and Websphere 6
|
|
|