Hello,
Is there any sample with the delegation processor which calls a JavaBean to get started ? Could this javabean be any simple java class accessible like it is for the java processor or should it be configured in a container (like Spring for instance) ? Thanks. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 8/8/07, Kim-Vân Ho-Dac <[hidden email]> wrote:
> Is there any sample with the delegation processor which calls a JavaBean > to get started ? > > Could this javabean be any simple java class accessible like it is for > the java processor or should it be configured in a container (like > Spring for instance) ? There is an example in the documentation (see: http://www.orbeon.com/ops/doc/processors-delegation), but there is not example under "apps" that uses the Delegation processor. You can access any JavaBean; the processor does not require or use Spring. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Alessandro Vernet a écrit :
> > There is an example in the documentation (see: > http://www.orbeon.com/ops/doc/processors-delegation), but there is not > example under "apps" that uses the Delegation processor. You can > access any JavaBean; the processor does not require or use Spring. > > Alex > > Hmm, I was wondering if JavaBean meant POJO (that is to say a simple java class), in this case how does the processor "know" where this JavaBean is located (should it be placed to some specific location ?) ? Typically, we would like to access Spring java beans. Usually, the bean configuration (id, function parameters and values, ...) are defined in an xml file, then the bean is instantiated by loading the xml file (usually by a Bean Factory, for instance in a java class). The use of Spring would be very basic, encapsulate some business logic, then output its result in OPS. To make it clearer, I was wondering if with this simple use, Spring beans could be called by the delegation processor this way or is it necessary to write a specific processor. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 8/8/07, Kim-Vân Ho-Dac <[hidden email]> wrote:
> Hmm, I was wondering if JavaBean meant POJO (that is to say a simple > java class), in this case how does the processor "know" where this > JavaBean is located (should it be placed to some specific location ?) ? Yes, this is a POJO. It will be be loaded through the class loader. So the class should be in WEB-INF/classes or in a jar in WEB-INF/lib. IMHO, for most cases using the Delegation processor to call a method of a POJO is overkill. It is often better done from your own Java code which you invoke with the Java processor, or directly from XSLT, with: http://www.saxonica.com/documentation/extensibility/functions.html Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Alessandro Vernet a écrit :
> Yes, this is a POJO. It will be be loaded through the class loader. So > the class should be in WEB-INF/classes or in a jar in WEB-INF/lib. > > IMHO, for most cases using the Delegation processor to call a method > of a POJO is overkill. Isn't what the Delegation processor for javabeans supposed to do : instantiate the POJO then call its methods ? > It is often better done from your own Java code > which you invoke with the Java processor, or directly from XSLT, with: > > http://www.saxonica.com/documentation/extensibility/functions.html > > I thought that the Java processor was aimed to write a custom processor, not to execute some usual java code, did I miss something ? -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 8/9/07, Kim-Vân Ho-Dac <[hidden email]> wrote:
> Isn't what the Delegation processor for javabeans supposed to do : > instantiate the POJO then call its methods ? Yes, it is. And if it works for you, then everything is good :). > I thought that the Java processor was aimed to write a custom processor, > not to execute some usual java code, did I miss something ? If you want to write Java code and run it from a pipeline, one way to do it is to have a Java source file in the resources which implements a processor, and run that code with the Java processor. So yes, doing so you are writing a processor, but the end goal is to be able to write your own code that call a POJO or does something else. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |