You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by youhaodeyi <yo...@gmail.com> on 2008/03/08 12:38:02 UTC

How can I write my business code in ServiceMix?

I have read some ServiceMix examples and found all the things done is based
on configuration. Take the basic as an example, there isn't a Java class in
this example. It includes some xml files. I wander which java classes do the
real job? Where can I get it? If I write my own business code, how can I let
clients invoke my business?
-- 
View this message in context: http://www.nabble.com/How-can-I-write-my-business-code-in-ServiceMix--tp15912835s12049p15912835.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How can I write my business code in ServiceMix?

Posted by Bruce Snyder <br...@gmail.com>.
On Sat, Mar 8, 2008 at 4:38 AM, youhaodeyi <yo...@gmail.com> wrote:
>
>  I have read some ServiceMix examples and found all the things done is based
>  on configuration. Take the basic as an example, there isn't a Java class in
>  this example. It includes some xml files. I wander which java classes do the
>  real job? Where can I get it? If I write my own business code, how can I let
>  clients invoke my business?

It depends on how you'd like to expose the business logic to the
clients. I always recommend writing business logic in POJOs so that it
can be reused anywhere. Once you have your POJOs, it's just a matter
of deciding which protocol to use to expose the business logic. You
can use the servicemix-cxf-bc/servicemix-cxf-se combination to expose
it via SOAP over HTTP as a web service or you could write a
servicemix-bean service to wrap your POJOs and then expose the
servicemix-bean service using any of the JBI compliant components.
Using servicemix-bean is more flexible because it decouples your
service from the protocol over which it is exposed even more than a
web service. So as I said, it's really a matter of deciding which
protocol you'd like to use to expose the service to the clients.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/