You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2008/08/05 00:06:44 UTC

[jira] Deleted: (OPENEJB-879) Automatically set toplink.target-server for TopLink

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

David Blevins deleted OPENEJB-879:
----------------------------------


> Automatically set toplink.target-server for TopLink
> ---------------------------------------------------
>
>                 Key: OPENEJB-879
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-879
>             Project: OpenEJB
>          Issue Type: Improvement
>            Reporter: David Blevins
>            Assignee: David Blevins
>
> 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.