Matt DeHoust wrote:
Hello,
I have a situation where changes to data in a relational database table
need to propagate to other systems with some business
rules/transformations along the way. I have been unable to find any
examples in ServiceMix where components access a database via JDBC (or
Hibernate, etc.). I am new to ESB, so my conceptual understanding is
still forming. Can I use ServiceMix to put the messages onto the ESB if
they originate in a relational database? I realize I can implement a
POJO to access the database, but I'm wondering if there's a general
solution available in ServiceMix.
Right now there's the XSQL component which can be used to query/poll
databases turning results into XML and invoking them into the ESB to be
processed. We've also go the XSLT component which if you're using Xalan
it has some simple SQL tags inside.
Finally if you're using a Groovy script you can use Groovy SQL to query
from the database.
However we don't yet have a general purpose XML <-> SQL component.
FWIW what I'd really like is to use JAXB2 to auto-generate the POJOs
from an XSD/WSDL; then use something like hyperjaxb (or something like
it preferably for EJB 3 persistence the kinda JSR for hibernate-like
persistence engines). Then we'd have a good way to go from any XSD into
a good relational database model efficiently - using nice typed POJOs
(the most efficient representation for typed XML) and using all the
object-relational mapping features of tools like hibernate & toplink.
Another option is to create an SDO based component which polls the
database using some SQL mechanism, turning the results into an SDO which
knows how to turn itself into XML and back again etc.
Finally, we could integrate OpenAdaptor which has something similar to
it (http://openadaptor.org).
Which particular solution seems most appropriate to your needs?
--
James
-------
http://radio.weblogs.com/0112098/