private class JmsTransactionManager.LazyJmsResourceHolder extends JmsResourceHolder
JmsResourceHolder
,
initializing a JMS Connection and Session on user access.Modifier and Type | Field and Description |
---|---|
private boolean |
connectionInitialized |
private boolean |
sessionInitialized |
Constructor and Description |
---|
LazyJmsResourceHolder(ConnectionFactory connectionFactory) |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Return this resource holder's default Connection,
or
null if none. |
<C extends Connection> |
getConnection(java.lang.Class<C> connectionType)
Return this resource holder's Connection of the given type,
or
null if none. |
Session |
getSession()
Return this resource holder's default Session,
or
null if none. |
<S extends Session> |
getSession(java.lang.Class<S> sessionType)
Return this resource holder's Session of the given type,
or
null if none. |
<S extends Session> |
getSession(java.lang.Class<S> sessionType,
Connection connection)
Return this resource holder's Session of the given type
for the given connection, or
null if none. |
private void |
initializeConnection() |
private void |
initializeSession() |
addConnection, addSession, addSession, closeAll, commitAll, containsSession, getOriginalSession, isFrozen
clear, getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, resetRollbackOnly, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
private boolean connectionInitialized
private boolean sessionInitialized
public LazyJmsResourceHolder(@Nullable ConnectionFactory connectionFactory)
@Nullable public Connection getConnection()
JmsResourceHolder
null
if none.getConnection
in class JmsResourceHolder
@Nullable public <C extends Connection> C getConnection(java.lang.Class<C> connectionType)
JmsResourceHolder
null
if none.getConnection
in class JmsResourceHolder
@Nullable public Session getSession()
JmsResourceHolder
null
if none.getSession
in class JmsResourceHolder
@Nullable public <S extends Session> S getSession(java.lang.Class<S> sessionType)
JmsResourceHolder
null
if none.getSession
in class JmsResourceHolder
@Nullable public <S extends Session> S getSession(java.lang.Class<S> sessionType, @Nullable Connection connection)
JmsResourceHolder
null
if none.getSession
in class JmsResourceHolder
private void initializeConnection()
private void initializeSession()