users@glassfish.java.net

Re: Creating a JNDI for MySQL ?

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Oct 2007 18:08:42 PDT

Hi lancea,

I guess that you are saying that I should do this with my persistence.xml ?
<?xml version="1.0" encoding="UTF-8"?>
<persistence>
   <persistence-unit name="company">
          <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
             <jta-data-source>jdbc/company</jta-data-source>
          <class>ws.ProjectManagerWs</class>
          <properties>
[b] <property name="jdbc.driver" value="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"/>[/b]
              <property name="jdbc.connection.string" value="jdbc:mysql://localhost:3306/smallcompany"/>
              <property name="jdbc.user" value="root"/>
              <property name="jdbc.password" value="root"/>
               <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
          </properties>
      </persistence-unit>
 </persistence>

I am using the 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource' in my resource.xml ...

which one should I use ... ??

regards, i
[Message sent by forum member 'inkimar' (inkimar)]

http://forums.java.net/jive/thread.jspa?messageID=241082