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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>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
> [EMAIL PROTECTED]
> 310-737-7835
>
>