Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 84796 invoked from network); 2 Nov 2004 17:56:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Nov 2004 17:56:40 -0000 Received: (qmail 95430 invoked by uid 500); 2 Nov 2004 17:56:31 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 95330 invoked by uid 500); 2 Nov 2004 17:56:30 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 95315 invoked by uid 99); 2 Nov 2004 17:56:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of cyclopsgroup@gmail.com designates 64.233.170.201 as permitted sender) Received: from [64.233.170.201] (HELO rproxy.gmail.com) (64.233.170.201) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 02 Nov 2004 09:56:30 -0800 Received: by rproxy.gmail.com with SMTP id 79so231881rnl for ; Tue, 02 Nov 2004 09:56:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=YjxwpxRXRQ8wjLU+jvUQeG8CZX6oQByJohYWfpdT0P+5ZBeVcBB3WHUfY2LlPj3dFLzpR1hStxwiHe35X4YnGkUUNy7JYrgq1MwRGGaATnSIdwZVqm1oqy3SBTP5aLXqEGHILAQhfGFAVmAlSkF/A4YOAcK38bBUEMlX0y7z1qQ= Received: by 10.38.74.11 with SMTP id w11mr461981rna; Tue, 02 Nov 2004 09:56:27 -0800 (PST) Received: by 10.38.73.31 with HTTP; Tue, 2 Nov 2004 09:56:27 -0800 (PST) Message-ID: Date: Tue, 2 Nov 2004 11:56:27 -0600 From: Jiaqi Reply-To: Jiaqi To: Jakarta Commons Users List Subject: Re: [jelly] Stateless/Stateful Tag? In-Reply-To: <6BE61C8D-2CAA-11D9-93E7-000A95C50B1C@activemath.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <41869153.4070409@evavi.com> <6BE61C8D-2CAA-11D9-93E7-000A95C50B1C@activemath.org> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N So what is the best practice for developer to frequently execute predefined jelly script? In my project, process is defined in xml file, which will not be changed logically, which could be very complicated. Logically volatile stuff is variables (like current user name and form data). It's easier for me to model process definition with tag/scripts and put variables into JellyContext. Otherwise, I can not figure out any solution else. What is your suggestions? Thanks On Tue, 2 Nov 2004 09:37:25 +0100, Paul Libbrecht wro= te: > Mmmh, >=20 > I would rather view the contrary: tag and tagscript objects are > entirely volatile where the context is something that stores exactly > how much you want (that is, not more than needed). > So I'd rather rely on the jelly-context to add states of the tag... >=20 > paul >=20 > Le 1 nov. 04, =E0 20:41, Jiaqi Guo a =E9crit : >=20 >=20 >=20 > > 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 > > >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org >=20 >=20 --=20 Regards JIaqi --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org