ApacheMQ Provider [message #1016807] |
Thu, 07 March 2013 18:11  |
Robert Onslow Messages: 13 Registered: April 2010 |
Junior Member |
|
|
Phew. Can't get ApacheMQ to work.
I start ApacheMQ 5.3.2 on localhost at 61616
Then I start ActiveMQ JMS Server from org.eclipse.ecf.provider.jms.activemq pointing at tcp://localhost:61616/uk-co-xlegal-liveshow-annotation?wireFormat.maxInactivityDuration=0&wireFormat.maxInactivityDurationInitalDelay=10000
No logging of any connection
Next I get a container and connect it - but no connection is logged at ApacheMQ, nor is any containerconnectedevent generated
I suspect that neither the server nor the client is connecting. I suspect that I am missing a step here.
Any ideas?
IContainer container = manager.getContainerFactory().createContainer("ecf.jms.activemq.tcp.client", new Object[]{"tcp://localhost:61616/uk-co-xlegal-liveshow-annotation?wireFormat.maxInactivityDuration=0", "1000000"});
final ISharedObjectContainer soc = (ISharedObjectContainer) ((IAdaptable) container).getAdapter(ISharedObjectContainer.
soc.addListener(new IContainerListener() {
@Override
public void handleEvent(
IContainerEvent event) {
System.out.println(event.getClass().getName());
if (event instanceof IContainerConnectedEvent)
try {
ISharedObjectManager manager = soc.getSharedObjectManager();
admin = new DistributedEventAdmin(context);
ID id1 = IDFactory.getDefault().createStringID("uk.co.xlegal.xbundle3.remote");
Properties props = new Properties();
props.put(EventConstants.EVENT_TOPIC, "uk_co_xlegal_xbundle3_remote");
manager.addSharedObject(id1, (ISharedObject) admin, props);
((DistributedEventAdmin) admin).start();
} catch (Exception e) {
Log.log(Log.ERROR, e.getMessage());
}
}
});
ID targetId = IDFactory.getDefault().createID(container.getConnectNamespace(), container.getID().getName());
container.connect(targetId, null);
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01875 seconds