public interface SharedSessionBuilder extends SessionBuilder
SessionBuilder with access to stuff from another session.| Modifier 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, statementInspector, tenantIdentifierSharedSessionBuilder 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)
SessionBuilderinterceptor in interface SessionBuilderinterceptor - The interceptor to use.this, for method chainingSharedSessionBuilder noInterceptor()
SessionBuilderInterceptor 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 SessionBuilderthis, for method chainingSharedSessionBuilder connection(Connection connection)
SessionBuilderconnection in interface SessionBuilderconnection - The connection to use.this, for method chainingSharedSessionBuilder connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode)
SessionBuilderconnectionReleaseMode in interface SessionBuilderconnectionReleaseMode - The connection release mode to use.this, for method chainingSharedSessionBuilder autoJoinTransactions(boolean autoJoinTransactions)
SessionBuilderautoJoinTransactions in interface SessionBuilderautoJoinTransactions - Should JTA transactions be automatically joinedthis, for method chainingSharedSessionBuilder autoClose(boolean autoClose)
SessionBuilderautoClose in interface SessionBuilderautoClose - Should the session be automatically closedthis, for method chainingSharedSessionBuilder flushBeforeCompletion(boolean flushBeforeCompletion)
SessionBuilderflushBeforeCompletion in interface SessionBuilderflushBeforeCompletion - Should the session be automatically flushedthis, for method chainingCopyright © 2017 JBoss by Red Hat. All rights reserved.