You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro <na...@gmail.com> on 2013/02/18 13:05:00 UTC

please how set a datasource derby or mysql and add the jar for driver?

1) if i would connect to a datasource mysql or derby from tomee, how i have
to add the jars at tomee/lib ?
i copy into the tomcat/lib ?

2) i have also to add the names of the jars into catalina.properties?

3) example  of declaration of datasource into resource.xml? 
4) i put resource .xml into web-inf or into meta-inf ?

tank you mauro



--
View this message in context: http://openejb.979440.n4.nabble.com/please-how-set-a-datasource-derby-or-mysql-and-add-the-jar-for-driver-tp4660871.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: please how set a datasource derby or mysql and add the jar for driver?

Posted by mauro <na...@gmail.com>.
 

tank you for resposne .
But :

i put resource .xml into web-inf or into meta-inf ? 

mauro



--
View this message in context: http://openejb.979440.n4.nabble.com/please-how-set-a-datasource-derby-or-mysql-and-add-the-jar-for-driver-tp4660871p4660877.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: please how set a datasource derby or mysql and add the jar for driver?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

the best is to add drivers in tomee/lib (but it should work in the webapp)

resources.xml:

<resources>

<Resource id="jdbc/foo" type="DataSource">
   UserName = sa
   Password =
   JdbcUrl = ...
   JdbcDriver = ....
   ....
   JtaManaged = true
</Resource>

</resources>

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/2/18 mauro <na...@gmail.com>

> 1) if i would connect to a datasource mysql or derby from tomee, how i have
> to add the jars at tomee/lib ?
> i copy into the tomcat/lib ?
>
> 2) i have also to add the names of the jars into catalina.properties?
>
> 3) example  of declaration of datasource into resource.xml?
> 4) i put resource .xml into web-inf or into meta-inf ?
>
> tank you mauro
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/please-how-set-a-datasource-derby-or-mysql-and-add-the-jar-for-driver-tp4660871.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>