ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
return getContainer().lookup(type);
}
catch (ComponentLookupException e) {
throw new ProjectModelException("Could not look up component of type [" + type.getName() + "]", e);
}
finally
{
/*
* We reset the classloader to prevent potential modules bugs