HHH-8238 OsgiJtaPlatform null pointer exception
This commit is contained in:
parent
08215bad73
commit
24f1a15d07
|
@ -54,13 +54,13 @@ public class OsgiJtaPlatform implements JtaPlatform {
|
|||
@Override
|
||||
public TransactionManager retrieveTransactionManager() {
|
||||
final ServiceReference sr = bundleContext.getServiceReference( TransactionManager.class.getName() );
|
||||
return (TransactionManager) bundleContext.getService( sr );
|
||||
return sr == null ? null : (TransactionManager) bundleContext.getService( sr );
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserTransaction retrieveUserTransaction() {
|
||||
final ServiceReference sr = bundleContext.getServiceReference( UserTransaction.class.getName() );
|
||||
return (UserTransaction) bundleContext.getService( sr );
|
||||
return sr == null ? null : (UserTransaction) bundleContext.getService( sr );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue