cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: svn commit: r164112 - in /cocoon: blocks/core/forms/trunk/java/org/apache/cocoon/forms/binding/ blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/ trunk/ trunk/src/java/org/apache/cocoon/ trunk/src/java/org/apache/cocoon/bean/ trunk/src/java/org/apache/cocoon/core/ trunk/src/java/org/apache/cocoon/core/container/ trunk/src/java/org/apache/cocoon/serialization/ trunk/src/test/org/apache/cocoon/ trunk/src/test/org/apache/cocoon/core/container/
Date Sat, 23 Apr 2005 07:16:51 GMT
cziegeler@apache.org wrote:
> Author: cziegeler
> Date: Thu Apr 21 13:04:01 2005
> New Revision: 164112
> 
> URL: http://svn.apache.org/viewcvs?rev=164112&view=rev
> Log:
> Remove the need for context object (where possible)
> Reduce default logging output during junit tests
> 
> Modified:
<snip/>
> Modified: cocoon/trunk/src/test/org/apache/cocoon/core/container/ContainerTestCase.java
> URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/core/container/ContainerTestCase.java?rev=164112&r1=164111&r2=164112&view=diff
> ==============================================================================
> --- cocoon/trunk/src/test/org/apache/cocoon/core/container/ContainerTestCase.java (original)
> +++ cocoon/trunk/src/test/org/apache/cocoon/core/container/ContainerTestCase.java Thu
Apr 21 13:04:01 2005
> @@ -36,6 +36,9 @@
>  import org.apache.avalon.framework.parameters.Parameters;
>  import org.apache.avalon.framework.service.ServiceException;
>  import org.apache.avalon.framework.service.ServiceManager;
> +import org.apache.cocoon.configuration.Settings;
> +import org.apache.cocoon.core.Core;
> +import org.apache.cocoon.core.CoreUtil;
>  import org.apache.cocoon.util.log.DeprecationLogger;
>  
>  /**
> @@ -296,8 +299,12 @@
>          roleManager.enableLogging( this.getLogger() );
>          roleManager.configure( confRM );
>  
> +        // Set up root manager for Core
> +        Core core = new Core(new Settings(), this.context);
> +        CoreUtil.RootServiceManager rsm = new CoreUtil.RootServiceManager(null, core);
> + 
>          // Set up the ComponentLocator
> -        CoreServiceManager ecManager = new CoreServiceManager(null);
> +        CoreServiceManager ecManager = new CoreServiceManager(rsm);
>          ecManager.enableLogging( this.getLogger() );
>          ecManager.contextualize( this.context );
>          ecManager.setRoleManager( roleManager );

Carsten, this brook all my the test cases for the VPCs and the block 
stuff, and probably all other test cases. Could you please run the tests 
while refactoring the Core. It is the second or third time your 
refactoring breakes my tests in the last few weeks, so it start to get 
annoying.

                              --- o0o ---

What happens is that I get this exception:

org.apache.avalon.framework.context.ContextException: Unable to resolve 
context key: org.apache.cocoon.core.Core

AFAIU there is a need to create a BootstrapEnvironment for the tests and 
  call the CoreUtil constructor with that as argument, or should it be 
done in some other way?

                              --- o0o ---

I think that the work you have done on the Core this far is very 
important and good stuff, but as Sylvain has written before, the Cocoon 
core isn't your private business, as it affects everything else. Could 
you please write a roadmap about where you are heading with your 
refactoring. The blocks stuff that I try to write, need to set up an own 
component manager and an own processor so I am dependent of core stuff. 
But it is quite hard to develop it, if the core is a moving target and I 
have no idea about where it is moving.

/Daniel

Mime
View raw message