Hi all,

  How can I configure tomcat to use JMS in its valve?

  I failed at the very beginning, when I tried to obtain the JNDI
context, after moving the J2EE jms.jar to under server/lib.

-----------------------------------
  The Exception I got was:

  [main] ERROR digester.Digester  - Begin event threw exception
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an application
resource file:  java.naming.factory.initial

-----------------------------------
  My code in the valve constructor looks like the following. The same code
runs perfectly fine in a normal J2EE application.

  Context cxt = new InitialContext();
  cf = (ConnectionFactory)cxt.lookup("jms/TopicConnectionFactory");

  con = cf.createConnection();

  session = con.createSession(false,Session.AUTO_ACKNOWLEDGE);

  dest = (Topic)cxt.lookup("jms/hWLMTopic");

  producer = session.createProducer(dest);

-----------------------------------

  Any advice will be hugely appreciated.

Best regards,

Rui


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to