Bugs item #501972, was opened at 2002-01-10 11:04
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=501972&group_id=22866

Category: JBossMX
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Corby (corby)
Assigned to: Juha Lindfors (juhalindfors)
Summary: Messages can not be resent

Initial Comment:
When a message is received from a queue, if it is 
placed in another queue, acknowledgement of the 
message will fail. This occurs in JBoss 2.4.4-Catalina 
on Windows 2000.

The following code fragment replicates the problem. 
mapMessage is a message that was received from a queue.

queueConnection = JMSHelper.getQueueConnection( 
JMSHelper.NONXA_CONNECTION_FACTORY );
queueSession = JMSHelper.getQueueSession( 
queueConnection );
queueSender = JMSHelper.getQueueSender( queueSession, 
JMSHelper.FAILED_ALLOCATIONS_QUEUE );

queueConnection.start();
queueSender.send( mapMessage );

With this code, the message is forwarded into the new 
queue, but acknowledgement fails. When JBoss is 
restarted, the message will be delivered.

Acknowlegement will succeed when I manually copy the 
message, like so:

queueConnection = JMSHelper.getQueueConnection( 
JMSHelper.NONXA_CONNECTION_FACTORY );
queueSession = JMSHelper.getQueueSession( 
queueConnection );
queueSender = JMSHelper.getQueueSender( queueSession, 
JMSHelper.FAILED_ALLOCATIONS_QUEUE );
                                
// NOTE: I am copying this message because of a bug in 
the current version
// of JBossMQ. In future versions, we should be able 
to forward the message
// without copying it.
MapMessage sentMessage = JMSHelper.createMapMessage( 
queueSession );

sentMessage.setString( ACCOUNTING_LOCATION_NUMBER, 
mapMessage.getString( ACCOUNTING_LOCATION_NUMBER ));
sentMessage.setString( DIRECTION_OF_FLOW, 
mapMessage.getString( DIRECTION_OF_FLOW ));
sentMessage.setLong( BEGIN_PRODUCTION_TIME, 
mapMessage.getLong( BEGIN_PRODUCTION_TIME ));
sentMessage.setLong( END_PRODUCTION_TIME, 
mapMessage.getLong( END_PRODUCTION_TIME ));

queueConnection.start();
queueSender.send( sentMessage );

Peter claimed at the beginning of November that this 
problem had been fixed in CVS:
http://www.jboss.org/forums/thread.jsp?
forum=48&thread=3789&message=254709

However, subsequent build of the system, including the 
JBoss 2.4.4-Catalina distribution, continue to have 
this problem.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=501972&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to