Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can two applications running on one server share an application-scoped variable?

 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have two Struts applications running on one Tomcat server. I am wondering if application A can access an application-scoped variable that is declared in the application B. I am asking because I am afraid that there might be some conflicts that will happen if ever some application-scoped variables were given the same names.

Thanks in advance,

Eugene
[ February 28, 2008: Message edited by: Eugene Abarquez ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name "application-scoped" hints that the scope of the attribute is, well, the application. So there's no interference with any other application.
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

Thanks for pointing that out. However, I guess I need a more technical explanation of why that is the case. I had experiences with other servers before where application-contexts are shared to other applications. I guess this might not be the case with a server like Tomcat.

Eugene
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eugene Abarquez:
I need a more technical explanation of why that is the case.

The J2EE specification was designed specifically so that applications could not interfere with one another. This is primarily a security issue. Suppose you had Company A and Company B with applications running on the same 3rd party server such as one run by an ISP. It would not be a good idea to allow Company B to snoop into data from Company A's application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic