org.springframework.transaction.jta.TransactionFactory Java Examples
The following examples show how to use
org.springframework.transaction.jta.TransactionFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractMessageEndpointFactory.java From spring-analysis-note with MIT License | 5 votes |
/** * Set the XA transaction manager to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>The passed-in object may be a transaction manager which implements * Spring's {@link org.springframework.transaction.jta.TransactionFactory} * interface, or a plain {@link javax.transaction.TransactionManager}. * <p>If no transaction manager is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionManager(Object transactionManager) { if (transactionManager instanceof TransactionFactory) { this.transactionFactory = (TransactionFactory) transactionManager; } else if (transactionManager instanceof TransactionManager) { this.transactionFactory = new SimpleTransactionFactory((TransactionManager) transactionManager); } else { throw new IllegalArgumentException("Transaction manager [" + transactionManager + "] is neither a [org.springframework.transaction.jta.TransactionFactory} nor a " + "[javax.transaction.TransactionManager]"); } }
Example #2
Source File: AbstractMessageEndpointFactory.java From java-technology-stack with MIT License | 5 votes |
/** * Set the XA transaction manager to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>The passed-in object may be a transaction manager which implements * Spring's {@link org.springframework.transaction.jta.TransactionFactory} * interface, or a plain {@link javax.transaction.TransactionManager}. * <p>If no transaction manager is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionManager(Object transactionManager) { if (transactionManager instanceof TransactionFactory) { this.transactionFactory = (TransactionFactory) transactionManager; } else if (transactionManager instanceof TransactionManager) { this.transactionFactory = new SimpleTransactionFactory((TransactionManager) transactionManager); } else { throw new IllegalArgumentException("Transaction manager [" + transactionManager + "] is neither a [org.springframework.transaction.jta.TransactionFactory} nor a " + "[javax.transaction.TransactionManager]"); } }
Example #3
Source File: AbstractMessageEndpointFactory.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Set the XA transaction manager to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>The passed-in object may be a transaction manager which implements * Spring's {@link org.springframework.transaction.jta.TransactionFactory} * interface, or a plain {@link javax.transaction.TransactionManager}. * <p>If no transaction manager is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionManager(Object transactionManager) { if (transactionManager instanceof TransactionFactory) { this.transactionFactory = (TransactionFactory) transactionManager; } else if (transactionManager instanceof TransactionManager) { this.transactionFactory = new SimpleTransactionFactory((TransactionManager) transactionManager); } else { throw new IllegalArgumentException("Transaction manager [" + transactionManager + "] is neither a [org.springframework.transaction.jta.TransactionFactory} nor a " + "[javax.transaction.TransactionManager]"); } }
Example #4
Source File: AbstractMessageEndpointFactory.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Set the the XA transaction manager to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>The passed-in object may be a transaction manager which implements * Spring's {@link org.springframework.transaction.jta.TransactionFactory} * interface, or a plain {@link javax.transaction.TransactionManager}. * <p>If no transaction manager is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionManager(Object transactionManager) { if (transactionManager instanceof TransactionFactory) { this.transactionFactory = (TransactionFactory) transactionManager; } else if (transactionManager instanceof TransactionManager) { this.transactionFactory = new SimpleTransactionFactory((TransactionManager) transactionManager); } else { throw new IllegalArgumentException("Transaction manager [" + transactionManager + "] is neither a [org.springframework.transaction.jta.TransactionFactory} nor a " + "[javax.transaction.TransactionManager]"); } }
Example #5
Source File: AbstractMessageEndpointFactory.java From spring-analysis-note with MIT License | 2 votes |
/** * Set the Spring TransactionFactory to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>Alternatively, specify an appropriate transaction manager through * the {@link #setTransactionManager "transactionManager"} property. * <p>If no transaction factory is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionFactory(TransactionFactory transactionFactory) { this.transactionFactory = transactionFactory; }
Example #6
Source File: AbstractMessageEndpointFactory.java From java-technology-stack with MIT License | 2 votes |
/** * Set the Spring TransactionFactory to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>Alternatively, specify an appropriate transaction manager through * the {@link #setTransactionManager "transactionManager"} property. * <p>If no transaction factory is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionFactory(TransactionFactory transactionFactory) { this.transactionFactory = transactionFactory; }
Example #7
Source File: AbstractMessageEndpointFactory.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Set the Spring TransactionFactory to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>Alternatively, specify an appropriate transaction manager through * the {@link #setTransactionManager "transactionManager"} property. * <p>If no transaction factory is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionFactory(TransactionFactory transactionFactory) { this.transactionFactory = transactionFactory; }
Example #8
Source File: AbstractMessageEndpointFactory.java From spring4-understanding with Apache License 2.0 | 2 votes |
/** * Set the Spring TransactionFactory to use for wrapping endpoint * invocations, enlisting the endpoint resource in each such transaction. * <p>Alternatively, specify an appropriate transaction manager through * the {@link #setTransactionManager "transactionManager"} property. * <p>If no transaction factory is specified, the endpoint invocation * will simply not be wrapped in an XA transaction. Check out your * resource provider's ActivationSpec documentation for local * transaction options of your particular provider. * @see #setTransactionName * @see #setTransactionTimeout */ public void setTransactionFactory(TransactionFactory transactionFactory) { this.transactionFactory = transactionFactory; }