public interface SharedSessionBuilder extends SessionBuilder
SessionBuilder
with access to stuff from another sessionModifier and Type | Method and Description |
---|---|
SharedSessionBuilder |
autoClose()
Deprecated.
For same reasons as
SessionBuilder.autoClose(boolean) was deprecated. However, shared
session builders can use autoClose(boolean) since they do not "inherit" the owner. |
SharedSessionBuilder |
autoClose(boolean autoClose)
Should the session be automatically closed after transaction completion
|
SharedSessionBuilder |
autoJoinTransactions()
Signifies that the autoJoinTransaction flag from the original session should be used to create the new session
|
SharedSessionBuilder |
autoJoinTransactions(boolean autoJoinTransactions)
Should the session built automatically join in any ongoing JTA transactions
|
SharedSessionBuilder |
connection()
Signifies that the connection from the original session should be used to create the new session
|
SharedSessionBuilder |
connection(Connection connection)
Adds a specific connection to the session options
|
SharedSessionBuilder |
connectionReleaseMode()
Signifies that the connection release mode from the original session should be used to create the new session
|
SharedSessionBuilder |
connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
Use a specific connection release mode for these session options
|
SharedSessionBuilder |
flushBeforeCompletion()
Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session
|
SharedSessionBuilder |
flushBeforeCompletion(boolean flushBeforeCompletion)
Should the session be automatically flushed during the "before completion" phase of transaction handling.
|
SharedSessionBuilder |
interceptor()
Signifies the interceptor from the original session should be used to create the new session
|
SharedSessionBuilder |
interceptor(Interceptor interceptor)
Adds a specific interceptor to the session options
|
SharedSessionBuilder |
noInterceptor()
Signifies that no
Interceptor should be used. |
SharedSessionBuilder |
transactionContext()
Signifies that the transaction context from the original session should be used to create the new session
|
clearEventListeners, eventListeners, openSession, tenantIdentifier
SharedSessionBuilder interceptor()
this
, for method chainingSharedSessionBuilder connection()
this
, for method chainingSharedSessionBuilder connectionReleaseMode()
this
, for method chainingSharedSessionBuilder autoJoinTransactions()
this
, for method chaining@Deprecated SharedSessionBuilder autoClose()
SessionBuilder.autoClose(boolean)
was deprecated. However, shared
session builders can use autoClose(boolean)
since they do not "inherit" the owner.this
, for method chainingSharedSessionBuilder flushBeforeCompletion()
this
, for method chainingSharedSessionBuilder transactionContext()
this
, for method chainingSharedSessionBuilder interceptor(Interceptor interceptor)
SessionBuilder
interceptor
in interface SessionBuilder
interceptor
- The interceptor to use.this
, for method chainingSharedSessionBuilder noInterceptor()
SessionBuilder
Interceptor
should be used.
By default the Interceptor
associated with the SessionFactory
is passed to the
Session
whenever we open one without the user having specified a specific interceptor to
use.
Calling SessionBuilder.interceptor(Interceptor)
with null has the same net effect.noInterceptor
in interface SessionBuilder
this
, for method chainingSharedSessionBuilder connection(Connection connection)
SessionBuilder
connection
in interface SessionBuilder
connection
- The connection to use.this
, for method chainingSharedSessionBuilder connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
SessionBuilder
connectionReleaseMode
in interface SessionBuilder
connectionReleaseMode
- The connection release mode to use.this
, for method chainingSharedSessionBuilder autoJoinTransactions(boolean autoJoinTransactions)
SessionBuilder
autoJoinTransactions
in interface SessionBuilder
autoJoinTransactions
- Should JTA transactions be automatically joinedthis
, for method chainingSharedSessionBuilder autoClose(boolean autoClose)
SessionBuilder
autoClose
in interface SessionBuilder
autoClose
- Should the session be automatically closedthis
, for method chainingSharedSessionBuilder flushBeforeCompletion(boolean flushBeforeCompletion)
SessionBuilder
flushBeforeCompletion
in interface SessionBuilder
flushBeforeCompletion
- Should the session be automatically flushedthis
, for method chainingCopyright © 2018 JBoss by Red Hat. All rights reserved.