You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/01/25 22:06:29 UTC
svn commit: r499974 - in /webservices/muse/trunk/modules: muse-osgi-core/
muse-osgi-core/src/org/apache/muse/core/platform/osgi/
muse-osgi-core/src/org/apache/muse/core/platform/osgi/routing/
muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/a...
Author: danj
Date: Thu Jan 25 13:06:28 2007
New Revision: 499974
URL: http://svn.apache.org/viewvc?view=rev&rev=499974
Log:
Joel's patch for MUSE-186.
Modified:
webservices/muse/trunk/modules/muse-osgi-core/pom.xml
webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/ResourceManagementProvider.java
webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/routing/OSGiResourceRouter.java
webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java
webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/OSGiRawXMLInOutMessageReceiver.java
webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/ResourceManagementAdminServiceImpl.java
webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/ResourceManagementAdminServiceImpl.java
Modified: webservices/muse/trunk/modules/muse-osgi-core/pom.xml
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/pom.xml?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/pom.xml (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/pom.xml Thu Jan 25 13:06:28 2007
@@ -14,6 +14,10 @@
<url>http://ws.apache.org/muse</url>
<dependencies>
<dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </dependency>
+ <dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</dependency>
Modified: webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/ResourceManagementProvider.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/ResourceManagementProvider.java?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/ResourceManagementProvider.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/ResourceManagementProvider.java Thu Jan 25 13:06:28 2007
@@ -35,6 +35,17 @@
public interface ResourceManagementProvider {
+
+ /**
+ * used by the provider implementation to perform intialization for
+ * the specified context
+ *
+ * @param bundle
+ * @param contextName
+ * @throws Exception
+ */
+ public void intializeContext(Bundle bundle, String contextName) throws Exception;
+
/**
* deploys a Management Endpoint (corresponding a resource type from a muse.xml file) into
* the specified context
Modified: webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/routing/OSGiResourceRouter.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/routing/OSGiResourceRouter.java?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/routing/OSGiResourceRouter.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/routing/OSGiResourceRouter.java Thu Jan 25 13:06:28 2007
@@ -222,6 +222,13 @@
}
private void deployManagementServices(Bundle bundle, String contextName, String target){
+
+ try {
+ provider.intializeContext(bundle, contextName);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+
Collection contextPaths = getContextPathsForBundle(bundle, target);
Iterator i = contextPaths.iterator();
while (i.hasNext()) {
@@ -397,6 +404,12 @@
}
} else {
deferBundleResources(bundle, contextPath, target);
+ }
+ }
+
+ public void setDelegateBundle(Bundle bundle, String contextPath, String context){
+ synchronized(contextToBundleMap){
+ contextToBundleMap.put(contextPath + "/services/" + context, bundle);
}
}
Modified: webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/Axis2Environment.java Thu Jan 25 13:06:28 2007
@@ -63,8 +63,7 @@
//
// Used to lookup all exception messages
//
- private static Messages _MESSAGES = MessagesFactory
- .get(Axis2Environment.class);
+ private static Messages _MESSAGES = MessagesFactory.get(Axis2Environment.class);
//
// The name of the property that has the J2EE HttpServletRequest
@@ -295,5 +294,9 @@
return input;
}
+
+ protected File createRealDirectoryFromContext(){
+ return null;
+ }
}
Modified: webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/OSGiRawXMLInOutMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/OSGiRawXMLInOutMessageReceiver.java?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/OSGiRawXMLInOutMessageReceiver.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/OSGiRawXMLInOutMessageReceiver.java Thu Jan 25 13:06:28 2007
@@ -38,7 +38,7 @@
* @param msgContext the Axis2 message context for a service request
* @return the <code>Axis2IsolationLayer</code> instance
*/
- protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault {
+ protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault {
return Axis2IsolationLayer.getInstance();
}
Modified: webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/ResourceManagementAdminServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/ResourceManagementAdminServiceImpl.java?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/ResourceManagementAdminServiceImpl.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-soa-axis2/src/org/apache/muse/core/platform/osgi/axis2/internal/ResourceManagementAdminServiceImpl.java Thu Jan 25 13:06:28 2007
@@ -25,6 +25,7 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.Constants;
import org.apache.muse.core.platform.osgi.ResourceManagementProvider;
import org.apache.muse.osgi.soa.core.SOAPProvider;
import org.apache.muse.osgi.soa.core.web.WebApp;
@@ -54,6 +55,13 @@
this.provider = provider;
}
+ public void intializeContext(Bundle bundle, String contextPath) throws Exception{
+ WebApp webApp = null;
+ if (contextPath != null) {
+ webApp = provider.getWebApp(bundle, contextPath, true);
+ }
+ }
+
public void deployManagementService(Bundle bundle, String homeName, String wsdlPath) throws SOAPException {
deployManagementService(bundle, DEFAULT_CONTEXT, homeName);
@@ -79,6 +87,7 @@
service.setName(srvName);
service.setWSDLPath(wsdlPath);
service.setBundle(bundle);
+ service.setScope(Constants.SCOPE_APPLICATION);
try {
service.setFileName(new URL("file",contextPath, srvName));
} catch (MalformedURLException e) {
Modified: webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/ResourceManagementAdminServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/ResourceManagementAdminServiceImpl.java?view=diff&rev=499974&r1=499973&r2=499974
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/ResourceManagementAdminServiceImpl.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/ResourceManagementAdminServiceImpl.java Thu Jan 25 13:06:28 2007
@@ -45,11 +45,19 @@
public static final String DEFAULT_CONTEXT = "management";
private BundleContext context;
- private Bundle bundle;
+ private Bundle bundle;
private ServiceReference provider;
-
+
private Map contextToWebAppMap = new HashMap();
+ public void intializeContext(Bundle bundle, String contextPath) throws Exception{
+ WebApp webApp = null;
+ if (contextPath != null) {
+ webApp = getWebApp(bundle, contextPath, true);
+ }
+ }
+
+
public ResourceManagementAdminServiceImpl(BundleContext context, ServiceReference provider){
this.context = context;
this.provider = provider;
@@ -59,8 +67,8 @@
public void deployManagementService(Bundle bundle, String homeName, String wsdlPath) throws Exception {
deployManagementService(bundle, DEFAULT_CONTEXT, homeName);
}
-
-
+
+
private WebAppDescriptor getWebAppDescriptor(String context, boolean requiresHttps) {
WebAppDescriptor wad = new WebAppDescriptor();
@@ -74,8 +82,8 @@
wad.servlet[0] = new ServletDescriptor("/services", servlet);
return wad;
}
-
-
+
+
private WebApp getWebApp(Bundle bundle, String contextPath, boolean create){
WebApp webApp = (WebApp) contextToWebAppMap.get(contextPath);
@@ -98,7 +106,7 @@
private WebApp getWebApp(String contextPath, boolean create){
return getWebApp(context.getBundle(),contextPath,create);
}
-
+
public void deployManagementService(Bundle bundle, String contextPath, String srvName, String wsdlPath) throws Exception {
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org