@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface UnitOfWork
To be used outside Jersey, one need to create a proxy of the component with the annotated method.
Modifier and Type | Optional Element and Description |
---|---|
org.hibernate.CacheMode |
cacheMode
The
CacheMode for the session. |
org.hibernate.FlushMode |
flushMode
The
FlushMode for the session. |
boolean |
readOnly
If
true , the Hibernate session will default to loading read-only entities. |
boolean |
transactional
If
true , a transaction will be automatically started before the resource method is
invoked, committed if the method returned, and rolled back if an exception was thrown. |
String |
value
The name of a hibernate bundle (session factory) that specifies
a datasource against which a transaction will be opened.
|
public abstract boolean readOnly
true
, the Hibernate session will default to loading read-only entities.Session.setDefaultReadOnly(boolean)
public abstract boolean transactional
true
, a transaction will be automatically started before the resource method is
invoked, committed if the method returned, and rolled back if an exception was thrown.public abstract org.hibernate.CacheMode cacheMode
CacheMode
for the session.CacheMode
,
Session.setCacheMode(CacheMode)
public abstract org.hibernate.FlushMode flushMode
FlushMode
for the session.FlushMode
,
Session.setFlushMode(org.hibernate.FlushMode)
public abstract String value
Copyright © 2011. All rights reserved.