Starting a new thread to discuss how to keep the Saxon Configuration around...

[snip]

>> 4. I would like to know if a can use some kind of context, which is 
associated with given request and if I can use this context to put some data there. I 
do not want this context to be transferred in web service invocation for example, but 
only in the chain of transformers to the target invoker.
>> > >We may be able to extend the Tuscany Message or EndpointReference to >carry extra context data, but could you give me a little more background >on what kind of data you'd like to pass or keep around, and how it's >going to be used?
>
>In the JIRA you mentioned "which configuration is associated with an >invocation"... The message carrying an invocation should have pointers >to assembly model representing the from (reference) and target >(service), from which I think you could navigate to the binding model >and its configuration. Is that the kind of configuration you're looking >for? or some other configuration?
>

[snip]
About 4: Sorry i is my mistake. I ment the net.sf.saxon.Configuration object. I 
want to preserve it the first time it is created for a given invokation. For 
example this could happen when for first time DataObejct is transformed to 
NodeInfo. The I want all further transformation and the invokation in the 
XQueryInvoker to use the same configuration object. I want that this 
configuration object is invalidated after the invocation finishes. Currently I 
am doing not very good workaronds to prevent this: see comments in 
SaxonDataBindingHelper and XQueryInvoker for details.

Hi Vasil,

I looked at how the Saxon Configuration is used in your code. If I understand correctly, it looks like a new Configuration is created the first time an XQuery expression is compiled, and then used to execute all invocations of that expression.

Then the Configuration of the "current" expression is shared with the Saxon dataBinding Node2NodeInfoTransformer.transform method via the SaxonDataBindingHelper.CURR_EXECUTING_CONFIG static variable. This will not work in a multithreaded environment, as the static is likely to have changed and contain the Configuration from the expression executing in another thread when you reach the transformer.

After reading the Saxon Javadoc I am under the impression that it is OK to use the same Configuration object for multiple expressions. How about using a single Configuration object, shared between all the Saxon transformer and the XQuery implementation code. Will that work?

--
Jean-Sebastien


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

Reply via email to