On 7/25/06, Anand K Kalyanasundaram <[EMAIL PROTECTED]> wrote:
Guillaume Nodet wrote:
> On 7/25/06, Anand K Kalyanasundaram <[EMAIL PROTECTED]> wrote:
>>
>> Hi Tim,
>> Thanks for the response. After posting that message, I looked at the
>> RemoteServiceMixClient code and realized that the URL must be an
>> ActiveMQ JMS transport URL (I may be wrong about the terminology), So I
>> changed the code to:
>>
>> public static ServiceMixClient getClient() throws Exception {
>> RemoteServiceMixClient rc= new
>> RemoteServiceMixClient("tcp://localhost:61616");
>> rc.init();
>> rc.start();
>>
>> return rc;
>> }
>>
>> public static void main(String args[]) throws Exception {
>> ServiceMixClient smc=getClient();
>> ComponentContext componentContext=smc.getContext();
>>
>> ServiceEndpoint[] sep=
>> componentContext.getEndpoints(null);
>> // No end points are returned after this step
>> }
>>
>> With this new code, the remote client starts an embedded container and
>> connects to the main servicemix container. The embedded container
>> crashes if I shutdown the main servicemix container. But it is not able
>> to query any service endpoints :-( I think I posted another message on
>> the mailing list regarding this, but got no response.
>
>
> Could you please explain your use case ?
> We are currently trying to build a better client api, maybe using jndi
or
> jmx,
> to have a cleaner integration in web apps. This api could also be used
> remotely,
> but we were more focused on jbi exchanges than querying endpoints.
>
Hi Guillaume,
Our usecase looks like this:
Clients: JSPs with java beans deployed in a webapp, standalone python
and java clients.
We are hoping that the client would query available endpoints for a
service and then use
a third agent to pick an endpoint to use.
Another solution which would avoid having to query endpoints outside of the
NMR is
to use a router (see the EIP component, or any other router like xslt,
drools or a hand written
one) so that this business logic would be inside the JBI bus. The web
application would just have
to send an exchange to a know JBI endpoint (the router).
Does it sound fine ?
The container is expected to
host common services
like message logging. Some services could be agents that mimic a
service. I am new to JBI,
so if you see something wrong with the way JBI is being used, please do
not hesitate to
criticize this model.
To be integrated with: services deployed as web services or otherwise.
These services
could be replicated and deployed in multiple JBI containers. The NMR in
containers are required to
be connected as one seamless NMR. I hope the last part can be achieved
by tweaking
the JMS provider.
Just use the clustering feature of ServiceMix. Using a jms or jca flow,
you can transparently cluster your NMRs so that they act as a single one.
Cheers,
Guillaume Nodet
Anand
> Cheers,
> Guillaume Nodet
>
>
> Anand
>>
>> Timothy High wrote:
>> > Hi,
>> >
>> > Did you get any answers to your question? I'm no expert on the
>> subject,
>> > but the one time I tried using the RemoteServiceMixClient, I
>> received a
>> > warning that you must call init() first. There also seems to be a
>> method
>> > called start() which makes a call to init(). You might want to try
>> using
>> > one of these methods.
>> >
>> > Tim.
>> >
>> > -----Original Message-----
>> > From: Anand K Kalyanasundaram [mailto:[EMAIL PROTECTED]
>> > Sent: Sunday, July 16, 2006 6:31 PM
>> > To: [email protected]
>> > Subject: RemoteServiceMixClient usage
>> >
>> > Hi,
>> > I am trying to create a remote client to the servicemix JBI
container.
>> > Is org.apache.servicemix.client.RemoteServiceMixClient the way to
>> do it?
>> >
>> > I tried the following piece of code:
>> >
>> > protected static ServiceMixClient getClient() throws Exception {
>> > return new
>> > RemoteServiceMixClient("rmi://localhost:1099/jmxrmi");
>> > }
>> >
>> > public static void main(String args[]) throws Exception {
>> > ServiceMixClient smc=getClient();
>> > ComponentContext componentContext=smc.getContext();
>> > // Component context returned is null!!!!
>> > }
>> >
>> > I get a null for the component context. I would appreciate any
>> pointers
>> > or code samples for this.
>> >
>> > Thanks.
>> > Anand
>> >
>> >
>>
>>
>