[JBoss Seam] - Re: Unable to use @Asynchronous annotation on Glassfish serv
by usedtoclimb
I tried putting an entry for both "Dispatcher" and "SystemManager" in web.xml but still get the same error. I don't understand why a web.xml entry would be necessary since timers run in the EJB container but I tried it just the same. Does the ejb-local-ref definition for the Dispatcher look correct? I'm just guessing on that one in both web.xml and ejb-jar.xml.
Here are the web.xml entries that I added:
<ejb-local-ref>
| <ejb-ref-name>mlm-ear-1.0/Dispatcher/local</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local>org.jboss.seam.core.LocalDispatcher</local>
| <ejb-link>Dispatcher</ejb-link>
| </ejb-local-ref>
|
| <ejb-local-ref>
| <ejb-ref-name>mlm-ear-1.0/SystemManagerBean/local</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local>com.el.mlm.SystemManager</local>
| <ejb-link>SystemManagerBean</ejb-link>
| </ejb-local-ref>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115593#4115593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115593
18 years, 3 months
[JBoss Messaging] - Re: Destruction/cleanup of temporary queues
by paduffy
The following test client confirms that simply closing a Connection will not delete any created temporary queues. Performed w/ JBM 1.3 and EAP 4.2. This example requires the consumer be closed and the temp Q explicitly deleted to cause removal of the temp Q. This conflicts with JEE JavaDoc, which states that closing the connection will remove temporary queues.
Further, if the connection is simply closed, the temp Q appears to be a permanent resource leak within the broker (confirmed w/ JNDIView).
Please advise. If the answer is "move to 1.4", please confirm that this issue is resolved in 1.4...I am unable to find any info in the JIRA.
package com.cisco.nm.comet.api.test;
|
| import javax.jms.Connection;
| import javax.jms.ConnectionFactory;
| import javax.jms.JMSException;
| import javax.jms.MessageConsumer;
| import javax.jms.MessageProducer;
| import javax.jms.Queue;
| import javax.jms.Session;
| import javax.jms.TemporaryQueue;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
|
| public class JMSTempQDelete
| {
| private static final String requestQueueName = "queue/cduRequestRouterQueue";
|
| public static void main(String args[])
| {
| try
| {
| // Get the JNDI context.
| //
| InitialContext ctx = new InitialContext();
|
| // Lookup the connection factory and create connection.
| //
| ConnectionFactory factory = (ConnectionFactory)ctx.lookup("ConnectionFactory");
| Connection connection = factory.createConnection();
|
| // Create the response session, temp reply Q, and response consumer.
| //
| Session responseSession = connection.createSession(false,
| Session.AUTO_ACKNOWLEDGE);
| TemporaryQueue responseQueue = responseSession.createTemporaryQueue();
| MessageConsumer consumer = responseSession.createConsumer(responseQueue);
|
| // JBM 1.3. It is neccessary to close consumer and explicitly
| // delete temp Q to remove the temp Q from the broker.
| //
| // This conflicts with info at http://java.sun.com/javaee/5/docs/api/ ...
| // "Closing a connection causes all temporary destinations to be deleted"
| //
| consumer.close();
| responseQueue.delete();
|
| connection.stop();
| connection.close();
| }
| catch (NamingException e)
| {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| catch (JMSException e)
| {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115592#4115592
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115592
18 years, 3 months