You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by ericnygma <pr...@gmail.com> on 2007/09/06 13:01:41 UTC
Finding services deployed in JBIContainer from within an SE
Hi,
I have written a simple SE, and a SU/SA and installed/deployed them into
Servicemix.
In the Endpoint impl class inside the SE, I have code such as :
String installRoot =
getServiceUnit().getComponent().getComponentContext().getInstallRoot();
System.out.println(" The install root of the ComponentContext = " +
installRoot);
ComponentContextImpl ctximpl = (ComponentContextImpl)
getServiceUnit().getComponent().getComponentContext();
JBIContainer jbi = ctximpl.getContainer();
System.out.println("The JBI Container = " + jbi.getName() + ", " +
jbi.getDescription());
This way I have access(seem to) the JBIContainer in which my SE resides.
I need my SE to send a message to any of the deployed services on
servicemix.Say I have servicemix-file BC, with an associated SU/SA.The
xbean.xml has servicename as QName = {http://myproj}myFileWrite . And I want
my simple SE to become aware of the existence of the
{http://myproj}myFileWrite service.
Can someone please provide me pointers how to do this programmatically
inside my SE.
Thank you,
Eric.
--
View this message in context: http://www.nabble.com/Finding-services-deployed-in-JBIContainer-from-within-an-SE-tf4391281s12049.html#a12519937
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Finding services deployed in JBIContainer from within an SE
Posted by Nodet Guillaume <gn...@gmail.com>.
Try the following:
http://java.sun.com/integration/1.0/docs/sdk/api/javax/jbi/
component/ComponentContext.html#getEndpoints(javax.xml.namespace.QName)
You should not have to grab a refernce to the jbi container to do that.
Just use the ComponentContext.
On Sep 6, 2007, at 1:01 PM, ericnygma wrote:
>
> Hi,
>
> I have written a simple SE, and a SU/SA and installed/deployed them
> into
> Servicemix.
>
> In the Endpoint impl class inside the SE, I have code such as :
>
> String installRoot =
> getServiceUnit().getComponent().getComponentContext().getInstallRoot
> ();
> System.out.println(" The install root of the ComponentContext = " +
> installRoot);
> ComponentContextImpl ctximpl = (ComponentContextImpl)
> getServiceUnit().getComponent().getComponentContext();
> JBIContainer jbi = ctximpl.getContainer();
> System.out.println("The JBI Container = " + jbi.getName() + ", " +
> jbi.getDescription());
>
> This way I have access(seem to) the JBIContainer in which my SE
> resides.
> I need my SE to send a message to any of the deployed services on
> servicemix.Say I have servicemix-file BC, with an associated SU/SA.The
> xbean.xml has servicename as QName = {http://myproj}myFileWrite .
> And I want
> my simple SE to become aware of the existence of the
> {http://myproj}myFileWrite service.
>
> Can someone please provide me pointers how to do this programmatically
> inside my SE.
>
> Thank you,
> Eric.
> --
> View this message in context: http://www.nabble.com/Finding-
> services-deployed-in-JBIContainer-from-within-an-SE-
> tf4391281s12049.html#a12519937
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/