-
1. Re: Messaging from servlet More info
npdavis Feb 16, 2004 2:02 PM (in response to npdavis)jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">
<jboss-web>
<context-root>email-audit</context-root>
<!-- Resource Environment References -->
<!-- Resource references -->
<!-- EJB References -->
<!-- JMS Connection Factories (java:comp/env/jms) -->
<resource-ref>
<res-ref-name>jms/queue/outgoing</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<jndi-name>QueueConnectionFactory</jndi-name>
</resource-ref>
</jboss-web>
web.xml:
<servlet-name>RecieveEmailInfo</servlet-name>
<display-name>Computation Servlet</display-name>
<![CDATA[Servlet That Audits Email]]>
<servlet-class>audit.email.RecieveEmailInfo</servlet-class>
<servlet-mapping>
<servlet-name>RecieveEmailInfo</servlet-name>
<url-pattern>/RecieveEmailInfo</url-pattern>
</servlet-mapping>
<resource-ref>
Outgoing Queue
<res-ref-name>jms/queue/outgoing</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Java Code:
String queueName = "queue/outgoing";
queue = (javax.jms.Queue) jndiContext.lookup(queueName);
Error:
[STDOUT] JNDI API lookup failed on queue/outgoing: javax.naming.NameNotFoundException: QueueConnectionFactory not bound
thx,
Neil -
2. Re: Messaging from servlet
npdavis Feb 16, 2004 3:26 PM (in response to npdavis)Turns out the QueueConnectionFactory became ConnectionFactory in JBoss JNDI.... when looking up context, I was specifying the old way.
Amazing. Old component still works after fixing this!
figured this out by getting frustrated, then walking away for a few, and referring to the Websphere price quote again. All better!!!