commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiaqi Guo <ji...@evavi.com>
Subject [jelly] Stateless/Stateful Tag?
Date Mon, 01 Nov 2004 19:41:07 GMT
Hi everyone,

I want to reuse jelly Script object since in my current project, Script 
will run frequently with different given JellyContext created at runtime 
and I don't want to create Script and Tag objects time and time again.

My concern is, in TagScript, Tag object is cached in ThreadLocal and 
runtime JellyContext object is sitting in Tag object. So runtime context 
is saved until next time the Script runs. To my understanding, 
JellyContext should not be saved because it's transient. Putting it into 
Tag object makes developer easy, and makes Tag object stateful.

Is there any thing I can do to clean Tag objects after the doTag method 
is called without explicitely add setContext(null) in each doTag() 
method, or prevent Tag from absorbing JellyContext into itself? Any 
suggestions?



Thanks
Jiaqi


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message