|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.support.session.CompassSessionTransactionalProxy
public class CompassSessionTransactionalProxy
InvocationHandler for CompassSession. Used
within already transactional context in order to simplify the usage
of CompassSession. With this wrapper, there is no need to call openSession,
or close() on the session. There is no need to use Compass transaction
API as well.
| Constructor Summary | |
|---|---|
CompassSessionTransactionalProxy(Compass compass)
Constrcuts a new invocation handler based on the session. |
|
| Method Summary | |
|---|---|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Since Compass already does most of the session management, this wrapper around CompassSession invocation simply uses Compass.openSession()
and invoke the appropiate method on the session returned. |
static CompassSession |
newProxy(Compass compass)
Creates a new proxied CompassSession that can
be used within an already running transcational context without worrying
about session management API or transcation management API. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompassSessionTransactionalProxy(Compass compass)
CompassSession for simpler API usage
within a transactional context.
compass - The Compass instance to use for session creation| Method Detail |
|---|
public static CompassSession newProxy(Compass compass)
CompassSession that can
be used within an already running transcational context without worrying
about session management API or transcation management API.
compass - The compass instance used to create the session
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
CompassSession invocation simply uses Compass.openSession()
and invoke the appropiate method on the session returned. Compass will make sure that this is the correct
session within the context.
invoke in interface InvocationHandlerThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||