/** * Constructor for Factory */ public ConnectionManager() throws Exception { // Set the TransactionManager // Modified for use with the gcj compiler ServiceManager sm = ServiceManager.getInstance(); TransactionService ts = (TransactionService) sm.getTransactionService(); tm = ts.getTransactionManager(); // set the Transaction Manager as being the listener for this RM // TODO This is specific to JOTM ! rmListener = (ResourceManagerEventListener) tm; }
/** * constructor used for MDB or Session beans */ public JTimerService(JFactory bf) { this.bf = bf; // Get the transaction service try { TransactionService ts = (TransactionService) ServiceManager.getInstance().getTransactionService(); tm = ts.getTransactionManager(); } catch (Exception e) { throw new EJBException("Error when starting the Timer service ", e); } }
/** * constructor used for Entity beans */ public JTimerService(JEntitySwitch es) { this.es = es; // Get the transaction service try { TransactionService ts = (TransactionService) ServiceManager.getInstance().getTransactionService(); tm = ts.getTransactionManager(); } catch (Exception e) { throw new EJBException("Error when starting the Timer service ", e); } bf = es.getBeanFactory(); }
tm = jtmService.getTransactionManager(); } catch (ServiceException e) { servlog.log(BasicLevel.ERROR, "Cannot initialize the EJB Container Service");