public interface UnitOfWorkFactory
A unit of work factory facilitates managing one or more sessions, without having to explicitly know about the sessions themselves.
A UnitOfWorkFactory can be used to determine the open session/entity manager demarcations.
OpenSessionInViewInterceptor,
OpenEntityManagerInViewInterceptor| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method and Description |
|---|---|
<T> Callable<T> |
create(Callable<T> callable)
Wraps a Callable into a unit of work.
|
Runnable |
create(Runnable runnable)
Wraps a Runnable into a unit of work.
|
void |
restart()
When called, this will close and reopen all Sessions attached
to the current thread.
|
UnitOfWork |
start()
Starts a new unit of work: opens all Sessions.
|
void |
stop()
Stops the unit of work: closes all Sessions.
|
Runnable create(Runnable runnable)
runnable - Original runnable instance.<T> Callable<T> create(Callable<T> callable)
T - the result type of the method callcallable - Original callable instance.UnitOfWork start()
void stop()
void restart()
Copyright © 2020. All rights reserved.