In our web based application we plan to call back from JAVA classes accessed from our custom processor to Orbeon processors (like xmldb proc). For example the logical stack could be: model.xpl calling 'custom-processor' instantiating 'business object' persisting itself calling orbeon 'xmldb-processor'.
Are the patterns to make a call from my 'business object' layer to the 'xmldb-processor' same as that shown on command line calls ? Should I somehow take into consideration the (web) context my original 'custom-processor' has (e.g. the command line example OXF.java passes ->new CommandLineExternalContext() to executePipeline() which maybe done differently in my context ) ?
There is no reason this cannot work. You can indeed look at OXF.java, ProcessorTest.java (the JUnit test suite that runs processors), or even TestProcessor.java (a processor that runs processors in tests scripts).
As far as the ExternalContext instance is concerned, if you need it (i.e. if you need to use processors like the Request generator, or to serialize documents out), you should just be able to pass the ExternalContext instance that you obtain from the PipelineContext. Or, you can just either set no ExternalContext is no processor is using it (in fact the XMLDB processors are using it to obtain exist-conf.xml), or create your own minimal ExternalContext instance.
When trying to optimize execution with some static initializations what should I watch out for ?
I am not sure what you mean here, except that you should be able to keep a static reference to your main processor, but you have to pass a new PipelineContext every time.
-Erik
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
