Hi Marcus,
I found another way to get this to work while keeping the jdbc/roller JDNI
data source name. I placed commons-pool and commons-dbcp jars in
WEB-INF/lib, and added the following lines to roller-custom.properties:
openjpa.ConnectionDriverName=org.apache.commons.dbcp.BasicDataSource
openjpa.ConnectionProperties="\
DriverClassName=oracle.jdbc.OracleDriver,\
Url=jdbc:oracle:thin:@localhost:1521:XE,\
Username=scott,\
Password=tiger,\
initialSize=10,\
maxActive=40,\
maxIdle=10,\
maxWait=10000,\
removeAbandoned=true,\
removeAbandonedTimeout=60,\
logAbandoned=true\
"
openjpa.DataCache=true(CacheSize=5000) # default CacheSize=1000
openjpa.IgnoreChanges=true
openjpa.RetainState=true
Roller will use the Tomcat JNDI data source to do the initial handshake
(e.g., checking db version). If you set [ maxActive="1" maxIdle="0" ] in
the JDNI data source, that connection will be soon released. After that,
the OpenJPA pool is used in the application.
Cheers,
Daniel
>> Versie: 2012.0.1901 / Virusdatabase: 2109/4738 - datum van uitgifte:
>> 01/12/12
>>
> Hi Daniel,
> I had another look at this and I have seen that if you define your
> context datasource prefixed with the jndi namespace then it works.
> ie use java:comp/env/jdbc/rollerdb instead of just jdbc/rollerdb. That
> will then be all you need,
>
> cheers
> Marcus
>