Results 1 to 3 of 3

Thread: ASP Context setup

  1. #1
    Join Date
    May 2005
    Posts
    12

    Default ASP Context setup

    How would I go about setting up an application context per "organization" for an ASP webapp?

    The specifics is that certain beans need to be configured differently (DataSources, SessionFactories, etc) depending on what the organization of the user is that is accessing the system.

    Ideally what would be best would be to have the standard WebAppContext,
    then per-org contexts (parented by the WebAppContext) that can be made the "effective" AppContext when the app determines the org for the user making the request.

    Or, if there is a better way to do this that im just not seeing please fill me in.

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    I haven't done it and I don't know the exact details but here is an idea:

    - you can use an indirection level (similar to the pooling/hot-swapable components from Spring) were you can insert the logic for detecting the current user and retrieving the approapriate context. The bean will use that configuration file for the rest of the properties in a similar fashion to PropertyPlaceHolder.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    May 2005
    Posts
    12

    Default An idea

    I guess instead of making all my service objects singletons, if I made them prototypes and then had thier sessionFactory property bound to a hotswapable sessionFactory bean.

    That way i could swap the sessionFactory, and all the service objects woulds see it.


    hmm...that wont work..its a multi user system (

Similar Threads

  1. Replies: 2
    Last Post: Oct 13th, 2005, 02:47 PM
  2. How to setup a String[]in spring context ?
    By ndeloof in forum Container
    Replies: 4
    Last Post: Aug 24th, 2005, 06:48 AM
  3. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  4. Replies: 2
    Last Post: Jun 6th, 2005, 10:00 AM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

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