- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ScheduledThreadPoolExecutor s =
new ScheduledThreadPoolExecutor(corePoolSize)
ThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
String str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
- Smart code suggestions by Codota
}
/** * Simply close proxied session if there is no active transaction. Or if transaction exists, delist session's XA resource * and register a {@link SessionClosingSynchronization} to close the proxied session. * * @throws JMSException */ @Override public void close() throws JMSException { if (transactionHelper.isTransactionAvailable()) { transactionHelper.deregisterXAResource(xaSession.getXAResource()); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Delisted " + xaSession + " XA resource from the transaction"); } Synchronization synchronization = new SessionClosingSynchronization(xaSession); transactionHelper.registerSynchronization(synchronization); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Registered synchronization to close the session: " + synchronization); } } else { xaSession.close(); } }
/** * Simply close proxied session if there is no active transaction. Or if transaction exists, delist session's XA resource * and register a {@link SessionClosingSynchronization} to close the proxied session. * * @throws JMSException */ @Override public void close() throws JMSException { if (transactionHelper.isTransactionAvailable()) { transactionHelper.deregisterXAResource(xaSession.getXAResource()); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Delisted " + xaSession + " XA resource from the transaction"); } Synchronization synchronization = new SessionClosingSynchronization(xaSession); transactionHelper.registerSynchronization(synchronization); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Registered synchronization to close the session: " + synchronization); } } else { xaSession.close(); } }
/** * Simply close proxied session if there is no active transaction. Or if transaction exists, delist session's XA resource * and register a {@link SessionClosingSynchronization} to close the proxied session. * * @throws JMSException */ @Override public void close() throws JMSException { if (transactionHelper.isTransactionAvailable()) { transactionHelper.deregisterXAResource(xaSession.getXAResource()); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Delisted " + xaSession + " XA resource from the transaction"); } Synchronization synchronization = new SessionClosingSynchronization(xaSession); transactionHelper.registerSynchronization(synchronization); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Registered synchronization to close the session: " + synchronization); } } else { xaSession.close(); } }