You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by anas4120 <an...@yahoo.fr> on 2012/02/20 17:08:45 UTC

Internal VM ActiveMQ Broker

I need to configure an internal VM ActiveMQ broker
My openejb.xml:
....
<Resource id="BrokerActiveMQResourceAdapter" type="ActiveMQResourceAdapter">
	BrokerXmlConfig =
*broker:(vm://localhost?waitForStart=10000&amp;brokerConfig=xbean:file:///<my
conf path>/activemq.xml)*
	ServerUrl =
*vm://localhost?waitForStart=10000&amp;brokerConfig=xbean:file:///<my conf
path>/activemq.xml*
</Resource>
.....

But it seems not work. 
Any idea ?


--
View this message in context: http://openejb.979440.n4.nabble.com/Internal-VM-ActiveMQ-Broker-tp4404421p4404421.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Internal VM ActiveMQ Broker

Posted by AndyG <an...@orprovision.com>.
That looks more like a firewall issue to me, turn off your firewall to test
that. Anyway, here is my configuration (Also with alternative JDBC) and a
list of jars that cover everything you are ever likely to need from ActiveMQ
(Note: I am using a tested 5.6 snapshot in production as it is very stable
and has some significant bug fixes - Make sure you check for duplicate jars
in [openejb]/lib):

activemq-core-5.6-SNAPSHOT.jar
activemq-protobuf-1.1.jar
activemq-ra-5.6-SNAPSHOT.jar
aopalliance-1.0.jar
commons-logging-1.1.1.jar
commons-net-2.2.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
kahadb-5.6-SNAPSHOT.jar
org.osgi.core-4.1.0.jar
slf4j-api-1.6.4.jar
slf4j-log4j12-1.6.4.jar
spring-aop-3.0.6.RELEASE.jar
spring-asm-3.0.6.RELEASE.jar
spring-beans-3.0.6.RELEASE.jar
spring-context-3.0.6.RELEASE.jar
spring-core-3.0.6.RELEASE.jar
spring-expression-3.0.6.RELEASE.jar
xbean-spring-3.9.jar

[openejb]/conf/openejb.xml - Snippet


[openejb]/conf/activemq.xml - Full


--
View this message in context: http://openejb.979440.n4.nabble.com/Internal-VM-ActiveMQ-Broker-tp4404421p4465484.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Internal VM ActiveMQ Broker

Posted by anas4120 <an...@yahoo.fr>.
I add spring libraries but, it seams not working, I have this:

2012-03-11 18:38:08,809 - ERROR - vemq.ra.ActiveMQEndpointWorker - Failed to
connect to broker [tcp://localhost:61616]: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused
javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
	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
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290)
	at
org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
	at java.net.Socket.connect(Socket.java:529)
	at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:436)
	at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:402)
	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
	at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
	... 8 more
2012-03-11 18:38:08,810 - ERROR - vemq.ra.ActiveMQEndpointWorker - Endpoint
will try to reconnect to the JMS broker in 30 seconds


--
View this message in context: http://openejb.979440.n4.nabble.com/Internal-VM-ActiveMQ-Broker-tp4404421p4464284.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Internal VM ActiveMQ Broker

Posted by David Blevins <da...@gmail.com>.
On Feb 20, 2012, at 8:08 AM, anas4120 wrote:

> I need to configure an internal VM ActiveMQ broker
> My openejb.xml:
> ....
> <Resource id="BrokerActiveMQResourceAdapter" type="ActiveMQResourceAdapter">
> 	BrokerXmlConfig =
> *broker:(vm://localhost?waitForStart=10000&amp;brokerConfig=xbean:file:///<my
> conf path>/activemq.xml)*
> 	ServerUrl =
> *vm://localhost?waitForStart=10000&amp;brokerConfig=xbean:file:///<my conf
> path>/activemq.xml*
> </Resource>
> .....

I've update the doc to show a valid internal broker setup using an activemq.xml file:

   openejb.staging.apache.org/jms-resources-and-mdb-container.html

I'm not exactly sure if I got the Spring library versions correct.  If I can get a "this worked for me", I'll go ahead and push those changes to the website.


-David