You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sgomezsaez <sg...@hotmail.com> on 2012/12/04 20:24:44 UTC

Servicemix SQL Support - JDBC

Hi,
I'm using ServiceMix 4.3 as an intermediate component between the
application and the database system. But before I have some questions after
making some research on the main support it provides for both the
application and the database :

- I've read that there is no JDBC Binding Component available for the
version 4.3 (is it still not available?), but I've seen that there is a
simple JDBC BC for the version 3.x, has anyone deployed this one in the
version 4.x successfully? 

- If there is no possibility to use some existing JDBC BC, I'm planning to
either try to implement a JDBC BC or to wrap the JDBC functionalities and
libraries in an OSGI bundle, but my question is the following: my
application has to connect to the ESB via jdbc:sql or jdbc:* protocol, so in
the ESB I think I have to somehow simulate an sql server to accept the
incoming connections from the application and wire it either through the
jdbc library in the OSGI bundle or the JDBC BC, to the database. Do you
think this is possible? In case I use the OSGI bundle for the database
connection, is the OSGI bundle for sql databases already wrapped in a
repository?

Thanks a lot in advance




--
View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-SQL-Support-JDBC-tp5715145.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Servicemix SQL Support - JDBC

Posted by Johan Edstrom <se...@gmail.com>.
Look again.

On Dec 5, 2012, at 7:07 AM, sgomezsaez <sg...@hotmail.com> wrote:

> Hi,
> Thanks for the info. I've already taken a look at the camel components which
> give support for both jdbc and sql, but I've seen that both of the
> components support only producer endpoints (cannot use them in a from
> statement), which is actually what I need. Do you know if there is a
> component which may support the sql calls in a consumer endpoint?? or is it
> not possible?? (I've though about using a tcp consumer endpoint, but I'm not
> sure if It will work with my use case)
> Thanks in advance.
> 
> Regards,
> 
> Santiago
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-SQL-Support-JDBC-tp5715145p5715158.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix SQL Support - JDBC

Posted by sgomezsaez <sg...@hotmail.com>.
Hi,
Thanks for the info. I've already taken a look at the camel components which
give support for both jdbc and sql, but I've seen that both of the
components support only producer endpoints (cannot use them in a from
statement), which is actually what I need. Do you know if there is a
component which may support the sql calls in a consumer endpoint?? or is it
not possible?? (I've though about using a tcp consumer endpoint, but I'm not
sure if It will work with my use case)
Thanks in advance.

Regards,

Santiago



--
View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-SQL-Support-JDBC-tp5715145p5715158.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Servicemix SQL Support - JDBC

Posted by Johan Edstrom <se...@gmail.com>.
You don't want to use those....
Look at Camel.


On Dec 4, 2012, at 3:16 PM, sgomezsaez <sg...@hotmail.com> wrote:

> Hi,
> Thanks for the recommendation :). I will definitively then go for the osgi
> bundle choice. I'll let you know if I have any problems with loading the
> libraries. 
> 
> And about the second question, does ServiceMix or any library which can be
> used in it provide support for enabling a connection to ServiceMix using the
> jdbc:mysql protocol? Or the only way to connect to the esb is only by
> utilizing the existing binding components or camel supported protocols? The
> ones I've seen in camel are jdbc endpoints which connect the esb to a
> database, but I haven't seen available a "consumer" endpoint created by the
> camel component in the esb to which I can connect via jdbc:sql protocol. The
> flow I would like to configure is: Applicatiom -> JDBC ENDPOINT ("consumer"
> endpoint) -> NMR -> JDBC ENDPOINT ("producer" endpoint), or from the
> consumer endpoint contact the database using the jdbc wrapped in an OSGI
> bundle and return the result. 
> 
> Thanks and regards,
> 
> Santiago
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-SQL-Support-JDBC-tp5715145p5715148.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix SQL Support - JDBC

Posted by sgomezsaez <sg...@hotmail.com>.
Hi,
Thanks for the recommendation :). I will definitively then go for the osgi
bundle choice. I'll let you know if I have any problems with loading the
libraries. 

And about the second question, does ServiceMix or any library which can be
used in it provide support for enabling a connection to ServiceMix using the
jdbc:mysql protocol? Or the only way to connect to the esb is only by
utilizing the existing binding components or camel supported protocols? The
ones I've seen in camel are jdbc endpoints which connect the esb to a
database, but I haven't seen available a "consumer" endpoint created by the
camel component in the esb to which I can connect via jdbc:sql protocol. The
flow I would like to configure is: Applicatiom -> JDBC ENDPOINT ("consumer"
endpoint) -> NMR -> JDBC ENDPOINT ("producer" endpoint), or from the
consumer endpoint contact the database using the jdbc wrapped in an OSGI
bundle and return the result. 

Thanks and regards,

Santiago



--
View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-SQL-Support-JDBC-tp5715145p5715148.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Servicemix SQL Support - JDBC

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,


I would definitely not recommend you to start building a JDBC BC which is
JBI-based (cfr. warning at the top of
http://servicemix.apache.org/docs/4.4.x/jbi/index.html ;)).  If you can
make your database driver available as an OSGi bundle, you can probably use
any of the existing Camel components that deal with JDBC for your database
connectivity (have a look at http://camel.apache.org/components.html for
information on camel-sql, camel-jdbc, camel-mybatis, ...).  It can be a bit
tricky to get the JDBC stuff working in OSGi the first time around, but
once you're past that hurdle, it really pays off.  Just let us know if you
run into (usually classloading) issues with that initial database setup.


Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/


On Tue, Dec 4, 2012 at 8:24 PM, sgomezsaez <sg...@hotmail.com> wrote:

> Hi,
> I'm using ServiceMix 4.3 as an intermediate component between the
> application and the database system. But before I have some questions after
> making some research on the main support it provides for both the
> application and the database :
>
> - I've read that there is no JDBC Binding Component available for the
> version 4.3 (is it still not available?), but I've seen that there is a
> simple JDBC BC for the version 3.x, has anyone deployed this one in the
> version 4.x successfully?
>
> - If there is no possibility to use some existing JDBC BC, I'm planning to
> either try to implement a JDBC BC or to wrap the JDBC functionalities and
> libraries in an OSGI bundle, but my question is the following: my
> application has to connect to the ESB via jdbc:sql or jdbc:* protocol, so
> in
> the ESB I think I have to somehow simulate an sql server to accept the
> incoming connections from the application and wire it either through the
> jdbc library in the OSGI bundle or the JDBC BC, to the database. Do you
> think this is possible? In case I use the OSGI bundle for the database
> connection, is the OSGI bundle for sql databases already wrapped in a
> repository?
>
> Thanks a lot in advance
>
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Servicemix-SQL-Support-JDBC-tp5715145.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>