| |
|
| java.lang.Object org.springframework.transaction.support.AbstractPlatformTransactionManager org.springframework.orm.jdo.JdoTransactionManager
JdoTransactionManager | public JdoTransactionManager(PersistenceManagerFactory pmf)(Code) | | Create a new JdoTransactionManager instance.
Parameters: pmf - PersistenceManagerFactory to manage transactions for |
afterPropertiesSet | public void afterPropertiesSet()(Code) | | Eagerly initialize the JDO dialect, creating a default one
for the specified PersistenceManagerFactory if none set.
Auto-detect the PersistenceManagerFactory's DataSource, if any.
|
convertJdoAccessException | protected DataAccessException convertJdoAccessException(JDOException ex)(Code) | | Convert the given JDOException to an appropriate exception from the
org.springframework.dao hierarchy.
Default implementation delegates to the JdoDialect.
May be overridden in subclasses.
Parameters: ex - JDOException that occured the corresponding DataAccessException instance See Also: JdoDialect.translateException |
doCleanupAfterCompletion | protected void doCleanupAfterCompletion(Object transaction)(Code) | | |
getDataSource | public DataSource getDataSource()(Code) | | Return the JDBC DataSource that this instance manages transactions for.
|
getJdoDialect | public JdoDialect getJdoDialect()(Code) | | Return the JDO dialect to use for this transaction manager.
Creates a default one for the specified PersistenceManagerFactory if none set.
|
getPersistenceManagerFactory | public PersistenceManagerFactory getPersistenceManagerFactory()(Code) | | Return the PersistenceManagerFactory that this instance should manage transactions for.
|
isExistingTransaction | protected boolean isExistingTransaction(Object transaction)(Code) | | |
setAutodetectDataSource | public void setAutodetectDataSource(boolean autodetectDataSource)(Code) | | Set whether to autodetect a JDBC DataSource used by the JDO PersistenceManagerFactory,
as returned by the getConnectionFactory() method. Default is "true".
Can be turned off to deliberately ignore an available DataSource,
to not expose JDO transactions as JDBC transactions for that DataSource.
See Also: JdoTransactionManager.setDataSource See Also: javax.jdo.PersistenceManagerFactory.getConnectionFactory |
setDataSource | public void setDataSource(DataSource dataSource)(Code) | | Set the JDBC DataSource that this instance should manage transactions for.
The DataSource should match the one used by the JDO PersistenceManagerFactory:
for example, you could specify the same JNDI DataSource for both.
If the PersistenceManagerFactory uses a DataSource as connection factory,
the DataSource will be autodetected: You can still explictly specify the
DataSource, but you don't need to in this case.
A transactional JDBC Connection for this DataSource will be provided to
application code accessing this DataSource directly via DataSourceUtils
or JdbcTemplate. The Connection will be taken from the JDO PersistenceManager.
Note that you need to use a JDO dialect for a specific JDO provider to
allow for exposing JDO transactions as JDBC transactions.
The DataSource specified here should be the target DataSource to manage
transactions for, not a TransactionAwareDataSourceProxy. Only data access
code may work with TransactionAwareDataSourceProxy, while the transaction
manager needs to work on the underlying target DataSource. If there's
nevertheless a TransactionAwareDataSourceProxy passed in, it will be
unwrapped to extract its target DataSource.
See Also: JdoTransactionManager.setAutodetectDataSource See Also: JdoTransactionManager.setJdoDialect See Also: javax.jdo.PersistenceManagerFactory.getConnectionFactory See Also: org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy See Also: org.springframework.jdbc.datasource.DataSourceUtils See Also: org.springframework.jdbc.core.JdbcTemplate |
setJdoDialect | public void setJdoDialect(JdoDialect jdoDialect)(Code) | | Set the JDO dialect to use for this transaction manager.
The dialect object can be used to retrieve the underlying JDBC connection
and thus allows for exposing JDO transactions as JDBC transactions.
See Also: JdoDialect.getJdbcConnection |
setPersistenceManagerFactory | public void setPersistenceManagerFactory(PersistenceManagerFactory pmf)(Code) | | Set the PersistenceManagerFactory that this instance should manage transactions for.
The PersistenceManagerFactory specified here should be the target
PersistenceManagerFactory to manage transactions for, not a
TransactionAwarePersistenceManagerFactoryProxy. Only data access
code may work with TransactionAwarePersistenceManagerFactoryProxy, while the
transaction manager needs to work on the underlying target PersistenceManagerFactory.
See Also: TransactionAwarePersistenceManagerFactoryProxy |
shouldCommitOnGlobalRollbackOnly | protected boolean shouldCommitOnGlobalRollbackOnly()(Code) | | This implementation returns "true": a JDO2 commit will properly handle
transactions that have been marked rollback-only at a global level.
|
Fields inherited from org.springframework.transaction.support.AbstractPlatformTransactionManager | final public static int SYNCHRONIZATION_ALWAYS(Code)(Java Doc) final public static int SYNCHRONIZATION_NEVER(Code)(Java Doc) final public static int SYNCHRONIZATION_ON_ACTUAL_TRANSACTION(Code)(Java Doc) protected transient Log logger(Code)(Java Doc)
|
Methods inherited from org.springframework.transaction.support.AbstractPlatformTransactionManager | final public void commit(TransactionStatus status) throws TransactionException(Code)(Java Doc) protected int determineTimeout(TransactionDefinition definition)(Code)(Java Doc) abstract protected void doBegin(Object transaction, TransactionDefinition definition) throws TransactionException(Code)(Java Doc) protected void doCleanupAfterCompletion(Object transaction)(Code)(Java Doc) abstract protected void doCommit(DefaultTransactionStatus status) throws TransactionException(Code)(Java Doc) abstract protected Object doGetTransaction() throws TransactionException(Code)(Java Doc) protected void doResume(Object transaction, Object suspendedResources) throws TransactionException(Code)(Java Doc) abstract protected void doRollback(DefaultTransactionStatus status) throws TransactionException(Code)(Java Doc) protected void doSetRollbackOnly(DefaultTransactionStatus status) throws TransactionException(Code)(Java Doc) protected Object doSuspend(Object transaction) throws TransactionException(Code)(Java Doc) final public int getDefaultTimeout()(Code)(Java Doc) final public TransactionStatus getTransaction(TransactionDefinition definition) throws TransactionException(Code)(Java Doc) final public int getTransactionSynchronization()(Code)(Java Doc) final protected void invokeAfterCompletion(List synchronizations, int completionStatus)(Code)(Java Doc) protected boolean isExistingTransaction(Object transaction) throws TransactionException(Code)(Java Doc) final public boolean isFailEarlyOnGlobalRollbackOnly()(Code)(Java Doc) final public boolean isGlobalRollbackOnParticipationFailure()(Code)(Java Doc) final public boolean isNestedTransactionAllowed()(Code)(Java Doc) final public boolean isRollbackOnCommitFailure()(Code)(Java Doc) protected DefaultTransactionStatus newTransactionStatus(TransactionDefinition definition, Object transaction, boolean newTransaction, boolean newSynchronization, boolean debug, Object suspendedResources)(Code)(Java Doc) protected void registerAfterCompletionWithExistingTransaction(Object transaction, List synchronizations) throws TransactionException(Code)(Java Doc) final protected void resume(Object transaction, SuspendedResourcesHolder resourcesHolder) throws TransactionException(Code)(Java Doc) final public void rollback(TransactionStatus status) throws TransactionException(Code)(Java Doc) final public void setDefaultTimeout(int defaultTimeout)(Code)(Java Doc) final public void setFailEarlyOnGlobalRollbackOnly(boolean failEarlyOnGlobalRollbackOnly)(Code)(Java Doc) final public void setGlobalRollbackOnParticipationFailure(boolean globalRollbackOnParticipationFailure)(Code)(Java Doc) final public void setNestedTransactionAllowed(boolean nestedTransactionAllowed)(Code)(Java Doc) final public void setRollbackOnCommitFailure(boolean rollbackOnCommitFailure)(Code)(Java Doc) final public void setTransactionSynchronization(int transactionSynchronization)(Code)(Java Doc) final public void setTransactionSynchronizationName(String constantName)(Code)(Java Doc) protected boolean shouldCommitOnGlobalRollbackOnly()(Code)(Java Doc) final protected SuspendedResourcesHolder suspend(Object transaction) throws TransactionException(Code)(Java Doc) final protected void triggerBeforeCommit(DefaultTransactionStatus status)(Code)(Java Doc) final protected void triggerBeforeCompletion(DefaultTransactionStatus status)(Code)(Java Doc) protected boolean useSavepointForNestedTransaction()(Code)(Java Doc)
|
|
|
|