Package de.businesscode.bcdui.web.wrs
Class RequestOptions
java.lang.Object
de.businesscode.bcdui.web.wrs.RequestOptions
- All Implemented Interfaces:
IRequestOptions
Implements IRequestOptions for Wrs operations, which may not be originated in an HTTP request
When using getManagedConnection() also call returnAllThreadManagedConnections()!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClose all managed connections associated with the current threadgetBindingsfinal jakarta.servlet.http.HttpServletRequestgetManagedConnection(String dbSourceName) When using this also call returnAllThreadManagedConnections(), otherwise db connections leakintMethod getMaxRowsintgets max count of statements to execute in SQL StatementgetRequestDocgetRequestUrljakarta.servlet.ServletContextfinal StringgetUnmanagedConnection(String dbSourceName) gets UnmanagedConnection, that should be closed by userbooleanisDebugModevoidsetMaxSQLBatchSize(int i) sets max count of statements to execute in SQL StatementvoidsetRequestDoc(Document doc) Delayed setting the request doc, of not already available in constructor
-
Constructor Details
-
RequestOptions
public RequestOptions(int maxRows) HttpRequestOptions- Parameters:
servletCtx-request-
-
-
Method Details
-
getServletCtx
public jakarta.servlet.ServletContext getServletCtx() -
getHttpRequest
public final jakarta.servlet.http.HttpServletRequest getHttpRequest()- Returns:
- the httpRequest
-
getSessionId
- Returns:
- the sessionId or null
-
getManagedConnection
When using this also call returnAllThreadManagedConnections(), otherwise db connections leak- Specified by:
getManagedConnectionin interfaceIRequestOptions- Parameters:
dbSourceName- - the name of requeted db-connection, null for default- Returns:
- the database connection
- Throws:
Exception- - if connection with the name not found or database is not available- See Also:
-
closeAllThreadManagedConnections
Close all managed connections associated with the current thread- Throws:
SQLException
-
getRequestUrl
Description copied from interface:IRequestOptionsgetRequestUrl- Specified by:
getRequestUrlin interfaceIRequestOptions- Returns:
- the URL of the request
- See Also:
-
getRequestDoc
Description copied from interface:IRequestOptionsgetRequestDoc- Specified by:
getRequestDocin interfaceIRequestOptions- Returns:
- the request xml-document or null
- See Also:
-
isDebugMode
public boolean isDebugMode()Description copied from interface:IRequestOptionsisDebugMode- Specified by:
isDebugModein interfaceIRequestOptions- Returns:
- true if debug mode
- See Also:
-
getBindings
Description copied from interface:IRequestOptionsgetBindings- Specified by:
getBindingsin interfaceIRequestOptions- Returns:
- the Bindings used for this request, using this and not Bindings.getInstance() allows usage in batch environments
- See Also:
-
getMaxSQLBatchSize
public int getMaxSQLBatchSize()gets max count of statements to execute in SQL Statement- Specified by:
getMaxSQLBatchSizein interfaceIRequestOptions- Returns:
- max count of statements to execute in a SQL Statement
-
setMaxSQLBatchSize
public void setMaxSQLBatchSize(int i) sets max count of statements to execute in SQL Statement- Specified by:
setMaxSQLBatchSizein interfaceIRequestOptions- Parameters:
i- - max count of statements to execute in a SQL Statement
-
getUnmanagedConnection
Description copied from interface:IRequestOptionsgets UnmanagedConnection, that should be closed by user- Specified by:
getUnmanagedConnectionin interfaceIRequestOptions- Returns:
- Throws:
Exception
-
getMaxRows
public int getMaxRows()Description copied from interface:IRequestOptionsMethod getMaxRows- Specified by:
getMaxRowsin interfaceIRequestOptions- Returns:
- max count rows to be returned
-
setRequestDoc
Description copied from interface:IRequestOptionsDelayed setting the request doc, of not already available in constructor- Specified by:
setRequestDocin interfaceIRequestOptions
-