Title: [1025] trunk/core/src/main/java/org/servicemix/jbi/container: Fix initialization problems with pojo components
- Revision
- 1025
- Author
- gnt
- Date
- 2005-12-06 12:22:05 -0500 (Tue, 06 Dec 2005)
Log Message
Fix initialization problems with pojo components
Modified Paths
Diff
Modified: trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java (1024 => 1025)
--- trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java 2005-12-06 16:56:21 UTC (rev 1024)
+++ trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java 2005-12-06 17:22:05 UTC (rev 1025)
@@ -37,7 +37,6 @@
import org.servicemix.jbi.framework.AutoDeploymentService;
import org.servicemix.jbi.framework.ComponentContextImpl;
import org.servicemix.jbi.framework.ComponentMBean;
-import org.servicemix.jbi.framework.ComponentMBeanImpl;
import org.servicemix.jbi.framework.ComponentNameSpace;
import org.servicemix.jbi.framework.DeploymentService;
import org.servicemix.jbi.framework.InstallationService;
@@ -908,11 +907,13 @@
lcc.setContext(context);
lcc.setActivationSpec(activationSpec);
- if (started.get() && lcc.isPojo()) {
+ if (lcc.isPojo()) {
//non-pojo's are either started by the auto deployer
//or manually
lcc.getComponentMBean().init();
- lcc.getComponentMBean().start();
+ if (started.get()) {
+ lcc.getComponentMBean().start();
+ }
} else {
lcc.getComponentMBean().setCurrentState(LifeCycleMBean.SHUTDOWN);
}
Modified: trunk/core/src/main/java/org/servicemix/jbi/container/SpringJBIContainer.java (1024 => 1025)
--- trunk/core/src/main/java/org/servicemix/jbi/container/SpringJBIContainer.java 2005-12-06 16:56:21 UTC (rev 1024)
+++ trunk/core/src/main/java/org/servicemix/jbi/container/SpringJBIContainer.java 2005-12-06 17:22:05 UTC (rev 1025)
@@ -38,10 +38,6 @@
public void afterPropertiesSet() throws Exception {
init();
- // Start the container first, so that activated components
- // get activated in the order they are listed
- start();
-
// lets iterate through all the component names and register them
if (componentNames != null) {
for (int i = 0; i < componentNames.length; i++) {
@@ -63,6 +59,8 @@
installArchive(archive);
}
}
+
+ start();
}
public void stop() throws JBIException {