|
Re: Distributed Event Admin Problems [message #624991 is a reply to message #624990] |
Thu, 14 January 2010 18:39 |
Scott Lewis Messages: 1038 Registered: July 2009 |
Senior Member |
|
|
Hi Andrea,
Andrea Zoppello wrote:
> Hi all,
>
> I'm doing some test using ECF distributed Event Admin as described here
> ( http://wiki.eclipse.org/Distributed_EventAdmin_Service ).
>
> I'm trying to use the JMS ( ActiveMQ ) implementation. so i've done the
> following step:
>
> 1) I've downloaded and started active mq ( 5.3 )
> 2) Follow the instruction at eclipse wiki and installed the examples
> 3) Installed the jms provider from http://ecf1.osuosl.org/
> 4) try to run the examples.
>
>
> The Problems i've are:
>
> 1) I've an initial exception when trying to run the Event Admin server (
> activemq product ). This is not blocking, it seems this exception is
> raised but the code is working, i've see messages enqued and dequed from
> the AMQ console.
Yes. This is a non-fatal bug in ActiveMQ 5.2. I've reported this bug
here: https://issues.apache.org/activemq/browse/AMQ-2256
It's possible this may be fixed in a more recent release, but I have not
yet tried out something newer than 5.2.
<stuff deleted>
>
>
> 2) I've try to run two instance of the Event Admin server ( activemq
> product ), but this does not work because activemq is refusing my
> connection with this stacktrace:
>
> WARN | Failed to add Connection
> javax.jms.InvalidClientIDException: Broker: localhost - Client:
> tcp://localhost:
> 61616/exampleTopic already connected from /127.0.0.1:49513
> at org.apache.activemq.broker.region.RegionBroker.addConnection
> (RegionBr
> oker.java:216)
> at org.apache.activemq.broker.BrokerFilter.addConnection(Broker
> Filter.ja
> va:82)
> at org.apache.activemq.broker.BrokerFilter.addConnection(Broker
> Filter.ja
> va:82)
> at org.apache.activemq.advisory.AdvisoryBroker.addConnection(Ad
> visoryBro
> ker.java:77)
> at org.apache.activemq.broker.BrokerFilter.addConnection(Broker
> Filter.ja
> va:82)
> at org.apache.activemq.broker.MutableBrokerFilter.addConnection
> (MutableB
> rokerFilter.java:89)
> at org.apache.activemq.broker.TransportConnection.processAddCon
> nection(T
> ransportConnection.java:666)
> at org.apache.activemq.broker.jmx.ManagedTransportConnection.pr
> ocessAddC
> onnection(ManagedTransportConnection.java:83)
> at org.apache.activemq.command.ConnectionInfo.visit(ConnectionI
> nfo.java:
> 134)
> at org.apache.activemq.broker.TransportConnection.service(Trans
> portConne
> ction.java:297)
> at org.apache.activemq.broker.TransportConnection$1.onCommand(T
> ransportC
> onnection.java:175)
> at org.apache.activemq.transport.TransportFilter.onCommand(Tran
> sportFilt
> er.java:68)
> at org.apache.activemq.transport.WireFormatNegotiator.onCommand
> (WireForm
> atNegotiator.java:113)
> at org.apache.activemq.transport.InactivityMonitor.onCommand(In
> activityM
> onitor.java:210)
> at org.apache.activemq.transport.TransportSupport.doConsume(Tra
> nsportSup
> port.java:84)
> at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTran
> sport.jav
> a:203)
> at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransp
> ort.java:
> 185)
> at java.lang.Thread.run(Thread.java:619)
>
> This seems to be an activemq problem, but i'd like to see if anyone know
> how to solve.
There can be only one manager/server process associated with a given JMS
topic (in this case, the server being started is using the default
uri/topic...which is tcp://localhost:61616/exampleTopic
So if you want to create/start/run more than one server, all you need to
do is create/specify/use another topic...e.g.:
tcp://localhost:61616/myTopic
In the example server (i.e. the one in
org.eclipse.ecf.examples.remoteservices.hello.host), their is a command
line argument...e.g.:
-containerId tcp://localhost:61616/myTopic
that allows the server containerId to be specified on the command line
along with the container *type*...i.e.
-containerType ecf.jms.activemq.tcp.manager
If you look in the product configuration file:
/org.eclipse.ecf.examples.remoteservices.hello.host/products /Hello
Service Host (activemq).product
You will see that these Program Arguments are listed (on the Launching
tab of the product configuration editor):
-containerType ecf.jms.activemq.tcp.manager
-containerId tcp://localhost:61616/exampleTopic
You can/could easily just create a new product file, copied from the
existing one, and change the command line arguments to be (e.g.)
-containerType ecf.jms.activemq.tcp.manager
-containerId tcp://localhost:61616/myTopic
Or, you can have a completely different/new application (i.e. not this
HelloHostApplication, and specify the containerType and containerId any
way you like (via properties file, as program arguments, hardcoded into
the app, etc).
Scott
|
|
|
Powered by
FUDForum. Page generated in 0.05288 seconds