[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.ecf] Re: Communication between OSGi/Equinox - JMS/ActiveMQ
|
Hi Sebastian,
Sebastian Schneider wrote:
Hey,
have someone a example to implement the communication between
OSGi/Equinox and JMS/ActiveMQ?
I've already imported the package org.eclipse.ecf.provider.jms and
activemq and found in the plug-in list the libaries for activemq
(activemq3.1M5) but my example doesn't found the libs nor can these import.
In my own copy of the org.eclipse.ecf.provider.jms.activemq bundle I
have the various jars referenced on the bundle classpath inside the lib
directory. Are these not present for you inside your project? I
checked on the CVS repository and they also seem to be there.
----
ActiveMQQueue queue = new ActiveMQQueue("Queue Test");
ActiveMQConnectionFactory factory = new
ActiveMQConnectionFactory("tcp://localhost:61616");
ActiveMQConnection connection = (ActiveMQConnection)
factory.createConnection();
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(queue);
producer.send(session.createTextMessage("Test"));
connection.close();
----
Have you any idea?
I need a short example for Queue(Sender/Receiver) and
Topic(Publisher/Subscriber) in OSGi Framework.
How I must to set up my OSGi bundle?
I'm not sure what is the problem you identify above (i.e. why the
activemq jars are not included).
As for the analog of what you have above within ECF...the parts dealing
strictly with JMS (i.e. not specific to ActiveMQ) are in:
org.eclipse.ecf.provider.jms.channel.AbstractJMSClientChannel
which is in the org.eclipse.ecf.provider.jms bundle
and the JMS-specific bits are in the sub-class
org.eclipse.ecf.provider.jms.activemq.container.ActiveMQJMSClientContainer.ActiveMQClientChannel
(which is an inner class inside ActiveMQJMSClientContainer) inside the
org.eclipse.ecf.provider.jms.activemq bundle.
The intention here is to separate the active-mq-specific stuff from the
JMS-generic stuff for session/topic setup, so that it is relatively easy
to create other providers based upon other JMS implementers. So, for
example, we have a Webshere JMS impl that is also based upon
org.eclipse.ecf.provider.jms. We would, of course, welcome other JMS
impls and if they want to use/reuse the org.eclipse.ecf.provider.jms to
create them that that is great.
Thanks,
Scott