tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Blevins (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENEJB-801) Automatically set hibernate.transaction.manager_lookup_class for Hibernate
Date Mon, 04 Aug 2008 22:04:44 GMT

     [ https://issues.apache.org/jira/browse/OPENEJB-801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Blevins updated OPENEJB-801:
----------------------------------

    Summary: Automatically set hibernate.transaction.manager_lookup_class for Hibernate  (was:
Property hibernate.transaction.manager_lookup_class automatically set when using Hibernate
as the PersistenceProvider)

> Automatically set hibernate.transaction.manager_lookup_class for Hibernate
> --------------------------------------------------------------------------
>
>                 Key: OPENEJB-801
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-801
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: configuration
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0
>            Reporter: David Blevins
>            Assignee: David Blevins
>             Fix For: 3.0.1
>
>
> Code is essentially:
>                     String lookupProperty = "hibernate.transaction.manager_lookup_class";
>                     String openejbLookupClass = "org.apache.openejb.hibernate.TransactionManagerLookup";
>                     String className = persistenceUnit.properties.getProperty(lookupProperty);
>                     if (className == null || className.startsWith("org.hibernate.transaction")){
>                         persistenceUnit.properties.setProperty(lookupProperty, openejbLookupClass);
>                         logger.debug("Adjusting PersistenceUnit(name="+persistenceUnit.name+")
property to "+lookupProperty+"="+openejbLookupClass);
>                     }
> The result is that OpenEJB-specific configuration can be avoided when using OpenEJB +
Hibernate.  A second benefit is that if another vendor is used in production, the value will
automatically be reset for using OpenEJB in the test environment.  Ensuring the strategy starts
with "org.hibernate.transaction" allows for a custom lookup strategy to be used and not overridden.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message