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.
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
>
>