Results 1 to 3 of 3

Thread: Non-singleton Controllers on session level

  1. #1
    Join Date
    Aug 2004
    Posts
    21

    Default Non-singleton Controllers on session level

    Is there a way to specify so that the same Controller instance will be used throughout a session and that other sessions will get new Controller instances (if the url mappings point to the same controller of course).

    /Marcus

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    No. Can you refactor so that the session-aware behaviour is in an object in the HttpSession, and the controller is still threadsafe?

  3. #3
    Join Date
    Aug 2004
    Posts
    6

    Default

    I noticed this post as I'm attempting to code something similar to your suggestion.

    I'm attempting to place an instance of an object (MaintenanceService) into the session. At the moment I'm attempting to use an implementation of the HandlerInterceptorAdapter class to create the instance, if one doesn't already exist, and place it in the session.

    I noticed that the HandlerInterceptorAdapter class doesn't have access to the application context (via something similar to the getApplicationContext() method). And I would think that using DI via the xml mapping files would create a new instance of MaintenanceService for every instance of the HandlerInterceptorAdapter.

    Anyone have any suggestions?

Similar Threads

  1. Replies: 4
    Last Post: Oct 5th, 2005, 11:04 AM
  2. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  3. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  4. DefaultAdvisorAutoProxyCreator skipping beans
    By youngm in forum Container
    Replies: 6
    Last Post: Apr 12th, 2005, 04:29 PM
  5. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM

Posting Permissions

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