protected TransactionManager acquireTransactionManager() throws Exception {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try{
Class clazz = (Class) AccessController.doPrivileged(new PrivilegedClassForName(TX_MANAGER_FACTORY_CLASS));
Method method = AccessController.doPrivileged(new PrivilegedGetMethod(clazz, TX_MANAGER_FACTORY_METHOD, null, false));
return (TransactionManager) AccessController.doPrivileged(new PrivilegedMethodInvoker(method, null, null));
}catch (PrivilegedActionException ex){
if (ex.getCause() instanceof ClassNotFoundException){
throw (ClassNotFoundException)ex.getCause();
}
if (ex.getCause() instanceof NoSuchMethodException){