/** * Default Constructor */ public ConnectorService() { _runtime = ConnectorRuntime.getRuntime(); }
private ConnectorRuntime getRuntime(){ if(runtime == null){ runtime = ConnectorRuntime.getRuntime(); } return runtime; }
public ConnectionPoolStatsProviderBootstrap() { jdbcStatsProviders = new ArrayList<JdbcConnPoolStatsProvider>(); ccStatsProviders = new ArrayList<ConnectorConnPoolStatsProvider>(); poolEmitters = new HashMap<PoolInfo, ConnectionPoolEmitterImpl>(); poolRegistries = new HashMap<PoolInfo, PoolLifeCycleListenerRegistry>(); runtime = ConnectorRuntime.getRuntime(); }
/** * initialize work manager reference */ private void initializeWorkManager() { if (wm == null) { try { wm = ConnectorRuntime.getRuntime().getWorkManagerProxy(threadPoolId, moduleName, rarCL); } catch(Exception e) { logger.log(Level.SEVERE, "workmanager.instantiation_error", e); } } }
/** * initializes XATerminator reference */ private void initializeXATerminator() { if (xa == null) { xa = ConnectorRuntime.getRuntime().getXATerminatorProxy(moduleName); } } }
public LocalTxConnectionEventListener(ResourceHandle resource) { this.resource = resource; this.associatedHandles = new IdentityHashMap(10); this.poolMgr = ConnectorRuntime.getRuntime().getPoolManager(); }
/** * Remove all the proxy objects (Work-Manager) from connector registry * * @param moduleName_ resource-adapter name */ private void removeProxiesFromRegistry(String moduleName_) { ConnectorRuntime.getRuntime().removeWorkManagerProxy(moduleName_); }
private ComponentEnvManager getComponentEnvManager() { return ConnectorRuntime.getRuntime().getComponentEnvManager(); }
public Connection getConnection() throws SQLException { return ConnectorRuntime.getRuntime().getConnection(resourceInfo); }
/** * Remove the resource from book-keeping * * @param h ResourceHandle to be delisted * @throws javax.transaction.SystemException when not able to delist the resource */ private void enforceDelistment(ResourceHandle h) throws SystemException { JavaEETransaction txn = (JavaEETransaction) ConnectorRuntime.getRuntime().getTransaction(); if (txn != null) { Set set = txn.getResources(poolInfo); if (set != null) set.remove(h); } }
/** * {@inheritDoc} */ public synchronized void undeployResource(Object resource) throws Exception { ResourceAdapterConfig domainConfig = (com.sun.enterprise.config.serverbeans.ResourceAdapterConfig) resource; String rarName = domainConfig.getResourceAdapterName(); ConnectorRuntime crt = ConnectorRuntime.getRuntime(); crt.deleteResourceAdapterConfig(rarName); }
private JavaEETransaction getCurrentTransaction() throws SystemException { JavaEETransactionManager txMgr = ConnectorRuntime.getRuntime().getTransactionManager(); return (JavaEETransaction) txMgr.getTransaction(); }
/** * @see java.io.Externalizable */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { xat = ConnectorRuntime.getRuntime().getTransactionManager().getXATerminator(); } }
public void enlistedInTransaction(Transaction tran) throws IllegalStateException { ConnectorRuntime.getRuntime().getPoolManager().resourceEnlisted(tran, this); }
/** * {@inheritDoc} */ public boolean isContextSupported(Class<? extends WorkContext> aClass) { WorkContextHandler wch = ConnectorRuntime.getRuntime().getWorkContextHandler(); wch.init(moduleName, rarCL); return wch.isContextSupported(true, aClass.getName()); }
public void registerProbeProvider() { if(ConnectorRuntime.getRuntime().isServer()) { getConnPoolBootstrap().registerProvider(); } }
public ConnectorXAResource(ResourceHandle handle, ResourceSpec spec, com.sun.enterprise.resource.allocator.ResourceAllocator alloc, ClientSecurityInfo info ) { // initially userHandle is associated with mc this.poolMgr = ConnectorRuntime.getRuntime().getPoolManager(); this.userHandle = null; this.spec = spec; this.poolInfo = spec.getPoolInfo(); this.alloc = alloc; this.info = info; localConnection = (ManagedConnection) handle.getResource(); localHandle_ = handle; }
protected ConnectorConnectionPool getPoolConfigurationFromJndi(Hashtable env) throws PoolingException { ConnectorConnectionPool poolResource; try { String jndiNameOfPool = ConnectorAdminServiceUtils.getReservePrefixedJNDINameForPool(poolInfo); poolResource = (ConnectorConnectionPool) ConnectorRuntime.getRuntime().getResourceNamingService().lookup(poolInfo, jndiNameOfPool, env); } catch (NamingException ex) { throw new PoolingException(ex); } return poolResource; }
public static int getTransactionSupportFromRaXml(String rarName) throws ConnectorRuntimeException { String txSupport = ConnectorRuntime.getRuntime().getConnectorDescriptor(rarName). getOutboundResourceAdapter().getTransSupport(); return parseTransactionSupportString(txSupport); } }
public void initialize() throws ConnectorRuntimeException { ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); if(runtime.isNonACCRuntime()){ jndiName = ConnectorsUtil.getPMJndiName(jndiName); } ConnectorRegistry registry = ConnectorRegistry.getInstance(); PoolMetaData pmd = registry.getPoolMetaData(poolInfo); defaultPrin = pmd.getResourcePrincipal(); }