cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r158918 - cocoon/blocks/spring-app/trunk/java/org/apache/cocoon/spring/SpringComponentLocator.java
Date Thu, 24 Mar 2005 14:22:08 GMT
Author: cziegeler
Date: Thu Mar 24 06:22:06 2005
New Revision: 158918

URL: http://svn.apache.org/viewcvs?view=rev&rev=158918
Log:
Use core instead of context.

Modified:
    cocoon/blocks/spring-app/trunk/java/org/apache/cocoon/spring/SpringComponentLocator.java

Modified: cocoon/blocks/spring-app/trunk/java/org/apache/cocoon/spring/SpringComponentLocator.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/spring-app/trunk/java/org/apache/cocoon/spring/SpringComponentLocator.java?view=diff&r1=158917&r2=158918
==============================================================================
--- cocoon/blocks/spring-app/trunk/java/org/apache/cocoon/spring/SpringComponentLocator.java
(original)
+++ cocoon/blocks/spring-app/trunk/java/org/apache/cocoon/spring/SpringComponentLocator.java
Thu Mar 24 06:22:06 2005
@@ -15,7 +15,6 @@
  */
 package org.apache.cocoon.spring;
 
-import java.util.Map;
 import java.util.Stack;
 
 import javax.servlet.ServletConfig;
@@ -34,7 +33,6 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.cocoon.Constants;
-import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.core.Core;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
@@ -77,7 +75,6 @@
 
     public static final String APPLICATION_CONTEXT_REQUEST_ATTRIBUTE = "application-context";
 
-    protected Context context;
     protected ServletContext servletContext;
     protected EnvironmentHelper environmentHelper;
     protected ServiceManager manager;
@@ -95,7 +92,6 @@
      * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context context) throws ContextException {
-        this.context = context;
         this.servletContext = ((ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG)).getServletContext();
         // FIXME - we shouldn't use the environment helper
         this.environmentHelper = (EnvironmentHelper)context.get(Constants.CONTEXT_ENV_HELPER);
@@ -254,8 +250,7 @@
      * @return A parent application context or null
      */
     protected ApplicationContext getParentContext() {
-        final Map objectModel = ContextHelper.getObjectModel(this.context);
-        final Request request = ObjectModelHelper.getRequest(objectModel);
+        final Request request = ObjectModelHelper.getRequest(this.cocoon.getCurrentObjectModel());
         ApplicationContext parentContext = (ApplicationContext)request.getAttribute(APPLICATION_CONTEXT_REQUEST_ATTRIBUTE);
         
         if ( parentContext == null ) {



Mime
View raw message