public abstract class JspSessionStd
extends java.lang.Object
<%@ page import = "mypackage.JspSession" %>
<% jspSession.takeNote(request); %>
<%@ page import = "mypackage.JspNameButler" %>
<% JspNameButler butler = (JspNameButler)jspSession.getButler(JspNameButler.class); %>
<% if (butler.workCausesReturn(request, response)) return;%>
mypackage.JspSession must extend de.must.markup.JspSessionStd
takeNote gives the session the chance to know the specific locale.
It's recommended to name the JspNameButler like the JSP plus "Butler".JspButler
Modifier and Type | Field and Description |
---|---|
java.util.Hashtable<java.lang.String,JspButler> |
butlers |
protected SessionData |
sessionData
The session's public data.
|
Constructor and Description |
---|
JspSessionStd()
Constructs a new JSP session.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
afterInitialDBConnection() |
void |
clearButlers()
Clears all cached butlers
|
protected SessionData |
createSessionData()
Constructs session data.
|
void |
destroy()
Destroy this object in order to free resources and weak references more early than
garbage collector.
|
protected void |
finalize() |
JspButler |
getButler(java.lang.Class<? extends JspButler> butlerClass)
Creates a singleton JSP butler of the class as specified and returns it.
|
protected abstract ConnectionSpecification |
getConnectionSpecification(java.lang.String realPath) |
protected abstract GlobalStd |
getGlobal()
Returns the application's specific global objects class.
|
protected abstract java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale)
Returns the resource bundle for the locale as specified.
|
boolean |
isWindowSeparating()
Returns the windowSeparating.
|
protected void |
rebuildDueToNewDBConnection()
Things to do after database connection has been rebuild to avoid 'No operations allowed after connection closed
|
static void |
setAutomaticButlerCacheReorganization(boolean newAutomaticButlerCacheReorganization)
Determines whether or not butler cache shall be reorganized automatically.
|
static void |
setUseSeperateConnectionsForEachSession(boolean newSeparateConnections)
Determines whether each session should use its own database connection or not.
|
void |
setWindowSeparating(boolean windowSeparating)
Activates the window separating.
|
void |
takeNote(HttpServletRequest request)
To be called by the JSP each time the JSP is loaded.
|
protected SessionData sessionData
public java.util.Hashtable<java.lang.String,JspButler> butlers
public JspSessionStd()
public static void setUseSeperateConnectionsForEachSession(boolean newSeparateConnections)
separateConnections
- whether each session should use its own database connection or notpublic static void setAutomaticButlerCacheReorganization(boolean newAutomaticButlerCacheReorganization)
newAutomaticButlerCacheReorganization
- whether or not butler cache shall be reorganized automaticallyJspButler.getButlerFriends()
protected void rebuildDueToNewDBConnection()
protected SessionData createSessionData()
public boolean isWindowSeparating()
public void setWindowSeparating(boolean windowSeparating)
windowSeparating
- The windowSeparating to setpublic void takeNote(HttpServletRequest request)
protected abstract ConnectionSpecification getConnectionSpecification(java.lang.String realPath)
protected abstract void afterInitialDBConnection()
public void clearButlers()
public JspButler getButler(java.lang.Class<? extends JspButler> butlerClass)
butlerClass
- the wished butlers classprotected abstract GlobalStd getGlobal()
protected abstract java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
public void destroy()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de