Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 21448 invoked from network); 2 Apr 2008 11:56:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2008 11:56:44 -0000 Received: (qmail 83730 invoked by uid 500); 2 Apr 2008 11:56:43 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 83641 invoked by uid 500); 2 Apr 2008 11:56:43 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 83630 invoked by uid 99); 2 Apr 2008 11:56:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 04:56:43 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [68.230.240.48] (HELO eastrmmtao106.cox.net) (68.230.240.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 11:55:51 +0000 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao106.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20080402115610.YQMH15722.eastrmmtao106.cox.net@eastrmimpo02.cox.net> for ; Wed, 2 Apr 2008 07:56:10 -0400 Received: from [192.168.0.100] ([24.255.120.190]) by eastrmimpo02.cox.net with bizsmtp id 8bw91Z00P46aSr402bw9G0; Wed, 02 Apr 2008 07:56:10 -0400 Message-Id: From: Vadim Gritsenko To: dev@cocoon.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Disabling JavaPrimitiveWrap in flowscript Date: Wed, 2 Apr 2008 07:56:09 -0400 References: X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On Mar 28, 2008, at 1:47 PM, Tobia Conforto wrote: > I'd like to disable JavaPrimitiveWrap globally in Cocoon flowscripts. > > JavaPrimitiveWrap is a Rhino feature that, when disabled, will > return strings and numbers from Java calls as native Javascript > types, instead of wrapped Java objects. > > One can disable it on a (flowscript-)thread by thread basis by > calling: > > org > .mozilla > .javascript > .Context > .getCurrentContext().getWrapFactory().setJavaPrimitiveWrap(false); > > but I'd like to disable it globally for all threads, continuations, > etc. > > Any hint will be welcome. In FOM_JavaScriptInterpreter, look for Context.enter() calls. These are the places where you can add your initialization: context.getWrapFactory().setJavaPrimitiveWrap(false); Vadim