You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2009/10/21 21:09:35 UTC

new DeploymentContext method

We've always had a problem with the temporary classloader for  
deployment contexts, this has messed up a lot of the  
ModuleBuilderExtensions for a long time.  I have no idea yet if and  
how we will solve this problem but with the osgi work I added a new  
method that sets up the classloading (now as a temporary bundle).

So, if you ware working on a deployer you probably need to be aware of  
this method for your tests or you won't get a bundle out of the  
DeploymentContext... usually more test changes are needed too to set  
up e.g. a mock bundle context, kernel, configuration manager, etc  
etc.  I haven't figured out a good way to encapsulate all this setup  
in a reusable form, and am in fact a little stuck setting this all up  
in the geronimo-connector-builder module.

Anyway the new method is....

DeploymentContext.initializeConfiguration()


Another change to be aware of is that the bundles internal classpath  
is only accessible in the DeploymentContext now, not the  
Configuration.  So any configuration.addToClassPath(relativePath)  
needs to call the DeploymentContext instead.

thanks
david jencks