org.tynamo.jpa
Interface JPATransactionDecorator
- All Known Implementing Classes:
- JPATransactionDecoratorImpl
public interface JPATransactionDecorator
Service that can create an interceptor that wraps around a service implementation. After invoking
service methods marked by org.apache.tapestry5.jpa.annotations.CommitAfter
the current
transaction is committed. Declared exceptions will also
commit the transaction;
runtime exceptions will the transaction.
It is recommended that you switch from the use of decoration to the use of advice; use the
org.apache.tapestry5.hibernate.JPATransactionAdvisor
(from a service advisor method)
instead.
Method Summary |
|
build(Class<T> serviceInterface,
T delegate,
String serviceId)
Builds a transaction interceptor instance around the delegate. |
build
<T> T build(Class<T> serviceInterface,
T delegate,
String serviceId)
- Builds a transaction interceptor instance around the delegate.
- Type Parameters:
T
- - Parameters:
serviceInterface
- interface implemented by the delegatedelegate
- existing object to be wrappedserviceId
- id of service
- Returns:
- a new object implementing the interface that can be used in place of the delegate,
providing transactional behavior
Copyright © 2009-2010. All Rights Reserved.