Jiaqi,

Why do you need a new context every-time ?
Why not set to null (that is erase) all the variables you know are created ?

Do I understand currently that you wish that tags were cached just like... it's happening in jelly 1.0 if you keep the thread and context... We've been discussing this on commons-dev recently and the default is now, back, to not cache, that is, to re-create the tag object at each start-of-run of the tag-script. This can be changed in JellyContext.setCacheTags(true)...

However, there's nothing with parent contexts in this caching scenario currently and, as I understand, this is what you would wish, correct ?
That is, you'd wish that tag-caching only happens at root context...
I fear you'll have to adapt TagScript for this yourself.

But as this is our current discussion I would invite you to make this adaptation in the following way: your tags have a special way to request caching, namely, they want it at the parent-context (or root-context?)... so they should be flagged as such. I would suggest to make an interface such as ReusableTagsForRootContext and let TagScript's tag-caching routines filter on that.

hope that helps.

paul

PS: the keys to the tag-caches are... the script-objects themselves... no verbatim id down here... we never thought about such...


Le 4 août 05, à 17:47, Guo, Jiaqi a écrit :

If I can assume that the creating each course doesn't need context, I actually know the full course list after the first time this script runs. If I can cache the course list somewhere in TagScript, I don't need to create 103 courses again and again. Because <Courses> tag can be used somewhere else in this script, I need a key to identify this guy. I can't simply save the list in CourseTag class because tag class is transient. Another option is forcing script writer to put an id attribute. But internal key makes it look simpler.

So my question is can I get unique ID for TagScript where I'm in corresponding Tag class.

Let me know if I didn't explain the question clearly. Thanks for your time.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to