You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Harbeer Kadian <ha...@altair.com> on 2010/04/06 16:33:51 UTC

deploying java application using JBI in servicemix

Hi,

I can list my requirement as follows.

We need to create a platform, which is a webservice implementation. It can
be invoked by any client outside servicemix. The client wants to invoke a
third web service using platform. Also at the same time, it wants to prevent
itself from creating boilerplate webservice client code.
So there are connector classes, which helps in creating the soap message
required for the third party webservices.

The platform work is to delegate call to the correct connector depending
upon which third party webservice need to be invoked by the client.

I developed this using OSGI as follows.
I created an OSGI bundle for platform. The platform webservice is deployed
using CXF.

I created seperate bundles for connectors. The connectors used camel-http
component to create dynamic soap message required for third party
webservice. Here all the calling between platform and connectors is through
java based method invocation.

Now we are seeing, if we can implement this solution using JBI also.

I have some questions.
1) Does JBI support normal java based invoking of methods like OSGI. I want
to keep the platform and connector seperate as the platform will be deployed
only once. But tomorrow if any new webservice we want to talk, then we have
to add a connector bundle for that also without hurting the platform code.

2) How JBI can be better than OSGI in this problem.

I am also attaching a image showing the requirement of the project in terms
of enterprise integration pattern components
http://old.nabble.com/file/p28152691/ExecuteOperation.png
ExecuteOperation.png .

The content based router is the platform which delegates the call to the
correct connector. The session manager keeps the instances of connectors
with it.

With Regards
Harbeer Kadian









-- 
View this message in context: http://old.nabble.com/deploying-java-application-using-JBI-in-servicemix-tp28152691p28152691.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: deploying java application using JBI in servicemix

Posted by Harbeer Kadian <ha...@altair.com>.
Hi,

I am briefly specifying what I understood from your reply
To add a custom java logic in JBI environment, there are two way
1) Create your own JBI component as per the JBI specifications. Expose your
business functions as
services. Use Message Infrastructure(Message Pattern according to WSDL 1.1)
to call any service.
2) Add you custom java logic artifacts inside servicemix-bean component.

Now lets say I have one servicemix-bean component having custom java logic
artifacts. And I have 
my own JBI component containing custom java logic.

How does the classes inside servicemix-bean component can access classes
inside the JBI component which I have created and vice-versa.

1)Will it be normal java method invocation as provided in OSGI, where you
receive the instances of other
classes using spring dynamic modules.
2)Will I have to create a custom XML message containing all information to
call a particular method inside a class which contains all information. And
may be in this case the object creation and calling of method will be
handled by the JBI Container.
Also creating custom XML message everytime, even if the requirement is a
simple java method call will not make the development effort more.

In other words i can say that,
In a simple application, we make jars for different functionalities, and we
keep all the jars in the classpath and run them on a single JVM. Here the
interaction between the classes is using java object binding. Thinking in
the same line, if these components are installed in service-mix as
servicemix-bean artifacts or custom JBI components, how the interaction
between different classes will take place.

If i will understand these things, I may get a pretty good idea how to use
servicemix using OSGI or JBI

With Regards
Harbeer Kadian





Jean-Baptiste Onofré wrote:
> 
> Hi Harbeer,
> 
> my comments inline:
> 
>> I have some questions.
>> 1) Does JBI support normal java based invoking of methods like OSGI. I
>> want
>> to keep the platform and connector seperate as the platform will be
>> deployed
>> only once. But tomorrow if any new webservice we want to talk, then we
>> have
>> to add a connector bundle for that also without hurting the platform
>> code.
> You have two ways to achieve this:
> - use servicemix-bean: this service engine uses a POJO/Bean to manage in 
> messages. You can deploy several servicemix-bean endpoints.
> -  you can create your own JBI component implementing the same business 
> logic as you made in OSGi.
> 
>> 
>> 2) How JBI can be better than OSGI in this problem.
> To be honest, I think that if you haven't big JBI requirements, the best 
> implementation is OSGi.
> I don't think that JBI is better than OSGi for your requirements.
> 
> Regards
> JB
> 
>> 
>> I am also attaching a image showing the requirement of the project in
>> terms
>> of enterprise integration pattern components
>> http://old.nabble.com/file/p28152691/ExecuteOperation.png
>> ExecuteOperation.png .
>> 
>> The content based router is the platform which delegates the call to the
>> correct connector. The session manager keeps the instances of connectors
>> with it.
>> 
>> With Regards
>> Harbeer Kadian
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/deploying-java-application-using-JBI-in-servicemix-tp28152691p28161477.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: deploying java application using JBI in servicemix

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Harbeer,

my comments inline:

> I have some questions.
> 1) Does JBI support normal java based invoking of methods like OSGI. I want
> to keep the platform and connector seperate as the platform will be deployed
> only once. But tomorrow if any new webservice we want to talk, then we have
> to add a connector bundle for that also without hurting the platform code.
You have two ways to achieve this:
- use servicemix-bean: this service engine uses a POJO/Bean to manage in 
messages. You can deploy several servicemix-bean endpoints.
-  you can create your own JBI component implementing the same business 
logic as you made in OSGi.

> 
> 2) How JBI can be better than OSGI in this problem.
To be honest, I think that if you haven't big JBI requirements, the best 
implementation is OSGi.
I don't think that JBI is better than OSGi for your requirements.

Regards
JB

> 
> I am also attaching a image showing the requirement of the project in terms
> of enterprise integration pattern components
> http://old.nabble.com/file/p28152691/ExecuteOperation.png
> ExecuteOperation.png .
> 
> The content based router is the platform which delegates the call to the
> correct connector. The session manager keeps the instances of connectors
> with it.
> 
> With Regards
> Harbeer Kadian
> 
> 
> 
> 
> 
> 
> 
> 
>