THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
ServiceMixClient client = new ServiceMixClientFacade(context); |
Using ClientFactory
Starting from 3.0-M3, you can retrieve a ClientFactory from JNDI.
Code Block | ||
---|---|---|
| ||
ClientFactory factory = new InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
ServiceMixClient client = factory.createClient();
...
client.close();
|
Note that creating client is somewhat expensive, so it's best to create a client once and reuse it.