You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by James Chamberlain <ja...@je.jfcom.mil> on 2006/05/08 18:09:27 UTC

Q. activemq embedded broker w/ spring

Hi,

I am trying to use activemq as an embedded jms broker within spring. I
would like to use vm only urls so that the jms server is not accessible
from outside of the vm. I am using activemq 3.2.3 and spring 1.2.7.


Here is how I am trying to start the embedded broker.

<bean id="broker" class="org.activemq.spring.BrokerFactoryBean">
	<property name="config" value="classpath:activemq.xml" />
</bean>
<bean id="connectionFactory"
class="org.activemq.ActiveMQConnectionFactory" >
		<property name="brokerURL" value="vm://localhost" />
</bean>


Every time I open a connection using the factory it creates a new
embedded broker (not really what I was expecting). It seems to only do
this when using the the "vm://localhost" style addresses. It this the
way it is supposed to be.


I would like to start one embedded broker and connection factory and
then have a number of consumers and producers use them. It seems like
this should be pretty easy to do, but it is not working correctly for
me. Can someone point me in the right direction?

Thanks,

James

Re: Q. activemq embedded broker w/ spring

Posted by Hiram Chirino <hi...@hiramchirino.com>.
This functionality works as your expecting in the 4.0 version of the
broker.  Please try it out with a recent release candidate or a
snapshot.

Regards,
Hiram

On 5/8/06, James Chamberlain <ja...@je.jfcom.mil> wrote:
> Hi,
>
> I am trying to use activemq as an embedded jms broker within spring. I
> would like to use vm only urls so that the jms server is not accessible
> from outside of the vm. I am using activemq 3.2.3 and spring 1.2.7.
>
>
> Here is how I am trying to start the embedded broker.
>
> <bean id="broker" class="org.activemq.spring.BrokerFactoryBean">
>         <property name="config" value="classpath:activemq.xml" />
> </bean>
> <bean id="connectionFactory"
> class="org.activemq.ActiveMQConnectionFactory" >
>                 <property name="brokerURL" value="vm://localhost" />
> </bean>
>
>
> Every time I open a connection using the factory it creates a new
> embedded broker (not really what I was expecting). It seems to only do
> this when using the the "vm://localhost" style addresses. It this the
> way it is supposed to be.
>
>
> I would like to start one embedded broker and connection factory and
> then have a number of consumers and producers use them. It seems like
> this should be pretty easy to do, but it is not working correctly for
> me. Can someone point me in the right direction?
>
> Thanks,
>
> James
>


--
Regards,
Hiram