Hi,

I do have some code related to JMS in my stateless session, basically in one method I 
am dumping some info into queue and in the other method I am retrieving the 
information from the same queue. The sender part goes fine without any problems, but 
it is NOT retrieving any information in the receive method. Below is the complete 
information: 

JBoss version: jboss-3.0.4

QueueConntection factory userd: ConnectionFactory

The queue info is provided in the jbossmq-destinations-service.xml

With the bean, the resource ref are defined in the deployment descriptors as below in 
ejb-jar.xml

<transaction-type>Bean</transaction-type>
     <resource-ref>
        Default QueueFactory
        <res-ref-name>java:comp/env/jms/QueueConnectionFactory</res-ref-name>
        <res-type>javax.jms.QueueConnectionFactory</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
 

And as below in jboss.xml

<resource-ref>
     <res-ref-name>java:comp/env/jms/QueueConnectionFactory</res-ref-name>
     <jndi-name>ConnectionFactory</jndi-name>
</resource-ref>

the code is referring the connection factory as below:

queueConnectionFactory = (QueueConnectionFactory) 
envContext.lookup("ConnectionFactory");

which gets executed properly and the sending info is 

QueueSender queueSender = queueSession.createSender(userTaskSenderQueue);

queueSender.send(mapMessage);

queueSender.close();

and receive part is 

QueueSession queueSession = 
queueConnectionFactory.createQueueConnection().createQueueSession(false, 
Session.AUTO_ACKNOWLEDGE);

QueueReceiver queueReceiver = queueSession.createReceiver(userTaskSenderQueue);

Message receivedMsg = queueReceiver.receive();

 

But it goes in the hanged stage when we call the receive method, I am not sure whether 
message is posted into the queue or not and whether the problem is to do with the 
receive method. 

Your help is highly appreciated!

Thanks,
Arshad


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3842013#3842013

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3842013


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to