public RemotingTransactionService build() { Endpoint endpoint = this.endpoint; if (endpoint == null) endpoint = Endpoint.getCurrent(); LocalTransactionContext transactionContext = this.transactionContext; if (transactionContext == null) transactionContext = LocalTransactionContext.getCurrent(); return new RemotingTransactionService(endpoint, transactionContext); } }
public Transaction getCurrentTransaction() { final LocalTransactionContext current = LocalTransactionContext.getCurrent(); try { current.importProviderTransaction(); } catch (SystemException e) { throw new RuntimeException("InboundTransactionCurrentImpl unable to determine inbound transaction context", e); } try { return ContextTransactionManager.getInstance().suspend(); } catch (SystemException e) { throw new RuntimeException("InboundTransactionCurrentImpl unable to suspend inbound transaction context", e); } } }
void begin(CreationListener.CreatedBy createdBy) throws NotSupportedException, SystemException { final State state = stateRef.get(); if (state.transaction != null) { throw Log.log.nestedNotSupported(); } resume(LocalTransactionContext.getCurrent().beginTransaction(state.getTimeout(), false, createdBy)); }
public void start(final StartContext context) throws StartException { final UserTransactionRegistry registry = registryInjector.getValue(); LocalTransactionContext.getCurrent().registerCreationListener((txn, createdBy) -> { if (createdBy == CreationListener.CreatedBy.USER_TRANSACTION) { if (WildFlySecurityManager.isChecking()) { AccessController.doPrivileged((PrivilegedAction<Void>) () -> { txn.registerAssociationListener(new AssociationListener() { private final AtomicBoolean first = new AtomicBoolean(); public void associationChanged(final AbstractTransaction t, final boolean a) { if (a && first.compareAndSet(false, true)) registry.userTransactionStarted(); } }); return null; }); } else { txn.registerAssociationListener(new AssociationListener() { private final AtomicBoolean first = new AtomicBoolean(); public void associationChanged(final AbstractTransaction t, final boolean a) { if (a && first.compareAndSet(false, true)) registry.userTransactionStarted(); } }); } } }); }
public RemotingTransactionService build() { Endpoint endpoint = this.endpoint; if (endpoint == null) endpoint = Endpoint.getCurrent(); LocalTransactionContext transactionContext = this.transactionContext; if (transactionContext == null) transactionContext = LocalTransactionContext.getCurrent(); return new RemotingTransactionService(endpoint, transactionContext); } }
public RemotingTransactionService build() { Endpoint endpoint = this.endpoint; if (endpoint == null) endpoint = Endpoint.getCurrent(); LocalTransactionContext transactionContext = this.transactionContext; if (transactionContext == null) transactionContext = LocalTransactionContext.getCurrent(); return new RemotingTransactionService(endpoint, transactionContext); } }
@Override public void filter(ContainerRequestContext requestContext) throws IOException { try { // pull in any RTS transaction LocalTransactionContext.getCurrent().importProviderTransaction(); } catch (SystemException se) { throw RTSLogger.ROOT_LOGGER.failueOnImportingGlobalTransactionFromWildflyClient(se); } }
public Transaction getCurrentTransaction() { final LocalTransactionContext current = LocalTransactionContext.getCurrent(); try { current.importProviderTransaction(); } catch (SystemException e) { throw new RuntimeException("InboundTransactionCurrentImpl unable to determine inbound transaction context", e); } try { return ContextTransactionManager.getInstance().suspend(); } catch (SystemException e) { throw new RuntimeException("InboundTransactionCurrentImpl unable to suspend inbound transaction context", e); } } }
public Transaction getCurrentTransaction() { final LocalTransactionContext current = LocalTransactionContext.getCurrent(); try { current.importProviderTransaction(); } catch (SystemException e) { throw new RuntimeException("InboundTransactionCurrentImpl unable to determine inbound transaction context", e); } try { return ContextTransactionManager.getInstance().suspend(); } catch (SystemException e) { throw new RuntimeException("InboundTransactionCurrentImpl unable to suspend inbound transaction context", e); } } }
void begin(CreationListener.CreatedBy createdBy) throws NotSupportedException, SystemException { final State state = stateRef.get(); if (state.transaction != null) { throw Log.log.nestedNotSupported(); } resume(LocalTransactionContext.getCurrent().beginTransaction(state.getTimeout(), false, createdBy)); }
void begin(CreationListener.CreatedBy createdBy) throws NotSupportedException, SystemException { final State state = stateRef.get(); if (state.transaction != null) { throw Log.log.nestedNotSupported(); } resume(LocalTransactionContext.getCurrent().beginTransaction(state.getTimeout(), false, createdBy)); }
public void start(final StartContext context) throws StartException { final UserTransactionRegistry registry = registryInjector.getValue(); LocalTransactionContext.getCurrent().registerCreationListener((txn, createdBy) -> { if (createdBy == CreationListener.CreatedBy.USER_TRANSACTION) { if (WildFlySecurityManager.isChecking()) { AccessController.doPrivileged((PrivilegedAction<Void>) () -> { txn.registerAssociationListener(new AssociationListener() { private final AtomicBoolean first = new AtomicBoolean(); public void associationChanged(final AbstractTransaction t, final boolean a) { if (a && first.compareAndSet(false, true)) registry.userTransactionStarted(); } }); return null; }); } else { txn.registerAssociationListener(new AssociationListener() { private final AtomicBoolean first = new AtomicBoolean(); public void associationChanged(final AbstractTransaction t, final boolean a) { if (a && first.compareAndSet(false, true)) registry.userTransactionStarted(); } }); } } }); }
public void start(final StartContext context) throws StartException { final UserTransactionRegistry registry = registryInjector.getValue(); LocalTransactionContext.getCurrent().registerCreationListener((txn, createdBy) -> { if (createdBy == CreationListener.CreatedBy.USER_TRANSACTION) { if (WildFlySecurityManager.isChecking()) { AccessController.doPrivileged((PrivilegedAction<Void>) () -> { txn.registerAssociationListener(new AssociationListener() { private final AtomicBoolean first = new AtomicBoolean(); public void associationChanged(final AbstractTransaction t, final boolean a) { if (a && first.compareAndSet(false, true)) registry.userTransactionStarted(); } }); return null; }); } else { txn.registerAssociationListener(new AssociationListener() { private final AtomicBoolean first = new AtomicBoolean(); public void associationChanged(final AbstractTransaction t, final boolean a) { if (a && first.compareAndSet(false, true)) registry.userTransactionStarted(); } }); } } }); }
context.putPrivateData(ComponentView.class, componentView); LocalTransactionContext.getCurrent().importProviderTransaction(); context.setTransaction(ContextTransactionManager.getInstance().getTransaction()); if (forceTargetBean) {
context.putPrivateData(ComponentView.class, componentView); LocalTransactionContext.getCurrent().importProviderTransaction(); context.setTransaction(ContextTransactionManager.getInstance().getTransaction()); if (forceTargetBean) {