On Sun, Mar 9, 2008 at 10:59 AM, jbx <[EMAIL PROTECTED]> wrote:
>
> I have gone through the tutorials and I think I have grasped some of the
> basic concepts of JBI. However I still feel a gap between the simple
> examples and usage of an ESB in an enterprise environment.
>
> I have a web application which exposes a set of webservices accessing
> functionality of various legacy or proprietrary platforms. The WSDL of these
> webservices is standard and cannot be changed. I wish to decouple the
> proprietrary functionality from the webservices themselves and it seems that
> having an ESB in place would be the ideal framework.
Can you provide more detail on what you mean by 'decouple the
proprietary functionality from the web services themselves'? I don't
understand what this means.
> The application currently runs inside tomcat and makes use of various other
> frameworks (JAAS, JAX-WS, JPA) so re-writing the whole application is not
> justifiable.
>
> I imagine that I would need to write any protocol-specific Binding
> Components according to the JBI framework to interact with the proprietrary
> protocols. However, it is not clear how I should go about the rest of the
> application framework.
Oh, so are you dealing with the use of proprietary protocols to access
the legacy systems?
> I would really appreciate some feedback and answers on the best way to do
> this. These are the obvious questions that come to my mind.
>
> Where is the best way for the business logic of the application to reside?
> The web service currently does some business logic (keeping track of
> requests in a database, etc.) before sending requests through the
> proprietrary protocols.
Well this depends on what you're trying to achieve. I usually
recommend that business logic be placed in POJOs so that it's
independent of anything that is technology specific and is reusable in
other places. Please provide some examples and more details about the
business logic.
> What is the best way for a client to use the services or binding components
> on the ESB? Is the RemoteServiceMixClient the right way? What is the easiest
> way to integrate the web service part to the different binding components.
How is your web application used today? I hazard a guess that there is
a browser-based interface for it. This can remain intact by just
changing the back end to use something like the ServiceMixClientFacade
to route messages directly to the NMR so it can send them along to the
proper services and endpoints.
> I tried to use the RemoteServiceMixClient but the documentation is not clear
> and I have seen conflicting examples on forums and mailing lists such as the
> following. Which is the right one that works on ServiceMix 3.2.1?
>
> RemoteServiceMixClient client = new
> RemoteServiceMixClient("tcp://localhost:61616");
> RemoteServiceMixClient client = new
> RemoteServiceMixClient("http://localhost:61616");
>
> Is this a good way to access the services available on the ESB after all?
Yes, the remote client is a good way to access the ServiceMix ESB from
inside of a web application. The RemoteServiceMixClient starts up an
embedded broker that is a peer to the local JBI container that it
starts up. Then the local JBI container connects to the remote JBI
container over the JMS flow and the URI you pass to the
RemoteServiceMixClient constructor. The URI you pass to the
constructor needs to use a transport connector type that is already
configured and available in the remote JBI container's embedded
ActiveMQ instance.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&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/