HHH-8238 OsgiJtaPlatform null pointer exception
Conflicts: hibernate-osgi/src/main/java/org/hibernate/osgi/OsgiJtaPlatform.java
This commit is contained in:
parent
920ba3641f
commit
79c3658ac2
|
@ -49,14 +49,14 @@ public class OsgiJtaPlatform implements JtaPlatform {
|
|||
|
||||
@Override
|
||||
public TransactionManager retrieveTransactionManager() {
|
||||
ServiceReference sr = bundleContext.getServiceReference( TransactionManager.class.getName() );
|
||||
return (TransactionManager) bundleContext.getService( sr );
|
||||
final ServiceReference sr = bundleContext.getServiceReference( TransactionManager.class.getName() );
|
||||
return sr == null ? null : (TransactionManager) bundleContext.getService( sr );
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserTransaction retrieveUserTransaction() {
|
||||
ServiceReference sr = bundleContext.getServiceReference( UserTransaction.class.getName() );
|
||||
return (UserTransaction) bundleContext.getService( sr );
|
||||
final ServiceReference sr = bundleContext.getServiceReference( UserTransaction.class.getName() );
|
||||
return sr == null ? null : (UserTransaction) bundleContext.getService( sr );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue