openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: derby database not created
Date Fri, 10 Aug 2012 22:30:55 GMT
maybe try using tomee.xml, system properties or resources.xml)

tomcat datasource are not jta so you get the default datasource i think or
maybe use complete tomcat jndi name (comp/env/jdbc/...)

- Romain


2012/8/11 Louis Bros <louisbrosnan@hotmail.com>

> Hi all,
>
> I'm trying to set up a datasource and use it with openJpa.
>
> I'm using tomee with the derbyclient.jar in the the tomee/lib.
>
> I have my datasource set in my 'META-INF/context.xml' like this:
>
>         <Resource
>                 name="jdbc/test_db"
>                 auth="Container"
>                 type="javax.sql.DataSource"
>                 username="APP"
>                 password="APP"
>                 maxActive="100"
>                 maxIdle="30"
>                 maxWait="10000"
>                 driverClassName="org.apache.derby.jdbc.ClientDriver"
>                 url="jdbc:derby:/opt/databases/test_db;create=true"
>         />
>
> and my persistence unit set with:
>
>         <persistence-unit name="test" transaction-type="JTA">
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>                 <jta-data-source>jdbc/test_db</jta-data-source>
>                 <exclude-unlisted-classes>false</exclude-unlisted-classes>
>                 <properties>
>                         <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema"/>
>                 </properties>
>         </persistence-unit>
>
> I expect that a derby database will be created here
> '/opt/databases/test_db'
> but it's not. Instead 'data/hsqldb' is created.
>
> The web app works as expected except that I want a derby database created.
> Any ideas?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/derby-database-not-created-tp4656789.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message