@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -169,8 +169,7 @@ public class SqlLobValue implements DisposableSqlTypeValue {
|
||||
* Set the specified content via the LobCreator.
|
||||
*/
|
||||
@Override
|
||||
public void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName)
|
||||
throws SQLException {
|
||||
public void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException {
|
||||
if (sqlType == Types.BLOB) {
|
||||
if (this.content instanceof byte[] || this.content == null) {
|
||||
this.lobCreator.setBlobAsBytes(ps, paramIndex, (byte[]) this.content);
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
/**
|
||||
* Provides a stategy interface for Large OBject handling,
|
||||
* with implementations for various databases.
|
||||
*
|
||||
* <p>Can be used independently from jdbc.core and jdbc.object,
|
||||
* for example in custom JDBC access code.
|
||||
* Provides a strategy interface for Large OBject handling,
|
||||
* as well as a customizable default implementation.
|
||||
*/
|
||||
package org.springframework.jdbc.support.lob;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -131,8 +131,8 @@ public abstract class ConnectionFactoryUtils {
|
||||
* @return the transactional Session, or {@code null} if none found
|
||||
* @throws JMSException in case of JMS failure
|
||||
*/
|
||||
public static Session getTransactionalSession(
|
||||
final ConnectionFactory cf, final Connection existingCon, final boolean synchedLocalTransactionAllowed)
|
||||
public static Session getTransactionalSession(final ConnectionFactory cf,
|
||||
final Connection existingCon, final boolean synchedLocalTransactionAllowed)
|
||||
throws JMSException {
|
||||
|
||||
return doGetTransactionalSession(cf, new ResourceFactory() {
|
||||
@@ -173,8 +173,8 @@ public abstract class ConnectionFactoryUtils {
|
||||
* @return the transactional Session, or {@code null} if none found
|
||||
* @throws JMSException in case of JMS failure
|
||||
*/
|
||||
public static QueueSession getTransactionalQueueSession(
|
||||
final QueueConnectionFactory cf, final QueueConnection existingCon, final boolean synchedLocalTransactionAllowed)
|
||||
public static QueueSession getTransactionalQueueSession(final QueueConnectionFactory cf,
|
||||
final QueueConnection existingCon, final boolean synchedLocalTransactionAllowed)
|
||||
throws JMSException {
|
||||
|
||||
return (QueueSession) doGetTransactionalSession(cf, new ResourceFactory() {
|
||||
@@ -215,8 +215,8 @@ public abstract class ConnectionFactoryUtils {
|
||||
* @return the transactional Session, or {@code null} if none found
|
||||
* @throws JMSException in case of JMS failure
|
||||
*/
|
||||
public static TopicSession getTransactionalTopicSession(
|
||||
final TopicConnectionFactory cf, final TopicConnection existingCon, final boolean synchedLocalTransactionAllowed)
|
||||
public static TopicSession getTransactionalTopicSession(final TopicConnectionFactory cf,
|
||||
final TopicConnection existingCon, final boolean synchedLocalTransactionAllowed)
|
||||
throws JMSException {
|
||||
|
||||
return (TopicSession) doGetTransactionalSession(cf, new ResourceFactory() {
|
||||
@@ -234,7 +234,8 @@ public abstract class ConnectionFactoryUtils {
|
||||
}
|
||||
@Override
|
||||
public Session createSession(Connection con) throws JMSException {
|
||||
return ((TopicConnection) con).createTopicSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE);
|
||||
return ((TopicConnection) con).createTopicSession(
|
||||
synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE);
|
||||
}
|
||||
@Override
|
||||
public boolean isSynchedLocalTransactionAllowed() {
|
||||
@@ -339,8 +340,8 @@ public abstract class ConnectionFactoryUtils {
|
||||
}
|
||||
if (resourceHolderToUse != resourceHolder) {
|
||||
TransactionSynchronizationManager.registerSynchronization(
|
||||
new JmsResourceSynchronization(
|
||||
resourceHolderToUse, connectionFactory, resourceFactory.isSynchedLocalTransactionAllowed()));
|
||||
new JmsResourceSynchronization(resourceHolderToUse, connectionFactory,
|
||||
resourceFactory.isSynchedLocalTransactionAllowed()));
|
||||
resourceHolderToUse.setSynchronizedWithTransaction(true);
|
||||
TransactionSynchronizationManager.bindResource(connectionFactory, resourceHolderToUse);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,15 +40,12 @@ public abstract class TransactionCallbackWithoutResult implements TransactionCal
|
||||
* context. Does not need to care about transactions itself, although it can retrieve
|
||||
* and influence the status of the current transaction via the given status object,
|
||||
* e.g. setting rollback-only.
|
||||
*
|
||||
* <p>A RuntimeException thrown by the callback is treated as application
|
||||
* exception that enforces a rollback. An exception gets propagated to the
|
||||
* caller of the template.
|
||||
*
|
||||
* <p>Note when using JTA: JTA transactions only work with transactional
|
||||
* JNDI resources, so implementations need to use such resources if they
|
||||
* want transaction support.
|
||||
*
|
||||
* @param status associated transaction status
|
||||
* @see TransactionTemplate#execute
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user