activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uma...@comcast.net
Subject Re: Problems with VM transport
Date Mon, 26 Mar 2007 19:11:04 GMT

Adrian,

Thanks for the note. 

      > >    Startup:   vm://localhost
      > >    During runtime (after an event): 
      > >            failover(vm://localhost,tcp://remote:61616)
      > >
      > >   Would modifying the broker URL of the connection factory cause problems?
       > >   
        > Personally, I'm not sure if you can I haven't tried it, but I don't 
        > think it makes sense to make a vm transport failover. The assumption is 
        > that you have a broker running in the same vm as your jms client. If the 
        > broker crashes, it means your client *should* have crashed also and it 
        > can't failover over to a remote broker anymore.

Makes sense - now I see why someone else referred to me as 'retard' :-).
 I need to have the client listen to two different brokers (the embedded
and the external) at the same time (so that the client receives messages published
by both the brokers and the messages published by the client are sent to both the
brokers).  Is this the correct URI to network the embedded broker with an external broker?

            static:(vm://localhost,tcp://remotehost:61616)


Could you also clarify an additional question? If I instantiate multiple
connection factories in the same VM pointing to the embedded broker
would all the cconnection factories in the VM share the same broker
(as opposed to attempting to "instantiating a new embedded broker" if 
such a thing were possible)?

Thanks again,

/U

 -------------- Original message ----------------------
From: Adrian Co <aco@exist.com>
> uma_rk@comcast.net wrote:
> > Hello...
> >
>  > I have a couple of basic questions on ActiveMQ. I would appreciate any hits as

> I am stuck.
> >
> > I am using ActiveMQ 4.1 with JDK6.
> >
> > 1) When I use an embedded broker with vm transport (vm://localhost)
> > the instantiation of my Spring SimpleMessageListenerContainer
> > always fails with a JournalLockedException.
> >
> > What does this exception mean exactly? I understand this has something to do 
> with 
> > persistance of message (since that is on by default). While I do not 
> > care to enable persistance and would like to turn it off, I would still
> > like to understand what causes this exception:
> >
> > org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'DmmStartupMessageListener' defined in class path resource 
> [contexts/bus/DmsStandardSubscriptions.xml]: Invocation of init method failed; 
> nested exception is java.lang.NoClassDefFoundError: 
> org/apache/activeio/journal/active/JournalLockedException
> > Caused by:
> > java.lang.NoClassDefFoundError: 
> org/apache/activeio/journal/active/JournalLockedException
> >         at 
> org.apache.activemq.broker.BrokerService.createPersistenceFactory(BrokerService.
> java:1328)
> >         at 
> org.apache.activemq.broker.BrokerService.getPersistenceFactory(BrokerService.jav
> a:544)
> >         at 
> org.apache.activemq.broker.BrokerService.createPersistenceAdapter(BrokerService.
> java:1320)
> >         at 
> org.apache.activemq.broker.BrokerService.getPersistenceAdapter(BrokerService.jav
> a:631)
> >         at 
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1
> 250)
> >         at 
> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
> >         at 
> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
> >         at 
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
> >         at 
> org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTranspo
> rtFactory.java:113)
> >         at 
> org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory
> .java:52)
> >         at 
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:4
> 3)
> >         at 
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:77)
> >         at 
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnection
> Factory.java:227)
> >
> >
> > 2) Which jarfile contains the exception class  
> org/apache/activeio/journal/active/JournalLockedException?
> >
> > 3) How do I use an embedded broker without persistance?
> >
> > The URL
> >
> >     vm://localhost?persistant=false
> >
> > fails with an exception that says that the    option is illegal.
> >
> > 4) Once the broker is up, could I dynamically (programmatically) change the
> > broker URL by augmenting the broker URL with a failover URL as follows?
> >
> >    Startup:   vm://localhost
> >    During runtime (after an event): 
> >            failover(vm://localhost,tcp://remote:61616)
> >
> >   Would modifying the broker URL of the connection factory cause problems?
> >   
> Personally, I'm not sure if you can I haven't tried it, but I don't 
> think it makes sense to make a vm transport failover. The assumption is 
> that you have a broker running in the same vm as your jms client. If the 
> broker crashes, it means your client *should* have crashed also and it 
> can't failover over to a remote broker anymore.
> 
> > Thanks,
> >
> > /U
> >
> > !DSPAM:507,4606f652307602068143078!
> >
> >   
> 


Mime
View raw message