openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Håkon Sagehaug" <>
Subject Using datasource from tomcat with openjpa
Date Mon, 03 Nov 2008 14:22:45 GMT
Hi all,

I've got a axis2 web service that is deployed in tomcat and talk to a
database using openjpa. This works fine when I just use the persistent xml
to configure my db connection, but now I want to use tomcat to configure the
datasource. Here is my set-up


<persistence-unit name="MyOpenJPa" transaction-type="RESOURCE_LOCAL">


            <property name="openjpa.ConnectionFactoryName"
value="java:comp/env/jdbc/workflowdb" />
            <property name="openjpa.Log" value="DefaultLevel=INFO,
Tool=INFO" />
            <property name="openjpa.Sequence"
value="table(Table=OPENJPA_SEQUENCE_TABLE, Increment=1)"/>


In tomcat's service xml I've got this

<Resource name="jdbc/workflowdb" auth="Container"
                 maxActive="5" maxIdle="5" maxWait="10000"
                 username="name" password="password"

I tried to put it into the  <GlobalNamingResources> tag and inside a
<Context> tag using the axis2 as path, but I always get this error back

A JDBC Driver or DataSource class name must be specified in the
ConnectionDriverName property.

Does anyone have a good tip on how to get this to work??

cheers, Håkon

Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

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