• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help...Static items in session beans  RSS feed

 
trevor
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hypothetical situation,
I have a java bean accessible from a JSP page using the <jsp:usebean> tag. The bean is declared to have "session" scope. This means that the bean's associated properties, etc. remain constant over the duration of the user's session and are "local" to that user.
Question:
If there are methods or variables defined inside the bean as "static", do those methods and variables retain the same values across different bean instances with "session" scope?
Example: User A and User B are each using a different instance of the bean mentioned above with session scope. If User A changes a property of the bean which internally is defined as static, will User B see the change?
Any help would greatly appreciated..
T
 
Matt Midcap
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"trevor",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!