Results 1 to 4 of 4

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

  1. #1
    Join Date
    Mar 2010
    Posts
    1

    Default 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. #2
    Join Date
    Sep 2006
    Posts
    1

    Default using session scope beans in a background task

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

    Regards,
    Dragomir

  3. #3

    Default

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

    Thanks, Regards.
    Javi

  4. #4
    Join Date
    Dec 2009
    Location
    India
    Posts
    108

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •