Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> OWAS3.0, Java cartridge and Sessions
All,
I am having trouble understanding the way sessions work with the Java cartridge on Oracle web server 3.0.1.1.0.
I have sessions enabled on the cartridge admin page (and this is reflected in the wrb.app file) timeout set to 300. I quote from the WAS_FAQ I go from www.oracle.com:
Q: If I have a session-enabled cartridge, does it service requests from more than one client simultaneously, or is it dedicated to a single client at a time?
This is NOT the bahaviour I have witnessed. I have tried the following types of different clients simultaneously:
All are connecting to the same cartridge instance. The timeout works OK, but different clients are not being directed to different instances of the cartridge. I know this from two observations:
From this I deduce that either the FAQ is wrong, or I have things configured wrongly.
Has anybody else got to the bottom of this? ARe there any online docs? the ones I have read from Oracle seem to skate over the issue of sessions.
Thanks,
Rob.
Example code follows:
import oracle.html.*;
import java.util.*;
import java.io.*;
import oracle.owas.wrb.WRB;
public class aTest
{
public static int calls = 0;
public static void main(String args[]) { calls++; HtmlStream out = HtmlStream.theStream(); out.println("Content-type: text/html"); out.println("<HTML><HEAD>HEADER</HEAD><P>"); out.println("<BODY>BODY</BODY>"); out.println("<P>Calls so far: " +
String strContext = (String)WRB.getClientContext(); if (strContext == null)
{
out.println("Context is null<P>"); String str = new String("This is the context string"); WRB.setClientContext(str); } else
{
out.println("Context is not null: " + strContext + "<P>"); } out.println("</HTML>"); }