db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcin Kwapisz" <mkwap...@zsk.p.lodz.pl>
Subject RE: Derby as an in-memory JEE datasource
Date Fri, 08 Jan 2010 08:24:46 GMT
I think that sub-protocol "memory" is ignored. When I start Derby as a normal db server, connection
can be established (with that connection pool) and everything works fine. Maybe I do something
wrong. I do not know, so I asked if it is possible to configure in-memory database as a datasource.

This is my connection pool configuration:

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false"
connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10"
connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit"
datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false"
idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true"
lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false"
max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="TestDBPoolMem"
non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource"
statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0"
wrap-jdbc-objects="false">
        <property name="serverName" value="localhost"/>
        <property name="PortNumber" value="1527"/>
        <property name="networkProtocol" value="jdbc:derby:memory"/>
        <property name="DatabaseName" value="EntityTestDB"/>
        <property name="User" value="testdb"/>
        <property name="Password" value="testdb"/>
    </jdbc-connection-pool>

The error I got:
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931
2010-01-08 09:16:45 com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator createResource
WARNING: poolmgr.create_resource_error
2010-01-08 09:16:45 com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
WARNING: poolmgr.get_connection_failure
2010-01-08 09:16:45 com.sun.gjc.spi.base.DataSource getConnection
WARNING: jdbc.exc_get_conn
2010-01-08 09:16:45 org.eclipse.persistence.session.file: _InitPU.ejb
SEVERE: 
Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection
could not be allocated because: java.net.ConnectException: Błąd podczas łączenia z serwerem
localhost na porcie 1527 z komunikatem Connection refused: connect.

Regards
Marcin Kwapisz


Mime
View raw message