throw new IllegalArgumentException("transactions are not supported by your Jcr Repository");
if (logger.isDebugEnabled()) {
logger.debug("Opened new session [" + newSession + "] for JCR transaction");
}
txObject.setSessionHolder(new UserTxSessionHolder(newSession), true);
}
UserTxSessionHolder sessionHolder = txObject.getSessionHolder();
sessionHolder.setSynchronizedWithTransaction(true);
session = (XASession)sessionHolder.getSession();
/*
* We have no notion of flushing inside a JCR session
*
if (transactionDefinition.isReadOnly() && txObject.isNewSessionHolder()) {
sessionHolder.setReadOnly(true);
}
if (!transactionDefinition.isReadOnly() && !txObject.isNewSessionHolder()) {
if (sessionHolder.isReadOnly()) {
sessionHolder.setReadOnly(false);
}
}
*/
// start the transaction
sessionHolder.getTransaction().begin();
// Register transaction timeout.
if (transactionDefinition.getTimeout() != TransactionDefinition.TIMEOUT_DEFAULT) {
txObject.getSessionHolder().setTimeoutInSeconds(transactionDefinition.getTimeout());
}