Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to manage sessions with OAS 4 / JWeb cartridge?

Re: How to manage sessions with OAS 4 / JWeb cartridge?

From: Paul <q9820458_at_mn.waseda.ac.jp>
Date: Tue, 02 Mar 1999 06:23:54 GMT
Message-ID: <7bg05j$2i4$1@nnrp1.dejanews.com>


It sounds like the Client Sessions setting for your Java cartridge is disabled.... although you seem to suggest otherwise. According to the docs I have, setting that to 'enabled' should prevent other browsers from accessing the same instance.

The other thing you need to be careful about is doing your own clean-up: After user number one is finished, that cartridge instance is made available for other browsers, and because you have static objects in it, you need to make sure those objects are returned to an acceptable state for the next user. Could this be your problem?

Also, try posting to this group:

Please feel free to participate in a discussion forum specifically devoted to the Oracle Application Server located at

http://www.dejanews.com/~oracleappserver

In article <36DA279A.4D02D2FE_at_nycap.rr.com>,   David Smith <dr_smith_at_nycap.rr.com> wrote:
> I have a newbie OAS/Jweb question, regarding session management:
>
> I can't seem to get sessions working the way I want.
> What I want to have happen is this: My OAS Java application
> instantiates a stateful object. I want each user (each web
> browser) to get their own private one of these stateful objects.
>
> This seems like it should be simple. It is simple, for example,
> with ASP. (But I digress...)
>
> From reading the docs, I thought I could make this one-object-per-user
> scenario happen if I (a) use OAS manager to enable sessions, and
> (b) make the object static.
>
> Well, I've enabled sessions, and my object (a member variable
> in my helloWorld.java) is static. The first time a user hits
> the web site URL, OAS/Jweb instantiates my stateful object;
> okay so far. But then, when a second user accesses the web site,
> it seems that OAS is using the first user's session to respond to
> the 2nd user's request. In other words, when helloWorld.java
> executes for user #2, helloWorld's member variable, m_myObject,
> has already been instantiated (it was instantiated by user #1).
>
> I can see how this behavior would be desirable in some contexts
> (like, if you wanted to maintain a counter of how many hits
> you've had). But in my situation, I want each user to get a
> separate object instance.
>
> Is there something special I have to do to make OAS assign a
> separate instance to each unique visitor?
>
> Thanks
> - Dave
> p.s. To reply to me by direct e-mail, please remove "_" (underscore)
> from my email address.
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Mar 02 1999 - 00:23:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US