com.atlassian.confluence.spring.service
Class ServiceCommandTransactionProxy

java.lang.Object
  extended by com.atlassian.confluence.spring.service.ServiceCommandTransactionProxy

public class ServiceCommandTransactionProxy
extends java.lang.Object

Proxy for wrapping service commands in Spring-managed transactions. Each of the "do stuff" methods on the service command (isAuthorized, isValid and execute) are wrapped in their own transactions.

This means that if you run a service command the multi-method-call way without an additional containing transaction that the command can join, you run the risk of Hibernate errors. If you are running a service without a containing transaction, use the single method "execute and catch exceptions" method.

See Also:
ServiceCommand

Constructor Summary
ServiceCommandTransactionProxy(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
ServiceCommandTransactionProxy(org.springframework.transaction.PlatformTransactionManager transactionManager, java.lang.String isolationLevel, java.lang.String propagation)
           
 
Method Summary
 ServiceCommand proxyCommand(ServiceCommand command, java.lang.Class proxyInterface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceCommandTransactionProxy

public ServiceCommandTransactionProxy(org.springframework.transaction.PlatformTransactionManager transactionManager)

ServiceCommandTransactionProxy

public ServiceCommandTransactionProxy(org.springframework.transaction.PlatformTransactionManager transactionManager,
                                      java.lang.String isolationLevel,
                                      java.lang.String propagation)
Method Detail

proxyCommand

public ServiceCommand proxyCommand(ServiceCommand command,
                                   java.lang.Class proxyInterface)


Copyright © 2003-2014 Atlassian. All Rights Reserved.