Merge changes from GERONIMO-6341 orm.xml does not take effect in latest Geronimo 3.0 beta branch.
git-svn-id: https://svn.apache.org/repos/asf/geronimo/server/trunk@1341511 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java b/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
index 6865777..028854f 100644
--- a/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
+++ b/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
@@ -327,7 +327,13 @@
if (wsdlFile == null) {
return null;
}
- URL wsdlURL = BundleUtils.getEntry(bundle, wsdlFile);
+ URL wsdlURL;
+ try {
+ wsdlURL = BundleUtils.getEntry(bundle, wsdlFile);
+ } catch (MalformedURLException e) {
+ log.warn("MalformedURLException when getting entry:" + wsdlFile + " from bundle " + bundle.getSymbolicName(), e);
+ wsdlURL = null;
+ }
if (wsdlURL == null) {
wsdlURL = bundle.getResource(wsdlFile);
if (wsdlURL == null) {
diff --git a/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java b/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
index 6f6ab01..aa2fb36 100644
--- a/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
+++ b/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
@@ -45,9 +45,13 @@
import org.apache.geronimo.jaxws.handler.GeronimoHandlerResolver;
import org.apache.xbean.osgi.bundle.util.BundleUtils;
import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public abstract class CXFEndpoint {
+ private static final Logger log = LoggerFactory.getLogger(CXFEndpoint.class);
+
protected Bus bus;
protected Object implementor;
@@ -88,7 +92,11 @@
// Not a URL, try as a resource
wsdlURL = bundle.getResource("/" + wsdlFile);
if (wsdlURL == null) {
- wsdlURL = BundleUtils.getEntry(bundle, wsdlFile);
+ try {
+ wsdlURL = BundleUtils.getEntry(bundle, wsdlFile);
+ } catch (MalformedURLException e1) {
+ log.warn("MalformedURLException when getting entry:" + wsdlFile + " from bundle " + bundle.getSymbolicName(), e);
+ }
}
}
return wsdlURL;
diff --git a/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/JAXWSServiceReference.java b/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/JAXWSServiceReference.java
index 8929a6b..e1574ad 100644
--- a/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/JAXWSServiceReference.java
+++ b/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/JAXWSServiceReference.java
@@ -106,7 +106,12 @@
if (wsdlURL == null) {
wsdlURL = bundle.getResource(this.wsdlURI.toString());
if (wsdlURL == null) {
- wsdlURL = BundleUtils.getEntry(bundle, wsdlURI.toString());
+ try {
+ wsdlURL = BundleUtils.getEntry(bundle, wsdlURI.toString());
+ } catch (MalformedURLException e) {
+ LOG.warn("MalformedURLException when getting entry:" + wsdlURI + " from bundle " + bundle.getSymbolicName(), e);
+ wsdlURL = null;
+ }
}
if (wsdlURL == null) {
LOG.warn("Failed to obtain WSDL: " + this.wsdlURI);
diff --git a/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java b/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
index 5019738..4049333 100644
--- a/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
+++ b/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
@@ -20,6 +20,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.util.Collection;
@@ -165,9 +166,8 @@
super(kernel, serviceBuilders, namingBuilders, resourceEnvironmentSetter, webServiceBuilder, moduleBuilderExtensions, bundleContext);
this.defaultEnvironment = defaultEnvironment;
this.defaultSessionTimeoutMinutes = (defaultSessionTimeoutSeconds == null) ? 30 * 60 : defaultSessionTimeoutSeconds;
- this.jettyContainerObjectName = jettyContainerName;
+ this.jettyContainerObjectName = jettyContainerName;
this.webAppInfoFactory = new StandardWebAppInfoFactory(defaultWebApp, null);
-
this.clusteringBuilders = new NamespaceDrivenBuilderCollection(clusteringBuilders);//, GerClusteringDocument.type.getDocumentElementName());
}
@@ -181,7 +181,7 @@
XmlBeansUtil.unregisterNamespaceUpdates(NAMESPACE_UPDATES);
kernel.getLifecycleMonitor().removeLifecycleListener(jspServletInfoProviderListener);
//TODO not yet implemented
- // SchemaConversionUtils.unregisterNamespaceConversions(GERONIMO_SCHEMA_CONVERSIONS);
+// SchemaConversionUtils.unregisterNamespaceConversions(GERONIMO_SCHEMA_CONVERSIONS);
}
public void doFail() {
@@ -201,7 +201,14 @@
String specDD = null;
WebApp webApp = null;
- URL specDDUrl = BundleUtils.getEntry(bundle, "WEB-INF/web.xml");
+ URL specDDUrl;
+ try {
+ specDDUrl = BundleUtils.getEntry(bundle, "WEB-INF/web.xml");
+ } catch (MalformedURLException e) {
+ log.warn("MalformedURLException when getting entry:" + "WEB-INF/web.xml" + " from bundle " + bundle.getSymbolicName(), e);
+ specDDUrl = null;
+ }
+
if (specDDUrl == null) {
webApp = new WebApp();
} else {
@@ -486,7 +493,7 @@
//TODO merge from default web app
if (webAppInfo.sessionConfig != null) {
- if (webAppInfo.sessionConfig.sessionTimeoutMinutes == -1 && defaultSessionTimeoutMinutes != -1) {
+ if (webAppInfo.sessionConfig.sessionTimeoutMinutes == null && defaultSessionTimeoutMinutes != -1) {
webAppInfo.sessionConfig.sessionTimeoutMinutes = defaultSessionTimeoutMinutes;
}
}
diff --git a/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java b/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
index edfadf9..f995355 100644
--- a/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
+++ b/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
@@ -379,7 +379,13 @@
private Resource lookupResource(String uriInContext) {
Bundle bundle = integrationContext.getBundle();
- URL url = BundleUtils.getEntry(bundle, uriInContext);
+ URL url;
+ try {
+ url = BundleUtils.getEntry(bundle, uriInContext);
+ } catch (MalformedURLException e) {
+ logger.warn("MalformedURLException when getting entry:" + uriInContext + " from bundle " + bundle.getSymbolicName(), e);
+ url = null;
+ }
if (url == null) {
url = bundle.getResource("META-INF/resources" + uriInContext);
if (url == null) {
diff --git a/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java b/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
index 47c34f8..0ea4ba9 100644
--- a/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
+++ b/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
@@ -212,7 +212,13 @@
String specDD = null;
WebApp webApp = null;
- URL specDDUrl = BundleUtils.getEntry(bundle, "WEB-INF/web.xml");
+ URL specDDUrl;
+ try {
+ specDDUrl = BundleUtils.getEntry(bundle, "WEB-INF/web.xml");
+ } catch (MalformedURLException e) {
+ log.warn("MalformedURLException when getting entry:" + "WEB-INF/web.xml" + " from bundle " + bundle.getSymbolicName(), e);
+ specDDUrl = null;
+ }
if (specDDUrl == null) {
webApp = new WebApp();
} else {
diff --git a/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java b/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java
index 3ef5223..9db128e 100644
--- a/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java
+++ b/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java
@@ -21,6 +21,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
@@ -233,7 +234,13 @@
@Override
protected Attributes doGetAttributes(String name, String[] attrIds) throws NamingException {
name = getName(name);
- URL url = BundleUtils.getEntry(bundle, name);
+ URL url;
+ try {
+ url = BundleUtils.getEntry(bundle, name);
+ } catch (MalformedURLException e) {
+ logger.warn("MalformedURLException when getting entry:" + name + " from bundle " + bundle.getSymbolicName(), e);
+ url = null;
+ }
if (url == null) {
return null;
}
@@ -264,7 +271,13 @@
@Override
protected Object doLookup(String name) {
name = getName(name);
- URL url = BundleUtils.getEntry(bundle, name);
+ URL url;
+ try {
+ url = BundleUtils.getEntry(bundle, name);
+ } catch (MalformedURLException e) {
+ logger.warn("MalformedURLException when getting entry:" + name + " from bundle " + bundle.getSymbolicName(), e);
+ url = null;
+ }
if (url == null) {
return null;
}