Author: dkulp
Date: Wed Apr 9 14:16:38 2008
New Revision: 646541
URL: http://svn.apache.org/viewvc?rev=646541&view=rev
Log:
Merged revisions 646515 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r646515 | dkulp | 2008-04-09 16:13:17 -0400 (Wed, 09 Apr 2008) | 2 lines
Propogate errors trying to start the jetty engine up to the user.
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?rev=646541&r1=646540&r2=646541&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
Wed Apr 9 14:16:38 2008
@@ -230,16 +230,23 @@
protected void doPublish(String addr) {
checkPublishPermission();
- ServerImpl serv = getServer(addr);
- if (addr != null) {
- EndpointInfo endpointInfo = serv.getEndpoint().getEndpointInfo();
- endpointInfo.setAddress(addr);
- if (publishedEndpointUrl != null) {
- // TODO is there a good place to put this key-string as a
constant?
- endpointInfo.setProperty("publishedEndpointUrl",
publishedEndpointUrl);
+ try {
+ ServerImpl serv = getServer(addr);
+ if (addr != null) {
+ EndpointInfo endpointInfo =
serv.getEndpoint().getEndpointInfo();
+ endpointInfo.setAddress(addr);
+ if (publishedEndpointUrl != null) {
+ // TODO is there a good place to put this key-string as a
constant?
+ endpointInfo.setProperty("publishedEndpointUrl",
publishedEndpointUrl);
+ }
+ this.address = addr;
}
+ serv.start();
+ } catch (WebServiceException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ throw new WebServiceException(ex);
}
- serv.start();
}
public ServerImpl getServer() {
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=646541&r1=646540&r2=646541&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Wed Apr 9 14:16:38 2008
@@ -31,7 +31,9 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.common.i18n.Message;
import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.ExchangeImpl;
import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.service.model.EndpointInfo;
@@ -139,14 +141,14 @@
*/
protected void activate() {
LOG.log(Level.FINE, "Activating receipt of incoming messages");
+ URL url = null;
try {
- URL url = new URL(endpointInfo.getAddress());
- engine.addServant(url,
- new JettyHTTPHandler(this, contextMatchOnExact()));
-
+ url = new URL(endpointInfo.getAddress());
} catch (Exception e) {
- LOG.log(Level.WARNING, "URL creation failed: ", e);
+ throw new Fault(new Message("START_UP_SERVER_FAILED_MSG", LOG,
e.getMessage()), e);
}
+ engine.addServant(url,
+ new JettyHTTPHandler(this, contextMatchOnExact()));
}
/**
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=646541&r1=646540&r2=646541&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Wed Apr 9 14:16:38 2008
@@ -32,8 +32,10 @@
import javax.servlet.ServletContext;
import org.apache.cxf.Bus;
+import org.apache.cxf.common.i18n.Message;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.configuration.jsse.TLSServerParameters;
+import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.transport.HttpUriMapper;
import org.apache.cxf.transport.https_jetty.JettySslConnectorFactory;
import org.mortbay.jetty.AbstractConnector;
@@ -305,8 +307,9 @@
server.stop();
server.destroy();
} catch (Exception ex) {
- LOG.log(Level.SEVERE, "START_UP_SERVER_FAILED_MSG", new
Object[] {e.getMessage()});
- }
+ //ignore - probably wasn't fully started anyway
+ }
+ throw new Fault(new Message("START_UP_SERVER_FAILED_MSG", LOG,
e.getMessage()), e);
}
}