Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Object count in JVM for struts Action

Thread view: 
Mukesh Gupta - 17 Jun 2005 13:47 GMT
Hello group,

I want to make a discussion on count of object formed in JVM for struts
action.

My question is: when we use action class to perform some action in
struts.
1.    every call has its own action (different) object.
2.    is every session has its own action (different) object.

As far as understand every call to the action has different object to
perform the task. But I observed through profiler that for different -2
calls there is only one action object in JVM. Even for different
session there is only one object formed.

Its confusing... please tell what is the actual scenario according to
struts framework.

If my observation is correct then in what all manner we can use this
one object nature of action object.    

Thanks.
MG
Wendy Smoak - 17 Jun 2005 17:39 GMT
"Mukesh Gupta" <mukesh.gupta@gmail.com> wrote.

> As far as understand every call to the action has different object to
> perform the task. But I observed through profiler that for different -2
[quoted text clipped - 3 lines]
> Its confusing... please tell what is the actual scenario according to
> struts framework.

http://struts.apache.org/userGuide/building_controller.html#action_design_guide

"The controller servlet creates only one instance of your Action class, and
uses this one instance to service all requests. Thus, you need to write
thread-safe Action classes."

Signature

Wendy Smoak

Mukesh Gupta - 20 Jun 2005 09:19 GMT
Thanks Wendy..... i got the consept....


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.