geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garth Keesler <gar...@gdcjk.com>
Subject Re: OpenEJB DBDictionary w/postgres null value
Date Sun, 30 Dec 2007 14:39:23 GMT
Garth Keesler wrote:
> I think that this comes down to the right way to associate a 
> persistence context with a gmo dbpool database (other than Derby). 
> It's probably very simple but I've not found the right combo to make 
> it work. Still trying...
>
> Pointers welcome.
>
> Thx,
> Garth
>
> .
>
Sorry to keep replying to myself...

Here are the two files in the Bank app that I think are causing the probs.

First is the BankPool.xml file and, in particular, I think the 
<resourceadapter> section has a problem with the <name>. I've tried a 
variety of different names but am not sure if it should be the same as 
the dbpool name or not.

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
<dep:environment 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
<dep:moduleId>
<dep:groupId>console.dbpool</dep:groupId>
<dep:artifactId>OES</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>rar</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>postgresql</dep:groupId>
<dep:artifactId>postgresql-8.1</dep:artifactId>
<dep:version>404.jdbc3</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>

<resourceadapter>
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>


<connectiondefinition-instance>
<name>console.dbpool/OES</name>
<connectionmanager>
<local-transaction/>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>

</connector>

Second is the persistence.xml file. I'm not sure what the 
<jta-data-source> name should be. I've tried using "OES", 
"console.dbpool/OES", and several others but none seem to work. The 
<non-jta-data-source> has been commented out to simplify.

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="BankPU">
<description>Entity Beans for Bank</description>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<class>org.apache.geronimo.samples.bank.ejb.Account</class>
<class>org.apache.geronimo.samples.bank.ejb.Customer</class>
<class>org.apache.geronimo.samples.bank.ejb.ExchangeRate</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings" value="false" />
<property name="openjpa.jdbc.DBDictionary" value="postgres"/>
</properties>
<jta-data-source>console.dbpool/OES</jta-data-source>
<!--
<non-jta-data-source>OESDataSource</non-jta-data-source>
-->
</persistence-unit>
</persistence>

I've googled for suggestions but have not found anything of value so far.

Thx,
Garth

Mime
View raw message