Skip to content

Commit

Permalink
Setting properties after transactionType and dataSource in Weblogic
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 5, 2014
1 parent 3cdaac3 commit 56ae6ae
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

/**
* Weblogic 12c Persistence Container
*
*
* @author Luca Masini
*
*
*/
public class WebLogic12cContainer implements PersistenceContainer
{
Expand All @@ -23,17 +23,16 @@ public class WebLogic12cContainer implements PersistenceContainer
public PersistenceUnitCommon setupConnection(PersistenceUnitCommon unit,
JPADataSource dataSource)
{
unit.transactionType("JTA");
unit.jtaDataSource(dataSource.getJndiDataSource());

if (HibernateProvider.JPA_PROVIDER.equals(unit.getProvider()))
{
PropertyCommon property = unit.getOrCreateProperties()
.createProperty();
property.name(HIBERNATE_TRANSACTION_JTA_PLATFORM).value(WEBLOGIC_JTA_PLATFORM);
}

unit.transactionType("JTA");
unit.jtaDataSource(dataSource.getJndiDataSource());
unit.nonJtaDataSource(null);

return unit;
}

Expand Down

0 comments on commit 56ae6ae

Please sign in to comment.