git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

connections


Hi,
Could anyone correct me if I am doing anything wrong here.


 p= new ActiveMQConnectionFactory() ; 
 connection1 = p->createConnection(xy,yz); 
 connection1->start(); 


 q= new ActiveMQConnectionFactory() ; 
 connection2 = q->createConnection(xy,yz); 
 connection2->start(); 

 r= new ActiveMQConnectionFactory() ; 
 connection3 = r->createConnection(xy,yz); 
 connection3->start(); 

send and recv messages

The cable is unplugged for some time which breaks the communication and
close function is called. 
 connection1->close(); 
 connection2->close(); 
 connection3->start(); 

after certain delay i try to reestablish connection in code as below

 p1= new ActiveMQConnectionFactory() ; 
 connection4 = p1->createConnection(xy,yz); 
 connection4->start(); 


 q1= new ActiveMQConnectionFactory() ; 
 connection5 = q1->createConnection(xy,yz); 
 connection5->start(); 

Cable is plugged back so communication should be established but the issue
here is I end up in 
exception in 
void IOTransport::fire(decaf::lang::Exception& ex) 

with error message An unspecified error has occurred.

I am not using failover and have these setting in tcp broker 
connnection.closeTimeout=100&wireFormat.maxInactivityDurationInitalDelay=3000

Can i do this? what is that i am doing wrong? what is best way to fix this?




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html