Hi smithh032772,

thank you for your reply, it helped me to finally resolve this.

smithh032772 wrote
> Per my experience, I would never try to use embeddedDriver for
> network/client connection (jdbc:derby://localhost:1527/...).

I was using the org.apache.derby.jdbc.ClientDriver all the time, until I saw 
this
<http://openejb.979440.n4.nabble.com/derby-database-not-created-td4656789.html> 
 
post last night, so I tried it in a last act of desperation. Your note made
me go read about the derby embedded and network drivers so I understand now
what's the difference.

This is the minimal datasource that finally worked for me:

<tomee>
    <Resource id="test_ds" type="DataSource">
        JdbcDriver    org.apache.derby.jdbc.ClientDriver
        JdbcUrl        jdbc:derby://localhost:1527/test_db5;create=true
        Password     password
        JtaManaged  true
        InitialSize     5
    </Resource>
</tomee>

The property *InitialSize* (i.e. The initial number of connections that are
created when the pool is started) defaults to 0, which seems to keep TomEE
from connecting to the database on startup if not set to a value > 0.

Setting a default *Password* seems to be necessary also, since it has no
default value like the *UserName* property, which defaults to "sa".

Cheers,
gollum



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Derby-database-does-not-get-created-tp4661165p4661172.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to