You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by avin98 <av...@yahoo.com> on 2006/07/11 01:50:58 UTC

ActiveMQ 3.2.2 MDB and MessageListeners

I have a MDB which sends messages to a particular queue and listens on
another queue.
This happens iteratively for about 3 times, before a particular value on 1
of the queues triggers the MDB to return back.

public void onMessage(Message msg) {
        
        
        try {
            
                        
            new Service().runService();
            
            logger.info(" FINISHED MDB PROCESSING ");
            
            
            
        }
}


However while doing that I get the following error:

16:43:03,703 WARN  [TransportChannelSupport] Caught exception dispatching
messag
e and no ExceptionListener registered: javax.jms.JMSException: Error reading
soc
ket: java.net.SocketException: Connection reset
javax.jms.JMSException: Error reading socket: java.net.SocketException:
Connecti
on reset
        at
org.activemq.util.JMSExceptionHelper.newJMSException(JMSExceptionHelp
er.java:49)
        at
org.activemq.transport.tcp.TcpTransportChannel.doClose(TcpTransportCh
annel.java:513)
        at
org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChanne
l.java:330)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at java.io.DataInputStream.readByte(Unknown Source)
        at
org.activemq.io.AbstractWireFormat.readPacket(AbstractWireFormat.java
:230)
        at
org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChanne
l.java:313)
        ... 1 more

16:43:03,703 WARN  [BrokerContainerImpl] Got duplicate deregisterConnection
for
client: ID:aconcise-l1-1719-1152572738204-76:0
-- 
View this message in context: http://www.nabble.com/ActiveMQ-3.2.2-MDB-and-MessageListeners-tf1921600.html#a5261374
Sent from the ActiveMQ - User forum at Nabble.com.


Re: ActiveMQ 3.2.2 MDB and MessageListeners

Posted by James Strachan <ja...@gmail.com>.
Can you reproduce your problem on 4.0.2?

On 7/11/06, avin98 <av...@yahoo.com> wrote:
>
> I have a MDB which sends messages to a particular queue and listens on
> another queue.
> This happens iteratively for about 3 times, before a particular value on 1
> of the queues triggers the MDB to return back.
>
> public void onMessage(Message msg) {
>
>
>         try {
>
>
>             new Service().runService();
>
>             logger.info(" FINISHED MDB PROCESSING ");
>
>
>
>         }
> }
>
>
> However while doing that I get the following error:
>
> 16:43:03,703 WARN  [TransportChannelSupport] Caught exception dispatching
> messag
> e and no ExceptionListener registered: javax.jms.JMSException: Error reading
> soc
> ket: java.net.SocketException: Connection reset
> javax.jms.JMSException: Error reading socket: java.net.SocketException:
> Connecti
> on reset
>         at
> org.activemq.util.JMSExceptionHelper.newJMSException(JMSExceptionHelp
> er.java:49)
>         at
> org.activemq.transport.tcp.TcpTransportChannel.doClose(TcpTransportCh
> annel.java:513)
>         at
> org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChanne
> l.java:330)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.read(Unknown Source)
>         at java.io.BufferedInputStream.fill(Unknown Source)
>         at java.io.BufferedInputStream.read(Unknown Source)
>         at java.io.DataInputStream.readByte(Unknown Source)
>         at
> org.activemq.io.AbstractWireFormat.readPacket(AbstractWireFormat.java
> :230)
>         at
> org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChanne
> l.java:313)
>         ... 1 more
>
> 16:43:03,703 WARN  [BrokerContainerImpl] Got duplicate deregisterConnection
> for
> client: ID:aconcise-l1-1719-1152572738204-76:0
> --
> View this message in context: http://www.nabble.com/ActiveMQ-3.2.2-MDB-and-MessageListeners-tf1921600.html#a5261374
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: ActiveMQ 3.2.2 MDB and MessageListeners

Posted by Muzza <st...@amt-sybex.com>.
Hi Avin

I have the same scenario, did you find a solution to this problem ?

My MDB solution works away all day whilst the users are creating
transactions, but overnight I get the following error after about an hour of
inactivity :

2006-08-17 20:25:10,273 [MQ ShutdownHook] INFO  BrokerContainerImpl           
- ActiveMQ Message Broker (ID:cormorant-1897-1155831647073-0:0) is shutting
down
2006-08-17 20:25:10,273 [MQ ShutdownHook] INFO  BrokerContainerImpl           
- Removing client: ID:cormorant-1897-1155831647073-0:0_NetworkChannel on
transport: TcpTransportChannel:
Socket[addr=/127.0.0.1,port=1903,localport=61616]
2006-08-17 20:25:10,273 [localport=1903]] INFO  ActiveMQConnection            
- channel status changed: Channel: TcpTransportChannel:
Socket[addr=localhost/127.0.0.1,port=61616,localport=1903] has disconnected
2006-08-17 20:25:10,273 [MQ ShutdownHook] INFO  BrokerConnectorImpl           
- ActiveMQ connector stopped:
TcpTransportServerChannel@tcp://cormorant:61616
2006-08-17 20:25:10,273 [MQ ShutdownHook] INFO  BrokerConnectorImpl           
- ActiveMQ connector stopped:
VmTransportServerChannel@vm://ID:cormorant-1897-1155831647073-0:0
2006-08-17 20:25:10,273 [MQ ShutdownHook] INFO  BrokerContainerImpl           
- Removing client: ID:cormorant-1897-1155831647073-5:0 on transport:
VmTransportChannel: null
2006-08-17 20:25:10,273 [localport=1903]] WARN  TransportChannelSupport       
- Caught exception dispatching message and no ExceptionListener registered:
javax.jms.JMSException: Error reading socket: java.io.EOFException
javax.jms.JMSException: Error reading socket: java.io.EOFException
	at
org.activemq.util.JMSExceptionHelper.newJMSException(JMSExceptionHelper.java:49)
	at
org.activemq.transport.tcp.TcpTransportChannel.doClose(TcpTransportChannel.java:509)
	at
org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChannel.java:330)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
	at java.io.DataInputStream.readByte(Unknown Source)
	at
org.activemq.io.AbstractWireFormat.readPacket(AbstractWireFormat.java:230)
	at
org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChannel.java:313)
	... 1 more

Thanks,
Muzza.
-- 
View this message in context: http://www.nabble.com/ActiveMQ-3.2.2-MDB-and-MessageListeners-tf1921600.html#a5860816
Sent from the ActiveMQ - User forum at Nabble.com.