Announcement Announcement Module
Collapse
No announcement yet.
Replace session scoped bean with thread scoped bean in runtime for certain threads. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace session scoped bean with thread scoped bean in runtime for certain threads.

    I have a session scoped bean declares as below

    Code:
    <bean id="authenticateContextSession" class="com.wss.WSSAuthenticateContext" scope="session" >
    		<aop:scoped-proxy />
    	</bean>
    No to the problem, I need to be able to use and access this been from a background task, i.e. from a thread where I dont have a valid session.

    My question is if its possible to programatically redefine this bean to thread scope (in runtime) so that my background task can use it?

    Ive tried the HotSwappableTargetSource approach but that replaces the whole bean instance, I want the change to only be vissible threadlocal.


    Regards
    Richard

  • #2
    using session scope beans in a background task

    I have a similar problem. Is there any solution for this?

    Regards,
    Dragomir

    Comment


    • #3
      I have the same problem. Did you find a solution?

      Thanks, Regards.
      Javi

      Comment


      • #4
        So many people having same problem and nobody tried to detail out the problem. See, if some thing is not available, then it also may be because what you're attempting is not correct and should be done in some other fashion. Scenarios like this and others can easily be tackled in a cleaner manner via using spring events. But I need to understand the details of the problem first before suggesting a solution.

        Comment

        Working...
        X