You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "vs.souza" <vs...@gmail.com> on 2012/02/17 13:58:49 UTC

MySQL OSGi Bundle

Hello fellows.

I am adding MySQL support to my camel routes in servicemix (to work with
JPA) and found this tutorial to generate a bundle from mysql connector
driver:

http://wiki.eclipse.org/Create_and_Export_MySQL_JDBC_driver_bundle

Do you think that is a good practice to add the MySQL connector as a bundle
and do you see any problems that I may face following this approach?

Cheers.

--
View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5492390.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: MySQL OSGi Bundle

Posted by "vs.souza" <vs...@gmail.com>.
Great. Thanks for the reply. I tought Aries was a package with enterprise
services to install. Good to know that it is already available in
ServiceMix. :-)

Thanks for the help again. :-)

--
View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5506280.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: MySQL OSGi Bundle

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

sorry for the late answer.

In fact, Aries is already shipped in ServiceMix, as Aries is part of the 
Karaf enterprises features. For instance, you can install transaction, 
jpa, jndi, etc features in ServiceMix, and it installs the corresponding 
Aries features.

Regards
JB

On 02/17/2012 06:47 PM, vs.souza wrote:
> I will try to use the Datasource provided by the MySQL DB driver. Thank you
> very much Christian.
>
> Another question is if anyone has tried to use Apache Aries with ServiceMix
> successfully. Do we have anyone that tried to use it?
>
> Thank you very much, guys.
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5493341.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: MySQL OSGi Bundle

Posted by "vs.souza" <vs...@gmail.com>.
I will try to use the Datasource provided by the MySQL DB driver. Thank you
very much Christian.

Another question is if anyone has tried to use Apache Aries with ServiceMix
successfully. Do we have anyone that tried to use it?

Thank you very much, guys.

--
View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5493341.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: MySQL OSGi Bundle

Posted by Christian Schneider <ch...@die-schneider.net>.
Try to use the datasource provided by the db driver. That worked very 
well for me and I did not have to tweak any class loading.

Christian

Am 17.02.2012 16:16, schrieb vs.souza:
> Thanks for the fast reply.
>
> I read a lot of posts in other topics about creating a bundle fragment and
> some other topics told about creating a JDBC Service. Which approach do you
> recomend?
>
> Cheers.
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5492861.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: MySQL OSGi Bundle

Posted by "vs.souza" <vs...@gmail.com>.
Thanks for the fast reply.

I read a lot of posts in other topics about creating a bundle fragment and
some other topics told about creating a JDBC Service. Which approach do you
recomend?

Cheers.

--
View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5492861.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: MySQL OSGi Bundle

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

the problem is not around the JDBC driver itself (it's very easy to wrap 
it as a bundle, or use the wrap protocol).

The problem is more the way the you load (you or a JPA framework such 
Hibernate) the driver.

For instance, Class.forName() depends from which classloader, Thread 
context class loader is most of the time a better approach in OSGi.

Regards
JB

On 02/17/2012 01:58 PM, vs.souza wrote:
> Hello fellows.
>
> I am adding MySQL support to my camel routes in servicemix (to work with
> JPA) and found this tutorial to generate a bundle from mysql connector
> driver:
>
> http://wiki.eclipse.org/Create_and_Export_MySQL_JDBC_driver_bundle
>
> Do you think that is a good practice to add the MySQL connector as a bundle
> and do you see any problems that I may face following this approach?
>
> Cheers.
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/MySQL-OSGi-Bundle-tp5492390p5492390.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com