public TransactionManager getTransactionManager() { LOG.info("Using embedded Geronimo transaction manager"); try { return new GeronimoTransactionManager(); } catch (XAException exception) { throw new IllegalStateException("Unable to instantiate Geronimo Transaction Manager", exception); } }
public TransactionManager getTransactionManager() { __log.info("Using embedded Geronimo transaction manager"); try { Object obj = new org.apache.geronimo.transaction.manager.GeronimoTransactionManager(); return (TransactionManager) obj; } catch (Exception except) { throw new IllegalStateException("Unable to instantiate Geronimo Transaction Manager", except); } } }
/** * Get the transaction manager with a specified timeout. * @param timeOut * @return TransactionManager */ public TransactionManager getTransactionManager(int timeOut) { LOG.info("Using embedded Geronimo transaction manager with timeout"); try { return new GeronimoTransactionManager(timeOut); } catch (XAException exception) { throw new IllegalStateException("Unable to instantiate Geronimo Transaction Manager", exception); } }
void addContextAndBeans(@Observes final AfterBeanDiscovery afterBeanDiscovery, final BeanManager bm) { context = new TransactionContext(); afterBeanDiscovery.addContext(context); if (!hasManager && !hasRegistry) { try { final GeronimoTransactionManager mgr = new GeronimoTransactionManager(); afterBeanDiscovery.addBean(new JtaBean(mgr)); } catch (final XAException e) { throw new IllegalStateException(e); } hasManager = true; hasRegistry = true; } afterBeanDiscovery.addBean(new JtaConfigBean(config)); }
@Override public synchronized TransactionManager getTransactionManager() throws Exception { if (manager == null) { try { manager = new GeronimoTransactionManager(DEFAULT_TRANSACTION_TIMEOUT, transactionLog); } catch (Exception e) { throw new RuntimeException(e); } } if (log.isInfoEnabled()) { log.retrievingTm(manager); } return manager; }
private void initDataSource() throws JBIException { switch (_ode._config.getDbMode()) { case EMBEDDED: case INTERNAL: try { TransactionManager txm = new GeronimoTransactionManager(); _ode.setTransactionManager(txm); } catch (Exception e) { throw new RuntimeException("Unable to create Geronimo Transaction Manager", e); } break; default: break; } _db = Database.create(_ode._config); _db.setTransactionManager(_ode.getTransactionManager()); _db.setWorkRoot(new File(_ode.getContext().getInstallRoot())); try { _db.start(); } catch (Exception ex) { String errmsg = __msgs.msgOdeDbConfigError(); __log.error(errmsg, ex); throw new JBIException(errmsg, ex); } _ode._dataSource = _db.getDataSource(); }
return new GeronimoTransactionManager(defaultTransactionTimeoutSeconds, xidFactory, txLog);
public static void startBusAndJMS(String brokerURI) { try { transactionManager = new GeronimoTransactionManager(); } catch (XAException e) { throw new IllegalStateException(e.getMessage(), e); } bus = BusFactory.getDefaultBus(); registerTransactionManager(); ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory(brokerURI); cf1.setRedeliveryPolicy(redeliveryPolicy()); JcaPooledConnectionFactory pcf = new JcaPooledConnectionFactory(); pcf.setTransactionManager(transactionManager); pcf.setConnectionFactory(cf1); cf = pcf; cff = new ConnectionFactoryFeature(pcf); }
useSpring = true; } catch (NoClassDefFoundError e) { transactionManager = new GeronimoTransactionManager(transactionTimeout, xidFactory, transactionLog);
useSpring = true; } catch (NoClassDefFoundError e) { transactionManager = new GeronimoTransactionManager(transactionTimeout, xidFactory, transactionLog);
final GeronimoTransactionManager geronimoTransactionManager = new GeronimoTransactionManager(defaultTransactionTimeoutSeconds, xidFactory, txLog); final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management") .set("j2eeType", "TransactionManager");