Queue Consumer and Failover setup

2009-11-02 Thread devylon

Hi,

i have setup my publishers to a queue with a failover connection
failover:(tcp://host1:61616,tcp://host2:61616)?randomize=true

in the monitoring and logfiles i can see how the messages are published
either
to host1 or host2. 

For the consumer i'm using the same failover connection. BUT what i see
is that the consumer is only connecting to one of the brokers, e.g. host1.
All messages sent to host2 are pending in the queue. 

How can i configure the consumer to connect to both brokers and consume both
queues ?

-- Ingo

-- 
View this message in context: 
http://old.nabble.com/Queue-Consumer-and-Failover-setup-tp26156637p26156637.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



activemq-ra ClassCastException after restart in glassfish v3

2010-03-18 Thread devylon

I deployed the activemq-ra-5.3.rar to glassfish v3. My MDB can now consume
jms messages from my
activemq broker. everything is fine, BUT when i restart my glassfish domain,
I get the folowing stacktrace: 

after restarting the activemq resource adapter and my application ear
everything is fine again. i tried both either using tcp://127.0.0.1:61616 or
failover:(tcp://127.0.0.1) as connection url.

[#|2010-03-18T11:59:37.053+0100|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=19;_ThreadName=Thread-1;|2010-03-18
11:59:37,052 ERROR |
org.apache.activemq.ra.ActiveMQEndpointWorker$1.pause(166) | Failed to
connect to broker [failover:(tcp://127.0.0.1:61616)]: Could not create
Transport. Reason: java.io.IOException: Transport scheme NOT recognized:
[failover]
javax.jms.JMSException: Could not create Transport. Reason:
java.io.IOException: Transport scheme NOT recognized: [failover]
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:245)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
at
org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:133)
at
org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:106)
at
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:92)
at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
Caused by: java.io.IOException: Transport scheme NOT recognized: [failover]
at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at
org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:204)
at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:79)
at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
... 7 more
Caused by: java.lang.ClassCastException:
org.apache.activemq.transport.failover.FailoverTransportFactory cannot be
cast to org.apache.activemq.transport.TransportFactory
at
org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201)
... 9 more
|#]
-- 
View this message in context: 
http://old.nabble.com/activemq-ra-ClassCastException-after-restart-in-glassfish-v3-tp27944076p27944076.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: activemq-ra ClassCastException after restart in glassfish v3

2010-03-18 Thread devylon

uu... you are right

i forgot that i also copied activemq.rar to the common glassfish modules
directory some weeks ago. i removed that directory and now everything is
fine again!

thanks for your help!!!




Gary Tully wrote:
> 
> That smells of a classloading issue, like the activemq jars are available
> to
> two different classloaders, or two different versions of the
> acrtivemq-core
> jar are available.
> Both of the referenced classes are from the same activemq-core jar and
> should only be resolved from the RAR. The jars should not be available on
> the system classpath or lib directory.
> Check the glassfish doco for RAR classloading rules to ensure you are
> doing
> the right thing.
> From the outside, it looks like a duplicate deployment of the
> activemq-core.jar so check for that.
> 
> On 18 March 2010 11:03, devylon  wrote:
> 
>>
>> I deployed the activemq-ra-5.3.rar to glassfish v3. My MDB can now
>> consume
>> jms messages from my
>> activemq broker. everything is fine, BUT when i restart my glassfish
>> domain,
>> I get the folowing stacktrace:
>>
>> after restarting the activemq resource adapter and my application ear
>> everything is fine again. i tried both either using
>> tcp://127.0.0.1:61616or
>> failover:(tcp://127.0.0.1) as connection url.
>>
>>
>> [#|2010-03-18T11:59:37.053+0100|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=19;_ThreadName=Thread-1;|2010-03-18
>> 11:59:37,052 ERROR |
>> org.apache.activemq.ra.ActiveMQEndpointWorker$1.pause(166) | Failed to
>> connect to broker [failover:(tcp://127.0.0.1:61616)]: Could not create
>> Transport. Reason: java.io.IOException: Transport scheme NOT recognized:
>> [failover]
>> javax.jms.JMSException: Could not create Transport. Reason:
>> java.io.IOException: Transport scheme NOT recognized: [failover]
>>at
>>
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>>at
>>
>> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:245)
>>at
>>
>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
>>at
>>
>> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
>>at
>>
>> org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:133)
>>at
>>
>> org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:106)
>>at
>> com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:92)
>>at
>>
>> com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
>>at
>>
>> com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
>> Caused by: java.io.IOException: Transport scheme NOT recognized:
>> [failover]
>>at
>>
>> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
>>at
>>
>> org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:204)
>>at
>>
>> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:79)
>>at
>>
>> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
>>... 7 more
>> Caused by: java.lang.ClassCastException:
>> org.apache.activemq.transport.failover.FailoverTransportFactory cannot be
>> cast to org.apache.activemq.transport.TransportFactory
>>at
>>
>> org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201)
>>... 9 more
>> |#]
>> --
>> View this message in context:
>> http://old.nabble.com/activemq-ra-ClassCastException-after-restart-in-glassfish-v3-tp27944076p27944076.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: 
http://old.nabble.com/activemq-ra-ClassCastException-after-restart-in-glassfish-v3-tp27944076p27944490.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.