You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by aviadLich <av...@gmail.com> on 2006/04/06 18:59:37 UTC

Disconnection problem

starting the broker on one computer and an agent on another
if the computers gets disconnected/broker fails
then the agent throws an exception and exits

is there any way to prevent the agetn from exiting ?!?!
and if there is can the agent save messages inmemory untill there is
connection again and then send them ?!?! 
--
View this message in context: http://www.nabble.com/Disconnection-problem-t1407111.html#a3788581
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Disconnection problem

Posted by aviadLich <av...@gmail.com>.
i am using amq 4.0 RC2
i currently ran the scenario on 2 windows xp pro (but i intend to do so with
fedora as well)
i couldnt get any logs on the agent side (this is were the disconnection
accurs).
i put a conf directory in the agent classpath - this is how the relevant
part of the classpath looks like:

set PRE_CLASSPATH=%ACTIVE_PATH%/log4j-1.2.12.jar;./conf

there i left only a the "log4j.properties" file (i removed the activemq.xml
file)
in the properties file i commented all the first section and uncommecnted
the following line:
log4j.rootLogger=DEBUG, out, stdout

the rest of the file remained untouched.

during the disconnection i didnt get any logs to stdout.
i dont have an exception listener in my code. 

>
rajdavies wrote:
> 
>>This is a useful scenario - what platform  are you on and which  
>>version of amq 4.0 are you using ?
>>Would it be possible to run your test again with debug logging on and  
>>post the log to the list ?
>>
>>cheers,
>>
>>Rob
>>On 9 Apr 2006, at 09:10, aviadLich wrote:
>>
>>>
>>>i have seen the link you sent. Thanks for the quick replay
>>> trying it it didnt really work.
>>> i created a ConnectionFactory with the parameter
>>> "failover:tcp://192.168.1.167:61616"
>>> new ActiveMQConnectionFactory("failover:tcp://192.168.1.167:61616");
>>> it did connect the broker for the first time and put htere a  
>>> message in the
>>> queue
>>>
>>> but after the disconnection (i unplagged the network cable of the  
>>> remote
>>> agent).
>>> the layer did exit !?!? (no exceptions this time)
>>> i should say that i dont want my agent to connect to another broker  
>>> i only
>>> want it to wait for the connection for the first broker
>>>
>>> --
>>> View this message in context: http://www.nabble.com/Disconnection- 
>>> problem-t1407111.html#a3826013
>>> Sent from the ActiveMQ - User forum at Nabble.com.
>>>
> 
> 
> 

--
View this message in context: http://www.nabble.com/Disconnection-problem-t1407111.html#a3842359
Sent from the ActiveMQ - User forum at Nabble.com.

Re: Disconnection problem

Posted by Rob Davies <ra...@gmail.com>.
This is a useful scenario - what platform  are you on and which  
version of amq 4.0 are you using ?
Would it be possible to run your test again with debug logging on and  
post the log to the list ?

cheers,

Rob
On 9 Apr 2006, at 09:10, aviadLich wrote:

>
> i have seen the link you sent. Thanks for the quick replay
> trying it it didnt really work.
> i created a ConnectionFactory with the parameter
> "failover:tcp://192.168.1.167:61616"
> new ActiveMQConnectionFactory("failover:tcp://192.168.1.167:61616");
> it did connect the broker for the first time and put htere a  
> message in the
> queue
>
> but after the disconnection (i unplagged the network cable of the  
> remote
> agent).
> the layer did exit !?!? (no exceptions this time)
> i should say that i dont want my agent to connect to another broker  
> i only
> want it to wait for the connection for the first broker
>
> --
> View this message in context: http://www.nabble.com/Disconnection- 
> problem-t1407111.html#a3826013
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Disconnection problem

Posted by aviadLich <av...@gmail.com>.
i have seen the link you sent. Thanks for the quick replay
trying it it didnt really work.
i created a ConnectionFactory with the parameter
"failover:tcp://192.168.1.167:61616"
new ActiveMQConnectionFactory("failover:tcp://192.168.1.167:61616");
it did connect the broker for the first time and put htere a message in the
queue

but after the disconnection (i unplagged the network cable of the remote
agent).
the layer did exit !?!? (no exceptions this time)
i should say that i dont want my agent to connect to another broker i only
want it to wait for the connection for the first broker

--
View this message in context: http://www.nabble.com/Disconnection-problem-t1407111.html#a3826013
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Disconnection problem

Posted by James Strachan <ja...@gmail.com>.
You seen this?

http://activemq.org/How+can+I+support+auto+reconnection


On 4/6/06, aviadLich <av...@gmail.com> wrote:
>
> starting the broker on one computer and an agent on another
> if the computers gets disconnected/broker fails
> then the agent throws an exception and exits
>
> is there any way to prevent the agetn from exiting ?!?!
> and if there is can the agent save messages inmemory untill there is
> connection again and then send them ?!?!
> --
> View this message in context: http://www.nabble.com/Disconnection-problem-t1407111.html#a3788581
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

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