Hi Kristof,
This is close to impossible ;). Can you stop derby and try to ping your resource
from the admin gui?
thanks,
-marina
glassfish_at_javadesktop.org wrote:
> Hi,
>
> I'm trying to persist my ejb3 entity beans to a mysql database and still the table are created in derby.
>
> These are the steps I took:
> - downloaded mysql-connector-java-5.0.4-bin.jar and placed it in C:\Sun\glassfish\domains\domain1\lib\ext
>
> - localhost:4848 -> Resources -> JDBC -> Connection Pools -> new...
> name: mysql
> datasource classname: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> Resource Type: javax.sql.DataSource
> Additional Properties: I filled in the properties: port, databaseName, serverName,user and password.
>
> - Resources -> JDBC -> JDBC Resources -> new...
> JNDI Name: jdbc/mydb
> pool name: mysql
>
> My ejb3 entity beans are in a library jar which i'm adding to my-ejb.jar as a library. All this packaged in a ear file ofcourse.
>
> The persistence.xml file residing inside the META-INF directory of that library jar looks as follows:
>
> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
> <persistence-unit name="my-dataPU" transaction-type="JTA">
> <jta-data-source>jdbc/mydb</jta-data-source>
> <properties>
> <property name="toplink.ddl-generation" value="create-drop"/>
> <property name="toplink.logging.level" value="FINE"/>
> </properties>
> </persistence-unit>
> </persistence>
>
> When I deploy my application I get no errors or warning and I see lines like
> The column name for element [public java.lang.String blah.blah.blah.getSerial()] is being defaulted to: SERIAL.
>
> Yet still, I don't see the tables created in mysql.
>
> Am I missing something? Any ideas what I might be doing wrong?
>
> Thanks alot,
> Kristof.
> [Message sent by forum member 'kristof_taveirne' (kristof_taveirne)]
>
> http://forums.java.net/jive/thread.jspa?messageID=205460
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>