Announcement Announcement Module
Collapse
No announcement yet.
How to know if a bean is scope = "session"? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to know if a bean is scope = "session"?

    Hi,

    I'm trying to know how I can detect if I'm accesing a bean that has been created for a session (in order to call an "initialized" method) or the bean was created before and I'm accesing it at a later time. is there a way to know it?

    The bean is configured with scope= "session".

  • #2
    I don't think there is. However, you can have your session scoped bean have an initialized method invoked when the object is created by specifying the "init-method" attribute in the XML entry for the session scoped bean.

    Comment


    • #3
      This should work with a standard initializing callback. You would not check for session scope at all (which sounds weird).

      Joerg

      Comment

      Working...
      X