correctly set tccl during sisu init

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1134351 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-06-10 15:38:09 +00:00
parent 45b308aab0
commit 3d2bbcff6c
5 changed files with 25 additions and 6 deletions

View File

@ -93,13 +93,18 @@ public class PlexusSisuBridge
//conf.setClassWorld( classWorld );
ClassLoader ori = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader( classRealm );
plexusContainer = new DefaultPlexusContainer( conf );
}
catch ( PlexusContainerException e )
{
throw new PlexusSisuBridgeException( e.getMessage(), e );
} finally {
Thread.currentThread().setContextClassLoader( ori );
}
}

View File

@ -85,9 +85,9 @@ public class ArchivaIndexingTaskExecutor
artifactContextProducer = new DefaultArtifactContextProducer();
indexerEngine = plexusSisuBridge.lookup( IndexerEngine.class );
indexerEngine = plexusSisuBridge.lookup( IndexerEngine.class, "default" );
indexPacker = plexusSisuBridge.lookup( IndexPacker.class );
indexPacker = plexusSisuBridge.lookup( IndexPacker.class, "default" );
}
public void executeTask( Task task )

View File

@ -24,9 +24,11 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
default-lazy-init="true">
<context:annotation-config/>
<context:component-scan base-package="org.apache.maven.archiva.web"/>
</beans>

View File

@ -161,6 +161,18 @@
</bean>
<bean name="scheduler" class="org.codehaus.redback.components.scheduler.DefaultScheduler">
<property name="properties">
<props>
<prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
<prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
<prop key="org.quartz.threadPool.threadCount">1</prop>
<prop key="org.quartz.threadPool.threadPriority">4</prop>
<prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
</props>
</property>
</bean>
<!-- <component>

View File

@ -144,8 +144,8 @@ public class DefaultDependencyTreeBuilder
public void initialize()
throws PlexusSisuBridgeException
{
//factory = plexusSisuBridge.lookup( ArtifactFactory.class , "default" );
//collector = plexusSisuBridge.lookup( ArtifactCollector.class , "default" );
factory = plexusSisuBridge.lookup( ArtifactFactory.class , "default" );
collector = plexusSisuBridge.lookup( ArtifactCollector.class , "default" );
DefaultModelBuilderFactory defaultModelBuilderFactory = new DefaultModelBuilderFactory();