geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devdev <>
Subject Re: DB pool from admin console looks wrong
Date Fri, 22 Aug 2008 20:11:35 GMT

David thanks again for the quick reply. 

regarding #2, I totally agree there is no benefit to use it the jsee way. 
When rewriting persistence.xml touse mysql I get 
<openjpa-1.0.2-r420667:627158 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: There were errors
initializing your configuration: <openjpa-1.0.2-r420667:627158 fatal store
error> org.apache.openjpa.util.StoreException: com.mysql.jdbc.Driver in
classloader org.apache.geronimo.configs/openjpa/2.1.2/car which i believe is
because it can't find the driver.  I got around it by providing a deploy
plan for a mysql connector where the dependency is stated.  Thus it's really
a bizaree setup, because it use the persistence-unit to write to the DB and
not the DB pool.

If using the pool is the prefered way (to leverage JEE container), it
surprising you are unsure if it would give problem or not.  Isn't it a quite
standard use case of access the DB?

regarding #3, according to javax.persistence.* API, the only way to get a
EntityTransaction instance is by follow that example and it first start w/
Persistence.createEntityManagerFactory(String persistenceUnitName).  If
using the connector, how can I refer to my connector w/in my EJB? 

Thank you in advance


djencks wrote:
> On Aug 22, 2008, at 11:36 AM, devdev wrote:
>> Thank you David.  Could you please clarify the following is correct.
>> 1) I was under the impression that the JDBC is also using a connector
>> underneath.
> I don't understand what you are asking.  Geronimo provides jdbc  
> database pooling through the j2ca connector framework, and wrapping  
> jdbc drivers and datasources from db vendors with j2ca adapters from  
> the tranql project.
>> 2) By JBDC you like like the JPA example from the tutorial at
> I don't think I'd write this example this way.  It does not use any  
> javaee jpa support but only javase support.  In particular it does not  
> use and database connection pooling.  To get a similar example to work  
> with mysql you'd need to modify the persistence.xml properties to  
> point to the mysql database.
> If I were to write a jpa app client example I would use injected  
> entity manager or entity manager factory and deploy a connection pool  
> on the app client and use it with the jta-datasource and/or non-jta- 
> datasource.  However I'm not sure anyone has done this and don't know  
> if there would be problems.
>> 3) If using the connector, how would I get a EntityTransaction to  
>> start and
>> commit a TXN.
> The app client example isn't useing a connector.  However I think  
> there are methods on EntityManager to control jpa-mediated transactions.
> I'm not sure I'm answering the questions you are asking but hopefully  
> this is of some help
> david jencks
>> Thanks a bunch
>> JFR
>> -- 
>> View this message in context:
>> Sent from the Apache Geronimo - Users mailing list archive at  

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message