cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r611562 - in /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src: changes/changes.xml main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
Date Sun, 13 Jan 2008 12:36:38 GMT
Author: gkossakowski
Date: Sun Jan 13 04:36:34 2008
New Revision: 611562

URL: http://svn.apache.org/viewvc?rev=611562&view=rev
Log:
<action dev="gkossakowski" type="add" issue=COCOON-2036" due-to="Alexander Klimetschek"
due-to-email="alexander.klimetschek@googlemail.com">
  Throw an exception when circular dependencies in servlet connections are detected.
</action>

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml?rev=611562&r1=611561&r2=611562&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
Sun Jan 13 04:36:34 2008
@@ -46,5 +46,10 @@
         Fixed bug in DispatcherServlet that caused servlet (blocks) mounted at "/" to be
handled improperly.
       </action>
     </release>
+    <release version="1.0.0-RC3-SNAPSHOT" date="2008-??-??" description="unreleased">
+      <action dev="gkossakowski" type="add" issue=COCOON-2036" due-to="Alexander Klimetschek"
due-to-email="alexander.klimetschek@googlemail.com">
+        Throw an exception when circular dependencies in servlet connections are detected.
+      </action>
+    </release>
   </body>
 </document>

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java?rev=611562&r1=611561&r2=611562&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
Sun Jan 13 04:36:34 2008
@@ -36,6 +36,7 @@
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanNameAware;
 import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.FactoryBeanNotInitializedException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 import org.springframework.web.context.ServletContextAware;
@@ -194,6 +195,9 @@
     }
 
     public Object getObject() throws Exception {
+        if (this.embeddedServlet == null) {
+            throw new FactoryBeanNotInitializedException("There might be a circular dependency
inside the servlet connections.");
+        }
         ProxyFactory proxyFactory = new ProxyFactory(this.embeddedServlet);
         proxyFactory.addAdvice(new ServiceInterceptor());
         if (this.mountPath != null) {
@@ -203,6 +207,10 @@
     }
 
     public Class getObjectType() {
+        if (this.embeddedServlet == null) {
+            return null;
+        }
+        
         return this.embeddedServlet != null ? this.embeddedServlet.getClass() : null;
     }
 



Mime
View raw message