Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

session binding

Thread view: 
polilop - 21 Nov 2007 11:30 GMT
Is it possible to bind two different sessions?
If so, any tip, link to resource, book, on how to iplement?
my problem is users that open the web application in multiple windows (each
becomes a new session).
Dose this consume server resorces, affect it's response?
Wojtek - 21 Nov 2007 19:20 GMT
polilop wrote :
> Is it possible to bind two different sessions?
> If so, any tip, link to resource, book, on how to iplement?
> my problem is users that open the web application in multiple windows (each
> becomes a new session).
> Dose this consume server resorces, affect it's response?

I assume that the user's are logging in?

Then check to see if they are already logged in, and if so give them an
error message, do not log them in, and destroy the session.

Signature

Wojtek :-)

polilop - 21 Nov 2007 20:34 GMT
> polilop wrote :
>> Is it possible to bind two different sessions?
[quoted text clipped - 7 lines]
> Then check to see if they are already logged in, and if so give them an
> error message, do not log them in, and destroy the session.

this  has come to mind, and if i do not find the solution, will be
implemented (if resource consumation is great upon multiple sessions), but
there are some users that would like to have two browser windows open, where
they can view data from the same application, so what i really need is try
to  bind different sessions of the same user, if possible?
So the questions before still remain
Manish Pandit - 21 Nov 2007 23:18 GMT
> > polilop wrote :
> >> Is it possible to bind two different sessions?
[quoted text clipped - 17 lines]
> to  bind different sessions of the same user, if possible?
> So the questions before still remain

AFAIK, it is not possible, as a session is identified by the browser/
client and not the real human being. There is no way for the Server to
know that session X, Y and Z are from the same machine but different
browser instances. You might want to reconsider the UI design and/or
the session management (do not use session variables that change often
- like transactional attributes) and/or provide a link for the users
to spawn out separate windows from within the application's web pages
as then they'd share the same session. The resource usage due to
sessions depends on how much and what data you stick in there. Ideally
they should be lightweight, and not hold information that is transient
across requests. Session scoped variables are mostly read-only or
relatively constant like a user's profile.

-cheers,
Manish
polilop - 22 Nov 2007 07:10 GMT
>> > polilop wrote :
>> >> Is it possible to bind two different sessions?
[quoted text clipped - 36 lines]
> -cheers,
> Manish
thanks, thought so, but heard somewhere that it could be done. Must of heard
wrong. Back to the old drawing board ;)
Wojtek - 24 Nov 2007 04:03 GMT
polilop wrote :
>> polilop wrote :
>>> Is it possible to bind two different sessions?
[quoted text clipped - 16 lines]
>  bind different sessions of the same user, if possible?
> So the questions before still remain

Well you cannot bind two session together. What you can do is make sure
that the information stored in each of the sessions assigned to a
particular user is the same.

The web.xml definition allows for a hook into the session
creation/destruction process. Use the web.xml <listener-class> tag to
have your application handle this.

Then you can link the sessions together for a single user using
whatever mechanism you want.

Signature

Wojtek :-)

polilop - 26 Nov 2007 21:20 GMT
> polilop wrote :
>>> polilop wrote :
[quoted text clipped - 29 lines]
> Then you can link the sessions together for a single user using whatever
> mechanism you want.

looking into this, thanks for the tip


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.