quintonm 2003/01/09 17:30:34
Modified: xdocs/services index.xml navigation.xml
Added: xdocs/services session-service.xml
Log:
Added documentation for the Session service
Revision Changes Path
1.5 +6 -0 jakarta-turbine-2/xdocs/services/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/xdocs/services/index.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- index.xml 15 Dec 2002 13:09:11 -0000 1.4
+++ index.xml 10 Jan 2003 01:30:34 -0000 1.5
@@ -162,6 +162,12 @@
</li>
<li>
+<a href="session-service.html">Session Service</a>
+<br/>
+Provides access to Session information for the current web context.
+</li>
+
+<li>
<a href="servlet-service.html">Servlet Service</a>
<br/>
Encapsulates the information provided by the ServletContext API,
1.4 +1 -0 jakarta-turbine-2/xdocs/services/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/xdocs/services/navigation.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- navigation.xml 15 Dec 2002 13:09:11 -0000 1.3
+++ navigation.xml 10 Jan 2003 01:30:34 -0000 1.4
@@ -47,6 +47,7 @@
<item name="Scheduler Service" href="/services/scheduler-service.html"/>
<item name="Security Service" href="/services/security-service.html"/>
<item name="Servlet Service" href="/services/servlet-service.html"/>
+ <item name="Session Service" href="/services/session-service.html"/>
<item name="Template Service" href="/services/template-service.html"/>
<item name="Unique ID Service" href="/services/uniqueid-service.html"/>
<item name="Upload Service" href="/services/upload-service.html"/>
1.1 jakarta-turbine-2/xdocs/services/session-service.xml
Index: session-service.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Turbine Services - Session Service</title>
<author email="[EMAIL PROTECTED]">Quinton McCombs</author>
</properties>
<body>
<section name="Overview">
<p>
The Session Service was created to allow Turbine based applications
to access information about the current sessions in the
application's context. Some of the most obvious uses would include
<ul>
<li>Count of the active sessions</li>
<li>Determine if a given user is already logged in on another
session
</li>
<li>Terminate a session (not implemented yet)</li>
</ul>
</p>
<p>
The service is implemented by using a listener configured in
your application's deployment descriptor. The listener class
is used by the container to notify the service when sessions
are created or destroyed.
</p>
</section>
<section name="Configuration">
<p>
You will need to modify a few files in order to activate the service.
The first modification will be in your TurbineResources.properties.
See the example below for two settings that need to be present in
order for the service to work.
</p>
<source><![CDATA[
# -------------------------------------------------------------------
#
# S E R V I C E S
#
# -------------------------------------------------------------------
# Classes for Turbine Services should be defined here.
# Format: services.[name].classname=[implementing class]
#
# To specify properties of a service use the following syntax:
# service.[name].[property]=[value]
services.SessionService.classname=org.apache.turbine.services.session.TurbineSessionService
.
.
.
# -------------------------------------------------------------------
#
# S E S S I O N S E R V I C E
#
# -------------------------------------------------------------------
services.SessionService.earlyInit=true
]]></source>
<p>
The next modification will be your application's deployment
descriptor (web.xml). Here we will configure the listener class.
</p>
<source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>org.apache.turbine.services.session.SessionListener</listener-class>
</listener>
<servlet>
<servlet-name>MyServletName</servlet-name>
<servlet-class>org.apache.turbine.Turbine</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
</init-param>
</servlet>
</web-app>
]]></source>
</section>
<section name="Usage">
<p>
The Session Service should be accessed through the
<code>org.apache.turbine.services.session.TurbineSession</code> class. This
class will provide you with static methods for accessing the service. See
the javadocs for this class for information on the API.
</p>
</section>
</body>
</document>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>