-
1. Re: Sending message from Session Bean
frito Feb 10, 2003 3:23 AM (in response to bartvanriel)Hi,
your jboss.xml must have similar entries like this if you want to use JMS as a managed resource:
[pre]
<resource-manager>
<res-name>managedQueueConnectionFactory</res-name>
<res-jndi-name>java:JmsXA</res-jndi-name>
</resource-manager>
<resource-manager>
<res-name>managedQueue</res-name>
<res-jndi-name>queue/myQueue</res-jndi-name>
</resource-manager>
[/pre]
This is a simple mapping of the originial jndi namespace to the component namespace (managed this time).
You must use component namespace for lookup otherwise you will get the resource, but not managed.
[pre]
QueueConnectionFactory queueConnectionFactory =
(QueueConnectionFactory) jndiContext.lookup("java:comp/env/managedQueueConnectionFactory");
Queue queue = (Queue) jndiContext.lookup("java:comp/env/managedQueue");
[/pre]
Regards,
Frito