You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2013/04/03 10:53:17 UTC

Persistence.xml and datasource for mysql

hi have put into web-inf dir the files resources.xml with the following
resource:

<Resource id="Mydb" type="DataSource">


    #  MySQL example
    #
    #  This connector will not work until you download the driver at:
    #  http://www.mysql.com/downloads/api-jdbc-stable.html

    JdbcDriver  com.mysql.jdbc.Driver
    JdbcUrl jdbc:mysql://localhost/test
    UserName    test
    Password mypassword
</Resource>

1) question : or the type it is type=javax.sql.Datasource??

2) i have also to set into the persistence.xml the dialect for openJPA to
use mysql?

    property name="openjpa.jdbc.DBDictionary"
value="org.apache.openjpa.jdbc.sql.MySQLDictionary"/>

 or it is automatic form the driver mysql  put  into the tomee/lib  ?


3) when i declare the datasource into resources.xml into WEB-INF directory ,
i hhave also to specify the other properties od pooling connection ? 
for example :
 maxActive="100"
 maxIdle="30"
 maxWait="10000"

4) i have also to set the other properties ? view the website 
http://tomee.apache.org/datasource-config.html

5)
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#MySQL_DBCP_Example???






--
View this message in context: http://openejb.979440.n4.nabble.com/Persistence-xml-and-datasource-for-mysql-tp4661952.html
Sent from the OpenEJB User mailing list archive at Nabble.com.