PAJES 3.0.21

org.pajes.servlet
Class Initialisation

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.pajes.servlet.PajeServlet
              extended by org.pajes.servlet.DataAccessPajeServlet
                  extended by org.pajes.servlet.Initialisation
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Deprecated. Use PajesContext.

@Deprecated
public class Initialisation
extends DataAccessPajeServlet

Initialises the PAJES servlet framework.

See Also:
Serialized Form

Field Summary
static java.lang.String ACCESS_PERMISSION_INIT_PARAM_NAME
          Deprecated. The name of the <init-param> for the Initialisation servlet in the deployment descriptor that identifies the AccessPermission sub-class that will be used to control access to the web application,
static java.lang.String DEBUG_INIT_PARAM_NAME
          Deprecated. The name of the <init-param> for the Initialisation servlet in the deployment descriptor that identifies whether debugging is to be turned on by default.
 
Constructor Summary
Initialisation()
          Deprecated.  
 
Method Summary
 void destroy()
          Deprecated. Called by the servlet container when servlets are unloaded.
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. Displays information about PAJES and the environment.
 javax.servlet.ServletContext getServletContext()
          Deprecated. Returns a reference to the in which this class is running.
 java.lang.String getServletInfo()
          Deprecated. Returns the PAJES copyright information.
 void init()
          Deprecated. PAJES servlet framework initialisation.
 void init(javax.servlet.ServletContext context)
          Deprecated. Main PAJES servlet framework initialisation.
protected  boolean isAccessPermissionRegistered()
          Deprecated. Determines if an AccessPermission sub-class has been registered or not.
protected  AccessPermission registerAccessPermission(java.lang.String permission)
          Deprecated. Instantiates and registers the specified AccessPermission sub-class.
protected  ConnectionManager registerConnectionManager()
          Deprecated. Creates and registers the Connection Pool Manager.
 
Methods inherited from class org.pajes.servlet.DataAccessPajeServlet
getDBConnection, getDBConnection, getDBConnectionPoolManager, service
 
Methods inherited from class org.pajes.servlet.PajeServlet
createPaje, createPaje, createPaje, doPost, getAbsoluteHREF, getBaseHREF, getMaxFileUploadSize, getPajeFactory, getResource, getUploadedFile, getUploadedFileNames, handleException, init, log, log, setInputFieldsFromRequestAttributes, setInputFieldsFromRequestParameters, setMaxFileUploadSize, setPajeFactory
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_PERMISSION_INIT_PARAM_NAME

public static final java.lang.String ACCESS_PERMISSION_INIT_PARAM_NAME
Deprecated. 
The name of the <init-param> for the Initialisation servlet in the deployment descriptor that identifies the AccessPermission sub-class that will be used to control access to the web application,

See Also:
Constant Field Values

DEBUG_INIT_PARAM_NAME

public static final java.lang.String DEBUG_INIT_PARAM_NAME
Deprecated. 
The name of the <init-param> for the Initialisation servlet in the deployment descriptor that identifies whether debugging is to be turned on by default.

See Also:
Constant Field Values
Constructor Detail

Initialisation

public Initialisation()
Deprecated. 
Method Detail

destroy

public void destroy()
Deprecated. 
Called by the servlet container when servlets are unloaded.

Destruction performs the following checks and actions:

  1. Determines if a ConnectionManager was created, and if so shuts down it and any defined ConnectionPools.
  2. Determines if an AccessPermission sub-class has been defined for this application, and if so, calls its AccessPermission.destroy() method.

Sub-classes MUST call super.destroy() if this method is over-ridden.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

getServletContext

public javax.servlet.ServletContext getServletContext()
Deprecated. 
Returns a reference to the in which this class is running.

Specified by:
getServletContext in interface javax.servlet.ServletConfig
Overrides:
getServletContext in class javax.servlet.GenericServlet
Returns:
the ServletContext object.

getServletInfo

public java.lang.String getServletInfo()
Deprecated. 
Returns the PAJES copyright information.

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet
Returns:
the PAJES copyright information.

init

public void init()
          throws javax.servlet.ServletException
Deprecated. 
PAJES servlet framework initialisation.

Sub-classes that over-ride this init() method MUST call super.init() to complete PAJES initialisation before performing any application-specific processing.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException - if an exception occurs that interrupts the servlet's normal operation
See Also:
init(ServletContext)

init

public void init(javax.servlet.ServletContext context)
          throws javax.servlet.ServletException
Deprecated. 
Main PAJES servlet framework initialisation.

Initialisation performs the following checks and actions:

  1. Determines if an AccessPermission sub-class has been defined for this application, and if, so instantiates it.
  2. Determines if the /WEB-INF/database.xml deployment descriptor exists, and if so, initialises the ConnectionManager and any defined ConnectionPools.

Sub-classes that over-ride this init(ServletContext) method MUST call super.init(context) to complete PAJES initialisation before performing any application-specific processing.

Parameters:
context - the Servlet Context.
Throws:
javax.servlet.ServletException - if an exception occurs that interrupts the servlet's normal operation.
PajeServletException - if the AccessPermission sub-class cannot be instantiated.

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Deprecated. 
Displays information about PAJES and the environment.

Overrides:
doGet in class PajeServlet
Parameters:
request - the request object.
response - the response object.
Throws:
javax.servlet.ServletException - if an unrecoverable exception occurs.
java.io.IOException - if an I/O error occurs.

isAccessPermissionRegistered

protected boolean isAccessPermissionRegistered()
Deprecated. 
Determines if an AccessPermission sub-class has been registered or not.

Returns:
true if an AccessPermission has been registered.

registerAccessPermission

protected AccessPermission registerAccessPermission(java.lang.String permission)
                                             throws java.lang.ClassNotFoundException,
                                                    java.lang.IllegalAccessException,
                                                    java.lang.InstantiationException
Deprecated. 
Instantiates and registers the specified AccessPermission sub-class. Called by the init() method.

Parameters:
permission - the name of the AccessPermission sub-class to instantiate and register.
Returns:
the AccessPermission instance. If an AccessPermission instance has already been registered, it will be replaced with this new instance.
Throws:
java.lang.ClassNotFoundException - if the AccessPermission sub-class specified cannot be located.
java.lang.IllegalAccessException - if the AccessPermission sub-class specified is an interface or an abstract class.
java.lang.InstantiationException - if an error occurs instantiating the AccessPermission sub-class.

registerConnectionManager

protected ConnectionManager registerConnectionManager()
Deprecated. 
Creates and registers the Connection Pool Manager. Called by the init() method.

Returns:
the ConnectionManager instance. If no ConnectionManager instance has been registered, a new instance will be created.

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.