]> source.dussan.org Git - archiva.git/commitdiff
correctly set tccl during sisu init
authorOlivier Lamy <olamy@apache.org>
Fri, 10 Jun 2011 15:38:09 +0000 (15:38 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 10 Jun 2011 15:38:09 +0000 (15:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1134351 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/PlexusSisuBridge.java
archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java
archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DefaultDependencyTreeBuilder.java

index 8a155bc7cd90d42c24ce4ed308826e116d0303db..e13f9b4bd108e9b5e36b96cc1c119ee7a3868d89 100644 (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 );
         }
     }
 
index 891444e313db8288d15d56af435e1abadd04e678..64cc7c100c3d9856d53d963fe660e62826d085a9 100644 (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 )
index e581502d9dd1cf75dd1dccb57366f74e72a990cb..de3e832ea7d96cad59fd1705aacd915599d3e525 100755 (executable)
        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>
\ No newline at end of file
index 2c9859fd086a05fa490a044f5421b4f3a2e7ff9e..d65c5fbd7bd04cddab15bd57b64cd9b45c44fda8 100644 (file)
       </props>
     </property>
   </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>
   
 
     
index 44c4d71227f0a8e4c4d7ab5f20f06bfc1e16834b..3336ab1efa9b648702139c96d5aaf47687e2008b 100644 (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();