-
Session Attribute access notification (6 messages)
- Posted by: Poetic Justice
- Posted on: February 14 2006 11:28 EST
I was wondering is there anyways to get notificatons to the object when it is accessed from session. By that i mean in HttpSession getAttribute(String x) method is there a way i could hook up to this anytime its called and do some custom stuff. Does it fire any events or notifications or is there an interface that i can implement to do this.Threaded Messages (6)
- Sounds like a job for... by Bob Armour on February 15 2006 07:18 EST
- Doesnt work by Poetic Justice on February 17 2006 15:43 EST
- Session Attribute access notification by Ravindra kumar Vangapalli on February 17 2006 22:31 EST
- Session Attribute access notification by Poetic Justice on February 20 2006 13:43 EST
- Session Attribute access notification by Poetic Justice on February 21 2006 12:02 EST
- Session Attribute access notification by Jose Ramon Diaz on March 01 2006 06:17 EST
-
Sounds like a job for...[ Go to top ]
- Posted by: Bob Armour
- Posted on: February 15 2006 07:18 EST
- in response to Poetic Justice
...HttpSessionAttributeListener!!!!
Information on this can be found at eiter of these URLs...
http://java.sun.com/developer/EJTechTips/2003/tt0626.html
http://edocs.bea.com/wls/docs70/webapp/app_events.html#177041
Enjoy! -
Doesnt work[ Go to top ]
- Posted by: Poetic Justice
- Posted on: February 17 2006 15:43 EST
- in response to Bob Armour
HttpSessionAttributeListener only lets you know if An attribute
1. has been added
2. removed
3. replaced
it doesnt let you know if an attribute is being accessed from session with getAttribute(String) and this is what i want to know. -
Session Attribute access notification[ Go to top ]
- Posted by: Ravindra kumar Vangapalli
- Posted on: February 17 2006 22:31 EST
- in response to Poetic Justice
I thnk u can use observer. have a look at it. -
Session Attribute access notification[ Go to top ]
- Posted by: Poetic Justice
- Posted on: February 20 2006 13:43 EST
- in response to Ravindra kumar Vangapalli
Could u explain how observer pattern could be use for this without implementing your own HttpSession. All i would really need to do is to somehow put some code in the getAttribute method to receive notifications but this would require implementing HttpSession which is not a very good idea since this is allready provided by the app server. -
Session Attribute access notification[ Go to top ]
- Posted by: Poetic Justice
- Posted on: February 21 2006 12:02 EST
- in response to Ravindra kumar Vangapalli
J2EE experts i really need advice on this one thnx. -
Session Attribute access notification[ Go to top ]
- Posted by: Jose Ramon Diaz
- Posted on: March 01 2006 06:17 EST
- in response to Poetic Justice
How about writing your HttpSession.getAttribute()?
Extending HttpSession?