Requires a SessionFactory to be set, providing a TopLinkTemplate
based on it to subclasses. Can alternatively be initialized directly with
a TopLinkTemplate, to reuse the latter's settings such as the SessionFactory,
exception translator, etc.

This base class is mainly intended for TopLinkTemplate usage
but can also be used when working with SessionFactoryUtils directly,
for example in combination with TopLinkInterceptor-managed Sessions.
Convenience getSession and releaseSession
methods are provided for that usage style.

getSession

Get a TopLink Session, either from the current transaction or a new one.
The latter is only allowed if the "allowCreate" setting of this bean's
TopLinkTemplate is true.

Note that this is not meant to be invoked from TopLinkTemplate code
but rather just in plain TopLink code. Either rely on a thread-bound
Session (via TopLinkInterceptor), or use it in combination with
releaseSession.

In general, it is recommended to use TopLinkTemplate, either with
the provided convenience operations or with a custom TopLinkCallback
that provides you with a Session to work on. TopLinkTemplate will care
for all resource management and for proper exception conversion.

getSession

Get a TopLink Session, either from the current transaction or a new one.
The latter is only allowed if "allowCreate" is true.

Note that this is not meant to be invoked from TopLinkTemplate code
but rather just in plain TopLink code. Either rely on a thread-bound
Session (via TopLinkInterceptor), or use it in combination with
releaseSession.

In general, it is recommended to use TopLinkTemplate, either with
the provided convenience operations or with a custom TopLinkCallback
that provides you with a Session to work on. TopLinkTemplate will care
for all resource management and for proper exception conversion.

Parameters:

allowCreate - if a new Session should be created if no thread-bound found