public void start(BootstrapContext aCtx) throws ResourceAdapterInternalException { LOG.fine("Resource Adapter is starting by appserver..."); if (aCtx == null) { throw new ResourceAdapterInternalException("BootstrapContext can not be null"); } this.ctx = aCtx; }
protected void closePhysicalConnection() throws ResourceException { Connection c = (Connection) physicalConnection; try { c.close(); } catch (SQLException e) { throw new ResourceAdapterInternalException("Error attempting to destroy managed connection", e); } }
public void setLogWriter(PrintWriter log) throws ResourceException { try { connectionPoolDataSource.setLogWriter(log); } catch (SQLException e) { throw new ResourceAdapterInternalException(e.getMessage(), e); } }
protected void closePhysicalConnection() throws ResourceException { try { xaConnection.close(); } catch (SQLException e) { throw new ResourceAdapterInternalException("Error attempting to destroy managed connection", e); } }
public PrintWriter getLogWriter() throws ResourceException { try { return dataSource.getLogWriter(); } catch (SQLException e) { throw new ResourceAdapterInternalException(e.getMessage(), e); } }
public void setLogWriter(PrintWriter log) throws ResourceException { try { dataSource.setLogWriter(log); } catch (SQLException e) { throw new ResourceAdapterInternalException(e.getMessage(), e); } }
public void setLogWriter(PrintWriter log) throws ResourceException { try { xaDataSource.setLogWriter(log); } catch (SQLException e) { throw new ResourceAdapterInternalException(e.getMessage(), e); } }
public PrintWriter getLogWriter() throws ResourceException { try { return connectionPoolDataSource.getLogWriter(); } catch (SQLException e) { throw new ResourceAdapterInternalException(e.getMessage(), e); } }
protected void closePhysicalConnection() throws ResourceException { try { pooledConnection.close(); } catch (SQLException e) { throw new ResourceAdapterInternalException("Error attempting to destroy managed connection", e); } }
public PrintWriter getLogWriter() throws ResourceException { try { return xaDataSource.getLogWriter(); } catch (SQLException e) { throw new ResourceAdapterInternalException(e.getMessage(), e); } }
@Override public void start(BootstrapContext ctx) throws ResourceAdapterInternalException { if (workManager != null) throw new ResourceAdapterInternalException("Can only start once"); workManager = ctx.getWorkManager(); }
@Override public void start(BootstrapContext ctx) throws ResourceAdapterInternalException { LOGGER.info("Amazon SQS Resource Adapter Started.."); context = ctx; try { poller = context.createTimer(); } catch (UnavailableException ex) { LOGGER.log(Level.SEVERE, "Unable to create Poller", ex); throw new ResourceAdapterInternalException(ex); } }
protected Connection getPhysicalConnection(Subject subject, CredentialExtractor credentialExtractor) throws ResourceException { try { return dataSource.getConnection(credentialExtractor.getUserName(), credentialExtractor.getPassword()); } catch (SQLException e) { throw new ResourceAdapterInternalException("Unable to obtain physical connection to " + dataSource, e); } }
public void start(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException { try { SchedulerFactory factory = new StdSchedulerFactory(); scheduler = factory.getScheduler(); scheduler.start(); } catch (SchedulerException e) { throw new ResourceAdapterInternalException("Failed to create Quartz Scheduler", e); } }
public void start(BootstrapContext bsContext) throws ResourceAdapterInternalException { try { this.xaFileSystem = NativeXAFileSystem.bootXAFileSystem(this, bsContext.getWorkManager()); } catch (XASystemException xase) { throw new ResourceAdapterInternalException(xase); } }
protected PooledConnection getPhysicalConnection(Subject subject, CredentialExtractor credentialExtractor) throws ResourceException { try { return connectionPoolDataSource.getPooledConnection(credentialExtractor.getUserName(), credentialExtractor.getPassword()); } catch (SQLException e) { throw new ResourceAdapterInternalException("Unable to obtain physical connection to " + connectionPoolDataSource, e); } }
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException { CredentialExtractor credentialExtractor = new CredentialExtractor(subject, connectionRequestInfo, this); XAConnection sqlConnection = getPhysicalConnection(subject, credentialExtractor); try { return new ManagedXAConnection(this, sqlConnection, credentialExtractor, exceptionSorter); } catch (SQLException e) { throw new ResourceAdapterInternalException("Could not set up ManagedXAConnection", e); } }
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException { CredentialExtractor credentialExtractor = new CredentialExtractor(subject, connectionRequestInfo, this); PooledConnection sqlConnection = getPhysicalConnection(subject, credentialExtractor); try { return new ManagedPooledConnection(this, sqlConnection, credentialExtractor, exceptionSorter); } catch (SQLException e) { throw new ResourceAdapterInternalException("Could not set up ManagedPooledConnection", e); } }
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException { CredentialExtractor credentialExtractor = new CredentialExtractor(subject, connectionRequestInfo, this); XAConnection sqlConnection = getPhysicalConnection(credentialExtractor); try { return new ManagedXAConnection(this, sqlConnection, credentialExtractor, exceptionSorter); } catch (SQLException e) { throw new ResourceAdapterInternalException("Could not set up ManagedXAConnection", e); } }
protected XAConnection getPhysicalConnection(CredentialExtractor credentialExtractor) throws ResourceException { try { return xaDataSource.getXAConnection(credentialExtractor.getUserName(), credentialExtractor.getPassword()); } catch (SQLException e) { throw new ResourceAdapterInternalException("Unable to obtain physical connection to " + xaDataSource, e); } }