[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
|
- From: se.schneider@xxxxxxx (Sebastian Schneider)
- Date: Thu, 20 Nov 2008 13:55:49 +0000 (UTC)
- Newsgroups: eclipse.technology.ecf
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi Scott,
Thanks for the tip with the server version. I have used the version 5.1
and changed it to 3.1.
So, your ActiveMQJMSServer works and connect to my ActiveMQ broker.
~
Adding new client: tcp://localhost:61616/mytest on transport:
TcpTransportChannel: Socket[addr=/127.0.0.1,port=2051,localport=61616]
~
Scott Lewis wrote:
No...actually it's the right way, but it's not enough. That
is, prior
to creating the channel on the client, it's necessary to create a
corresponding channel (of the same name/id) on the server.
The reason
for this is that having a server container instance connected to the
activemq broker is not enough...because ECF multiplexes multiple
channels on top of the single connection.
So, on the ecf generic server...upon startup you should have
something
like this:
(get the server IContainer instance...via IContainerManager
service or
through some other means)
IChannelContainerAdapter channelContainerAdapter =
(IChannelContainerAdapter)cont.getAdapter(IChannelContainerAda
pter.class);
if(channelContainerAdapter != null){
ID channelID =
IDFactory.getDefault().createID(channelContainerAdapter.getCha
nnelNamespace(),"mytest");
IChannelListener listener = <create listener to display
received messages on the server>
IChannel serverChannel =
channelContainerAdapter.createChanne(channelID,listener,null);
...store server channel away for later usage for
sending from server...
The container connect to the broker, but the channelContainerAdapter is
null.
I don't know what I must do with the IContainerManager to get a container?!
Is it right? I'm confused.
IContainer c = ContainerFactory.getDefault().createContainer();
IContainer container = containerManager.getContainer(c.getID());
I need a very simple and complete example for my implementation.
My context:
I try to implement a bundle with some monitoring application.
They listen as subscriber on a channel/topic and send also message
backward to another channel/topic.
At the moment I have only a Activator.java.
Thanks
Sebastian
but actually, I see that this error message(ultimately coming
from activemq failure)
syncSendTimedOut: connection no longer OK
might mean that the ECF generic server is failing to actually
connect to the activemq broker...perhaps because of version
incompatibilities.
> I tried also your ActiveMQJMSServer application with the
"ActiveMQ JMS Server.launch" configuration, but I get also an
error with this [6] log message.
> My ActiveMQ "Broker" log following message:ERROR
TransportConnector - Could not accept connection : Wire
format negotiation timeout: peer did not send his wire format.
>
> Have you an idea or tip where my problem is?
>
I suspect that there are two problems. The first (and hardest) is
getting the ecf jms generic server (which is actually an activemq
*client* when it connects to the activemq broker) to create a proper
connection to the broker. I suspect that this:
My ActiveMQ "Broker" log following message:ERROR
TransportConnector - Could not accept connection : Wire
format negotiation timeout: peer did not send his wire format.
Which you got in response to the *ecf server/jms client* attempt to
connect to the broker. My guess is that this is some version
incompatibility across activemq versions (i.e. on the ecf generic
server/jms client...which uses the activemq3.1m5) and the activemq
broker that you are using (I don't know what version you are
using). So
we'll have to figure this out by getting some sort of version
compatiblity (through same/similar activemq versions on broker and on
ecf servers and clients). If you can let me know what version of the
broker you are using, I will look into forward porting ECF generic
server and clients to something compatible with that (i.e. 4.0 or etc)
Then we have the missing code on the server (creating the
channel as I
described above). This will be relatively easy to fix once
we get the
connection problem worked out with activemq.
So please let me know which version of activemq you are using for the
broker, and I'll see about getting/updating the ecf activemq generic
server and client with something compatible.
Thanks much for patience. We'll work this out, but due to
the length of
time we have not updated activemq I think we'll need to deal
with this
buy forward porting things.
Scott