You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Grzegorz Kossakowski (JIRA)" <ji...@apache.org> on 2007/09/02 22:01:19 UTC
[jira] Updated: (COCOON-2036) Handle circular dependencies in
servlet connections
[ https://issues.apache.org/jira/browse/COCOON-2036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grzegorz Kossakowski updated COCOON-2036:
-----------------------------------------
Component/s: (was: - Servlet service framework)
- OSGi integration
> Handle circular dependencies in servlet connections
> ---------------------------------------------------
>
> Key: COCOON-2036
> URL: https://issues.apache.org/jira/browse/COCOON-2036
> Project: Cocoon
> Issue Type: Bug
> Components: - OSGi integration
> Affects Versions: 2.2-dev (Current SVN)
> Reporter: Alexander Klimetschek
> Attachments: circular-servlet-connections-warning.patch
>
>
> Circular dependencies in servlet connections lead to a Spring exception [1] in [2] that does not provide any help. The previous implementation (block:) did allow circular dependencies because they were not handled by spring but by custom code.
> Solution would be either to allow them (probably difficult to implement with spring) or, if not, to provide a helpful warning message, that skips this problem. The latter could be a check for embeddedServlet==null and, if not, throw an exception saying "you might have a circular dependency in <servlet-foobar>".
> ---
> [1]:
> The exception is thrown after ServletFactoryBean.getObject() tries to create a proxy for the embeddedServlet, which is null in the case of a circular dependency (one of the circle endpoints is created, but the other will be null).
> Caused by: org.springframework.aop.framework.AopConfigException: Can't proxy null object
> at org.springframework.aop.framework.ProxyFactory.<init>(ProxyFactory.java:49)
> at org.apache.cocoon.servletservice.spring.ServletFactoryBean.getObject(ServletFactoryBean.java:194)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1211)
> [2]:
> public Object getObject() throws Exception {
> ProxyFactory proxyFactory = new ProxyFactory(this.embeddedServlet);
> proxyFactory.addAdvice(new ServiceInterceptor());
> if (this.mountPath != null) {
> proxyFactory.addAdvisor(new MountableMixinAdvisor());
> }
> proxyFactory.addAdvisor(new ServletServiceContextMixinAdvisor());
> return proxyFactory.getProxy();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.