Database input-module and question about deadlocks

2008-06-17 Thread Tobia Conforto
Hello I'm having all sorts of problems with an input module I wrote that makes a few databases queries to perform its work, using JDBI. I'm still using Cocoon 2.1. I don't understand Avalon much and I'd appreciate it if some of you could look over my code and tell me if you see somethin

Re: Disabling JavaPrimitiveWrap in flowscript

2008-04-04 Thread Tobia Conforto
Vadim Gritsenko wrote: In FOM_JavaScriptInterpreter, look for Context.enter() calls. These are the places where you can add your initialization: context.getWrapFactory().setJavaPrimitiveWrap(false); Thank you very much, it works like a charm. Would you like me to try and make a patch to make

Disabling JavaPrimitiveWrap in flowscript

2008-03-28 Thread Tobia Conforto
Hi 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 thr

Re: "xsltc" transformer masks exceptions from CIncluded resources

2008-02-27 Thread Tobia Conforto
I would like to include the patch to cocoon. One question: Does work the the patch for "xslt" and "xsltc" or just for the latter? Hi The patch seems to work for both xslt and xsltc, but I haven't tried other variants, such as Saxon. I'm still working on it though. I'm trying to cause all

Re: "xsltc" transformer masks exceptions from CIncluded resources

2008-02-27 Thread Tobia Conforto
Thank you for your insight. Actually XSLTC does preserve the cause, but it's wrapped in TransformerExceptions. I managed to solve the issue by patching TraxTransformer so that it removes wrapping exceptions (of SAXException and TransformerException type, arbitrarily nested) before re-throwi

"xsltc" transformer masks exceptions from CIncluded resources

2008-02-26 Thread Tobia Conforto
Hello I'm experiencing a strange behaviour in Cocoon 2.1, where the mere presence of an "xsltc" transformer in a pipeline hides exceptions raised in a CIncluded resource. Here is a basic example: ___ sitemap: ___ (1)

Re: Compiled XSLT

2007-10-23 Thread Tobia Conforto
Ard Schrijvers wrote: > > > I'm wondering if there is a way to pre-compile XSLT into Java > > > classes, using the command-line xsltc compiler, put those classes > > > somewhere in Cocoon's classpath and use them as transformers. > > > > Actually, since Cocoon can already run the cached compiled >

Re: Calling an InputModule from flowscript

2007-10-20 Thread Tobia Conforto
I wrote: > I'm saving the input module into a global flowscript variable, because > it's supposed to be request-independent. Nevermind that. I realized I must acquire the input module from the selector every time, lest I end up with IllegalStateExceptions. Tobia

Content-Type charset parameter and application/ types

2007-07-10 Thread Tobia Conforto
Hello According to tests I've done and to a piece of documentation, it would seem that a "charset=" parameter is added to the Content-Type header only when the mime type starts with text/. In fact http://cocoon.apache.org/2.1/userdocs/xml-serializer.html says: The charset parameter shoul