Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session problem!  RSS feed

 
Shobana Niranjan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have two different applications running in two different app servers. App1 ( which may be in .NET) has a link to one of the web pages in app2. The user logs in to app1 and clicks on the link, which takes hiim to app2.Now the problem is that the transfer of session data from app1 to app2 should be transparent to the user. Also note that in any point of time the user might return to app1 from app2 and again this should be transparent. How can this be accomplished?
Thanks,
Shobana
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use JNDI kind of things to locate objects, then that itself would provide location-transperancy.

But, why do you worry for this? If you use any standard app servers, one of their features is location-transperancy, isn't it?

Thanks,
Guru
 
Swapan Mazumdar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shobhna,

If the two app. servers in this case are proprietary to the vendor, then you may think of using url rewriting for session tracking. Its easy and it works. You can recreate session at each end based on the request parameters in the url.
 
Vijay Sharma
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi shobana,
I think this transparency is provided in Application server.But Swapan is also correct.U can use url Rewriting.Each time u can create session,and maintain it.
 
Shobana Niranjan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Thanks for the suggestions. URL rewriting will work if the data maintained in the session is only text. How can we modify it to handle non-text data(like images for example, the location could be different on both the apps)?
Thanks ,
Shobana
 
Vijay Sharma
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shobana,
I think in that case u can use cookies,That is best,It can take care of all the things.
 
Swapan Mazumdar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all understand cookies can be disabled so it should be avoided in most cases. You can even pass the URI of images to and fro in the url. I assume the app servers running in different host machines. You can surely manage with the images if it is accessible as URI conditionally the image names are well known or identified in advance.

-Swapan
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shobana Niranjan:
Hi all,
I have two different applications running in two different app servers. App1 ( which may be in .NET) has a link to one of the web pages in app2. The user logs in to app1 and clicks on the link, which takes hiim to app2.Now the problem is that the transfer of session data from app1 to app2 should be transparent to the user. Also note that in any point of time the user might return to app1 from app2 and again this should be transparent. How can this be accomplished?
Thanks,
Shobana


Since your two application servers probably don't share a session manager, you could go with database-based session data. That way, both application servers could share data in the database. And, you could attach your own generated session id (which identifies a primary key in the db) to the URL when you want to link to the other application.
 
Shobana Niranjan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The project is actually an add-on to an already existing application.Several vendors host their appliations on different technologies and different app servers. Hence only minimum modifications can be made to each of their applications. Where as app2 is yet to be developed and will be provided links from the pages hosted by different vendors. Again vendors will not expose their database. In this scenario what do you is the best way to migrate a session and its related data from one appserver to another?

Thanks ,
Shobana
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!