You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Mark Lui <ml...@alodar.com> on 2006/05/06 02:15:57 UTC

Database(JDBC) Component

I have been taking a look at ServiceMix as a potential open source 
solution for integration.  One of the typical requirements for an 
integration is a database adapter.  I am not clear on what is considered 
the best current approach using ServiceMix.  A few possibilities are 
wrapping the JDBC communication as a Web Service, use Spring via the 
POJO support, or find an open source JDBC JCA resource adapter.  Any 
suggestions would be appreciated.

Thanks,

Mark

-- 

Mark Lui
mlui@alodar.com
310-737-7835


Re: Database(JDBC) Component

Posted by mlui <ml...@comcast.net>.
Simon,

I believe we both have a similar question --- what is consider the best or
right approach.  I think what is needed is a JDBC binding component.  I
believe this is the correct terminology since JDBC will connect to an
outside resource; however, JCA being called a service engine kind of threw
me.

So the question is:  Do I need to write a JDBC binding component that works
similar to say, the File service component, i.e. configurable via XML file,
etc. or it there another way with the currently available components?

Mark 
--
View this message in context: http://www.nabble.com/Database%28JDBC%29-Component-t1567256.html#a4275051
Sent from the ServiceMix - User forum at Nabble.com.


Re: Database(JDBC) Component

Posted by Simon Carni <sc...@siol.net>.
Hi Mark,
I'm nut sure if your use case is same as mine, but here is my idea anyway.
 Currently I'm working on a component that receives XML message containing 
business partner information, transforms it to BusinessPartner value object, 
stores that object in database and returns XML containig pk of added BP. 
Business logic (validation, transaction handling... ) already exists and is 
used in a webapp. I'd like to wrap it in a jbi component, to make it 
accessible for other apps. I'm planing to use TransformComponentSupport as a 
basis. Basicaly I'll have to create a class similar(!) to one below.
I'm not sure if this is the way to go, so comments and suggestions are 
welcome :-)

public class BPComponent extends TransformComponentSupport {

private si.scarni.bp.BPService service;

 protected boolean transform(MessageExchange exchange, NormalizedMessage in,
   NormalizedMessage out) throws MessagingException {
   // 1.transform in message to BP value object
   // 2. call service

   String pk  = service.addBP(bp);
  // 3 create output XML and set it on out message

   out.setContent(outXML);
  return true;
 }

Cheers,
Simon



"Mark Lui" <ml...@alodar.com> wrote in message 
news:445BEABD.3080507@alodar.com...
>I have been taking a look at ServiceMix as a potential open source solution 
>for integration.  One of the typical requirements for an integration is a 
>database adapter.  I am not clear on what is considered the best current 
>approach using ServiceMix.  A few possibilities are wrapping the JDBC 
>communication as a Web Service, use Spring via the POJO support, or find an 
>open source JDBC JCA resource adapter.  Any suggestions would be 
>appreciated.
>
> Thanks,
>
> Mark
>
> -- 
>
> Mark Lui
> mlui@alodar.com
> 310-737-7835
>
> 




Re: Database(JDBC) Component

Posted by dajevu <jd...@hireright.com>.
Yes, I believe a JDBC component would be extremely beneficial. As it stands
today, I was going to use some Groovy scripts to do my JDBC calls, but
having a simple component would be great!

jeff
--
View this message in context: http://www.nabble.com/Database%28JDBC%29-Component-t1567256.html#a4304886
Sent from the ServiceMix - User forum at Nabble.com.