aspose file tools*
The moose likes JSP and the fly likes Sharing session between different application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Sharing session between different application" Watch "Sharing session between different application" New topic
Author

Sharing session between different application

Shanmuga Raja
Greenhorn

Joined: Jun 14, 2004
Posts: 16
Can we have the session object shared between different application running in the apps server..say for example weblogic..?

Thanks


Shanmuga
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30352
    
150

Shanmuga,
No. Sharing sessions across application goes against the specification.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
If you use EJB then I believe it is possible.


My blood is tested +ve for Java.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
no, it's not possible with EJB either.
2 web applications can call the same EJB which (if stateful) may be called in such a way that it uses the same EJB instance with the state left behind by the other web application but they will not share a single HttpSession.
And don't think passing the session from one webapp to another via an EJB will help you, it won't. The data referred to in that session will be useless in the webapp you pass it to and if you try to use its session ID you're in for a load of trouble.


42
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
I was not meant to say that you can pass session object itself between diff application.

You can pass information between different application running on the same / different servers using EJB.
 
Consider Paul's rocket mass heater.
 
subject: Sharing session between different application