components - What does it mean by $scope=global in ATG..? -


according documentation,

global: component shared among users. session: separate instances of component provided each user.

is means, global component, there 1 instance whole nucleus system.. if true, how valid components ‘/atg/dynamo/transaction/transactionmanager’ , of droplets..? because components used several users @ single moment

edited:

i understood ‘transactionmanager’ behavior. according definition there should single transaction manager, , should keep transaction objects per each transaction. question still valid droplets like, foreach, switch, etc (most of them globally scoped) if there 1 instance of corresponding class whole nucleus system, isn't having bad effects on performance?

historically there 3 different types of scope available in atg. has increased 5, addition of window (generally used in csc application try not use it) , prototype (added support use of endeca cartridge handlers).

as highlight documentation, global component instantiated once , shared users, while session component created once given session , shared requests of session. request scoped component freshly instantiated each request uses it.

from performance point of view, resolving path existing component (for example globally scoped component foreach) takes little time, instantiating new object (in other words request scoped component) comparatively more expensive.

so in case of foreach droplet gets instantiated once in service method extracts parameters request:

string elementname = prequest.getparameter(element_name); 

this means globally scoped component thread safe in takes in parameter current request. in general, if component can shared multiple users, without worrying synchronisation, should globally scoped versus session or request scoped. (the rule of thumb should if droplet request scoped, doing wrong).


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -