-
1. Re: Task-node execution & JMS problem
aguizar Jan 31, 2006 2:22 AM (in response to winjer)What's bound to the name jms? The connection factory, the queue...?
-
2. Re: Task-node execution & JMS problem
winjer Jan 31, 2006 6:01 AM (in response to winjer)It is the connection factory...
Actually there are two queues declared and one connection factory.As soon as it goes for the lookup of the connection factory in the JNDI, it throws the forementioned exception.
Do you think the problem comes from that there is only one connection factory?
I read somewhere that declaring the connectionfactory in the jboss-web.xml with the value java:/JmsXA indicates that this QueueConnectionFactory participates in distributed transactions. Does it have anything do to with it?
Thanks -
3. Re: Task-node execution & JMS problem
aguizar Feb 2, 2006 1:26 AM (in response to winjer)Did you change the name bound to the connection factory?
Note that the local factory is by default bound to ConnectionFactory whereas the XA factory is bound to XAConnectionFactory, best for remote JMS sessions. These factories correspond to the UIL2 invocation layer.
The counterparts in the java: namespace (java:ConnectionFactory and java:XAConnectionFactory) are bound by the fast in-VM invocation layer. -
4. Re: Task-node execution & JMS problem
winjer Feb 2, 2006 7:27 AM (in response to winjer)Alex thank you for your response.
Yes, i declare two names for the same connection factory and i have tried all the different combinations i could think of, but still i get the same error...javax.naming.NameNotFoundException: jms not bound
Here is the xdoclet code for the web.xml and jboss-web.xml,if you can get any ideas :)
That were the most probable settings to have worked i think... * @web.resource-ref * name="jms/TaskWaitingUserQueue" * type="javax.jms.Queue" * auth="Container" * * @web.resource-ref * name="jms/EvaluatedTasksQueue" * type="javax.jms.Queue" * auth="Container" * * @jboss.resource-ref * res-ref-name="jms/TaskWaitingUserQueue" * jndi-name="queue/TaskWaitingUserQueue" * * @jboss.resource-ref * res-ref-name="jms/EvaluatedTasksQueue" * jndi-name="queue/EvaluatedTasksQueue" * * @web.resource-ref * name="jms/MyXAQueueConnectionFactoryA" * type="javax.jms.QueueConnectionFactory" * auth="Container" * * @jboss.resource-ref * res-ref-name="jms/MyXAQueueConnectionFactoryA" * jndi-name="java:/JmsXA" * * @web.resource-ref * name="jms/MyXAQueueConnectionFactoryB" * type="javax.jms.QueueConnectionFactory" * auth="Container" * * @jboss.resource-ref * res-ref-name="jms/MyXAQueueConnectionFactoryB" * jndi-name="java:/JmsXA" ...
I am sure that the problem exists because the onMessage() method has not exited before the lookup is done again. I ve tried to set the session
in client-acknowledge modesession = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
and then acknowledge the message inside the onMessage():... TaskWaitingDTO task = (TaskWaitingDTO) obj; //End task of process instance that is waiting. String pid = task.getProcessID(); message.acknowledge(); ProcessExecution p = new ProcessExecution(); p.endTaskOfProcess(task); System.out.println("[TaskEvaluatedBean] now exiting.."); ...
..but that doesn't work either.
Please, if you have any ideas i d be more than thankful.. i m stack here since Sunday! -
5. Re: Task-node execution & JMS problem
winjer Feb 6, 2006 2:59 PM (in response to winjer)It finally worked!
The problem was that the jndi references to the JMS queue and factory should
have also been made at the MDB so as to be retrieved when the asynchronous execution thread would start ! With the X-Doclet like this :* @ejb.resource-ref * res-ref-name="jms/TaskWaitingUserQueue" * res-type="javax.jms.Queue" * res-auth="Container" * * @jboss.resource-ref * res-ref-name="jms/TaskWaitingUserQueue" * jndi-name="queue/TaskWaitingUserQueue" * * @ejb.resource-ref * res-ref-name="jms/MyXAQueueConnectionFactory" * res-type="javax.jms.QueueConnectionFactory" * res-auth="Container" * * @jboss.resource-ref * res-ref-name="jms/MyXAQueueConnectionFactory" * jndi-name="java:/JmsXA"
That was all.. :S