Using multiple web applications

Discussions

General J2EE: Using multiple web applications

  1. Using multiple web applications (6 messages)

    I am working in a pretty large project that will be running for at least three years and is expected to produce a sizeable system. The idea was to partition the system in many web applications, so we will have the possibility for example to stop, maintain and restart an application without disrupting the rest of the system. That was until we discovered that WebSphere 4 that we will be using does not pass the session from one web app to another (which is in compliance with J2EE specs).
    Since we use the session to store information useful for many applications, this creates a problem. The current idea is to use a stateful session bean to overcome this limitation, but there is the danger that there could be other potential issues we are overlooking (e.g. could there be a classloader issue when passing from one web app to another?)
    Any info/experience on this would be very much appreciated.

    Thanks,
    Thanos

    Threaded Messages (6)

  2. Using multiple web applications[ Go to top ]

    Just wanted to say the revelation that you can't share sessions bit me last week too. I am having to do some architecture modifications to get my project to work as intended.

    -Pete
  3. Using multiple web applications[ Go to top ]

    In the documentation of WebSphere, section 8 of the InfoCenter it says:
    "sessions are not shared across Web applications".
    However, in the "Concepts and terminology" section, there is only reference to "enterprise applications" and "web modules". So the question is, are sessions limited to web modules (=.war) or to enterprise apps (=.ear)?

    Thanks,
    Thanos
  4. Matter Worst[ Go to top ]

    And here is what makes things even worst. The name "JSPSessionID" is set at the Server level.

    So if you have 2 applications running under that one server like:
    foo.com/app1
    foo.com/app2

    When you visit foo.com/app1, the jspsessionid value is set for that application.

    Then you visit foo.com/app2, the jspsessionid value is overwritten with a value for application 2.

    When you go back to foo.com/app2, the jspsessionid is not known and you get yet another jspsession value.

    You'll keep losing your sessions. I suppose we are to centralize our "Enterprise" cross application data through roll your own session management. You would have to code every entry point into app1 and app2 to recover that "Enterprise" session data.

    I do wish this could of been "out-of-the-box" capable. It would been nice to be able to just set something like "Session Management" visibility to "server|application|module" for a single domain.
  5. Solution[ Go to top ]

    Guess what IBM did :) They must of recognized this issue and provided a way to Share Session Context between multiple WARS under the same EAR.

    http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/tips0215.html?Open
  6. I am also in a similar situation. I am using weblogic server. Does weblogic support sharing of session across multiple web apps in a ear? If yes should i have to change any configuration files.

    Thanks,
    Anil
  7. if any finds any solution to share session object of one web application in another web application which are in same ear, please let me know the procedure. I tried in IBM Websphere and Oracle Weblogic, but could not succeed. rgds ksv