My question is about the memory that groovy uses. If I write groovy code and
put it in a web page. Then two people open that web page at the same time,
does the groovy code interact from both instances?
What I am trying to determine is if I put the following code on a page, if
there will be issues?
def observation = Utils.getComponent(ObservationManager.class)
observation.removeListener("Renamer")
def listener = new DocumentRenamer(xwiki, xcontext)
observation.addListener(listener)
The line that removes the listener uses a string. That string matches what
is returned by the getName() of the listener class to identify it. My
concern is that if person A opens the web page, it will create a listener
called "Renamer". Then person B opens the page, the above code would remove
person A listener before adding its listener.
Another way to say it is, Is there one ObservationManager for all pages on
the server or does each page have its own ObservationManager?
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Groovy-Is-memory-space-shared-between-pag…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.