Hi Francesco,

The Spring configuration component [1] was in fact already used by default when running the applications as a web application, so that that actually did not solve the issue.

My beans for each application are specified in a XML placed META-INF/cocoon/spring (globally accessible therefore) inside a block. As I wanted to make them know only to the block that requires them, I moved the definitions to COB-INF/config/spring/ (locally accessible beans, not accessible from any other block). This in fact follows [2]. Note, however, it is not at clear whether or not cocoon 3 follows the organization in [2].

I also created a few REST resources, the definitions of which were placed also in the same bean definition file in COB-INF/config/spring/ (local). This did not work. The CocoonJAXRSServlet defined in block-servlet-service.xml in META-INF/cocoon/spring (global) could not find these local resources. So, I moved them into the block-servlet-service.xml (global). However, this resulted in another problem. The REST resource uses Facades to communicate with the domain layer and the underlying databases. These facades are defined as beans in the bean configuration file located in COB-INF/config/spring/ (local). When running just the block itself, the beans defined block-servlet-service.xml (global beans) cannot find the locally defined beans in COB-INF/config/spring/. Trying to do this as actual web application (and using [1]), gives the same problem. So, the only way to solve this is to make all bean definitions global, which is not what I want and or require.

Running individual blocks with all beans defined as global is fine. The block works prefect. So, I am probably make all beans global, give them IDs that are truly unique.

[1] https://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/2.1/1304_1_1.html
[2] https://cocoon.apache.org/2.2/core-modules/core/2.2/1263_1_1.html
--
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
NordProt                     | WWW: www.nordprot.org
Triacle Biocomputing         | WWW: www.triacle-bc.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to