Home » SQL & PL/SQL » SQL & PL/SQL » psp -> start/init session (merged)
psp -> start/init session (merged) [message #218055] Tue, 06 February 2007 10:33 Go to next message
kazik
Messages: 13
Registered: July 2006
Location: Poland
Junior Member

hello,
I'm making a web site using psp and I need to do some actions when user close my web site, so I wrote a trigger [before logout...] and now I need to do start/init session when user start watching my web page [inside psp file]. How to do it? or maybe there is another way to do this? Can you help me?

regards
kazik
Re: [PSP] -> start/init session [message #218056 is a reply to message #218055] Tue, 06 February 2007 10:41 Go to previous messageGo to next message
kazik
Messages: 13
Registered: July 2006
Location: Poland
Junior Member

there should be: [before logoff]. and I don't need to identify/recognize users.
psp -> start/init session [message #218063 is a reply to message #218055] Tue, 06 February 2007 11:18 Go to previous messageGo to next message
kazik
Messages: 13
Registered: July 2006
Location: Poland
Junior Member

hello,
I'm making a web site using psp and I need to do some actions when user close my web site, so I wrote a trigger [before logout...] and now I need to do start/init session when user start watching my web page [inside psp file]. How to do it? or maybe there is another way to do this? Can you help me? [I don't need to identify/recognize users]

regards
kazik
Re: psp -> start/init session [message #218065 is a reply to message #218063] Tue, 06 February 2007 11:24 Go to previous messageGo to next message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
Do NOT cross/multi-post
http://www.orafaq.com/forum/t/76428/74940/
Re: psp -> start/init session (merged) [message #218184 is a reply to message #218055] Wed, 07 February 2007 02:39 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Unless you're using a Statefull connection with your PSPs then your approach just will not work.

In a stateless model, the user will not have a dedicated session that they alone use. Instead, whenever they submit a request to the web server, they will be assigned an Oracle connection from a pool, which will handle their request. There will be no package state at the start of the call, and at the end of the call, the state will be reset. The connection will not be terminated at the end of the call, it will simply return to the pool and wait for the next user request.

Quote:
I need to do start/init session when user start watching my web page
I'm afraid I don't understand what you want here.
Re: psp -> start/init session (merged) [message #218196 is a reply to message #218184] Wed, 07 February 2007 04:26 Go to previous messageGo to next message
kazik
Messages: 13
Registered: July 2006
Location: Poland
Junior Member

I don't know now what to do. What should I do if I want to get an e-mail from my web site, which inform me about what changes user did on my web page and I want to get this e-mail when user finish working with my page?
Re: psp -> start/init session (merged) [message #218223 is a reply to message #218196] Wed, 07 February 2007 06:34 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Answer me this question: How do you know when a user has stopped using your site?
Re: psp -> start/init session (merged) [message #218244 is a reply to message #218223] Wed, 07 February 2007 08:04 Go to previous messageGo to next message
kazik
Messages: 13
Registered: July 2006
Location: Poland
Junior Member

I don't know, but there must be the way. Are you suggesting that I should do this in this way?: site sends mail to me every time, when some user changes something (add, remove,edit in my database via web site).If I do this in this way there will be much more messages in my mailbox. There must be the some way to manage connections or to know when, as you say, connection is returning to the pool or maybe another way.
Re: psp -> start/init session (merged) [message #218260 is a reply to message #218244] Wed, 07 February 2007 08:46 Go to previous messageGo to next message
kazik
Messages: 13
Registered: July 2006
Location: Poland
Junior Member

I have a question: When triggers [before/after logon/logoff on database] works? (only when I'm using SQL Plus or SQLPlus Worksheet?...)
Re: psp -> start/init session (merged) [message #218261 is a reply to message #218260] Wed, 07 February 2007 09:02 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
These triggers are (of course) independent of the tool used. They fire on logon/logoff of the database.
The only thing is that they do not fire for users with DBA privileges.
Re: psp -> start/init session (merged) [message #218280 is a reply to message #218244] Wed, 07 February 2007 10:23 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I'm afraid that there is no way of telling when a user has stopped using your website. All they've got to do is type in a new URL, and they're gone, without you being any the wiser.

All you know in a Web App is when a user has submitted data to the application.


Logonn and Logoff triggers fire when a database session is created or ended, but the HTTP server will generally maintain a small pool of connections at all times to service the incoming requests. It won't create a new session for each request from a user.
Previous Topic: how to create users with admin option
Next Topic: Difference in the execution timings .. plz explain
Goto Forum:
  


Current Time: Sat Dec 03 15:56:52 CST 2016

Total time taken to generate the page: 0.05930 seconds