You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2008/06/19 13:55:16 UTC
svn commit: r669458 -
/webservices/axis2/trunk/java/modules/osgi/src/org/apache/axis2/osgi/deployment/ModuleRegistry.java
Author: saminda
Date: Thu Jun 19 04:55:16 2008
New Revision: 669458
URL: http://svn.apache.org/viewvc?rev=669458&view=rev
Log:
complete the moduleregistry
Modified:
webservices/axis2/trunk/java/modules/osgi/src/org/apache/axis2/osgi/deployment/ModuleRegistry.java
Modified: webservices/axis2/trunk/java/modules/osgi/src/org/apache/axis2/osgi/deployment/ModuleRegistry.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/osgi/src/org/apache/axis2/osgi/deployment/ModuleRegistry.java?rev=669458&r1=669457&r2=669458&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/osgi/src/org/apache/axis2/osgi/deployment/ModuleRegistry.java (original)
+++ webservices/axis2/trunk/java/modules/osgi/src/org/apache/axis2/osgi/deployment/ModuleRegistry.java Thu Jun 19 04:55:16 2008
@@ -16,6 +16,7 @@
package org.apache.axis2.osgi.deployment;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.modules.Module;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.deployment.DeploymentEngine;
import org.apache.axis2.deployment.ModuleBuilder;
@@ -29,6 +30,7 @@
/**
* @see org.osgi.framework.BundleListener
+ * TODO: TBD removed sout
*/
public class ModuleRegistry extends AbstractRegistry<AxisModule> {
@@ -89,6 +91,11 @@
configCtx.getAxisConfiguration().getModule(axismodule.getName());
if (module == null) {
DeploymentEngine.addNewModule(axismodule, configCtx.getAxisConfiguration());
+ //initialze the module if the module contains Module interface.
+ Module moduleObj = axismodule.getModule();
+ if (moduleObj != null) {
+ moduleObj.init(configCtx, axismodule);
+ }
bundleMap.put(bundle, axismodule);
System.out.println("[Axis2/OSGi] Starting any modules in Bundle - " +
bundle.getSymbolicName());
@@ -97,7 +104,6 @@
" is already available.");
}
}
- //TODO init the module
} catch (IOException e) {
String msg = "Error while reading module.xml";
throw new AxisFault(msg, e);