You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Alex Karasulu <ao...@bellsouth.net> on 2003/10/29 15:51:31 UTC

DefaultKernel usage for unit

Steve,

 

Are there any foreseeable problems with using the DefaultKernel in the base
unit test case?  I have been looking at the same code for a while: the
DefaultEmbeddableKernel and the DefaultKernel code.  I'm wondering what the
reasons where that compelled you to implement a unit test specific Kernel.
There must have been some reason for this that I'm missing.  Could you
elaborate?  

 

I'm just trying to figure things out a bit more in depth before making
changes.  Please excuse the volume of questions.

 

Alex


RE: DefaultKernel usage for unit

Posted by Alex Karasulu <ao...@bellsouth.net>.
> >Are there any foreseeable problems with using the DefaultKernel in the
> base
> >unit test case?  I have been looking at the same code for a while: the

[Karasulu, Alex] 
<snip/>

> 
> Yep.
> 
> Maven puts everything into the classloader that is supplied to the test
> case.  I wanted to totally isolate the kernel from Maven with the
> exception of API and client classes.  I.e. real component/container
> seperation.  The way I achieved that was to execute the kernel in a
> seperate thread and assign a clean classloader hierachy to the thread.
> This means that the kernel is running with only the kernel content and
> deploying components based on pure block directives.  The test cases
> pull in service as needed.  I.e. no classloader conflicts between Merlin
> and Maven.
> 

 [Karasulu, Alex] 

I knew I was trying to over simplify things!  I see now.  How can we still
achieve these goals which are critical for correctly testing the user's
components while consolidating the use of a single Kernel implementation? Or
is this not possible?

I'll do some research into how we can fire up the DefaultKernel in the impl
project within the unit project within a separate thread.

Thanks again,
Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: DefaultKernel usage for unit

Posted by Stephen McConnell <mc...@apache.org>.

Alex Karasulu wrote:

>Steve,
>
> 
>
>Are there any foreseeable problems with using the DefaultKernel in the base
>unit test case?  I have been looking at the same code for a while: the
>DefaultEmbeddableKernel and the DefaultKernel code.  I'm wondering what the
>reasons where that compelled you to implement a unit test specific Kernel.
>There must have been some reason for this that I'm missing.  Could you
>elaborate?  
>  
>

Yep.

Maven puts everything into the classloader that is supplied to the test 
case.  I wanted to totally isolate the kernel from Maven with the 
exception of API and client classes.  I.e. real component/container 
seperation.  The way I achieved that was to execute the kernel in a 
seperate thread and assign a clean classloader hierachy to the thread.  
This means that the kernel is running with only the kernel content and 
deploying components based on pure block directives.  The test cases 
pull in service as needed.  I.e. no classloader conflicts between Merlin 
and Maven.

Steve.

> 
>
>I'm just trying to figure things out a bit more in depth before making
>changes.  Please excuse the volume of questions.
>
> 
>
>Alex
>
>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org