Announcement Announcement Module
Collapse
No announcement yet.
How to use the scope of the Bean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use the scope of the Bean

    I want to know how do we manage the scope of the bean mentioned in aplicationContext.xml.

    I have a bean defined this way.

    <bean id="employeeHandle" class="EmployeeHandler">
    <property name="employeeDao"><ref bean="employeeDao"/></property>
    </bean>

    How to make scope to session?

  • #2
    The scope of the bean is the lifetime of the JVM (or until it get GC'd) and it can be singleton or prototype.

    If you're talking about adding it to the web session, you do that manually.

    Comment

    Working...
    X