On 7/3/06, Renaud Bruyeron <[EMAIL PROTECTED]> wrote:
James Strachan wrote:
> The ServiceMixClient - if its dependency injected with a JBI container
> instance -

The doco does not explain how to do this: "inject the JBI container".
Most of the time I want to use the client I am inside a service unit
deployed to a component like lwcontainer or http - I do not know how to
get the reference to the container in the xbean.xml. I can do something
like ((ComponentContextImpl) getContext()).getContainer() but this is
ugly and wrong.

What's the best way to go about this?

If you are a component and have access to a component context then
just create a ServiceMixClientFacade which implements the
ServiceMixClient API.

ServiceMixClient client = new ServiceMixClientFacade(context);

I just added this snippet of code to the end of the web page...
http://servicemix.org/site/client-api.html
--

James
-------
http://radio.weblogs.com/0112098/

Reply via email to