diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-24 23:13:30 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-24 23:13:30 +0000 |
commit | 03629f4f9d73acdafa48362003953bda10d4100c (patch) | |
tree | dcdcbe2219a43b443e671b8f6c9cb6e15fe86fe8 /branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org | |
parent | 144a376f9eaeeaa37e863e22429fcd27b2f8d322 (diff) |
Adding provided binding URI to avoid issues when service is deployed in a webapp environment
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758080 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java index e1d470f5a3..9e08b5b92e 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java @@ -40,8 +40,10 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { private AtomBinding binding; private ServletHost servletHost; private MessageFactory messageFactory; - private String servletMapping; private Mediator mediator; + + private String servletMapping; + private String bindingURI; AtomServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, @@ -79,9 +81,17 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { servletMapping += "*"; } servletHost.addServletMapping(servletMapping, servlet); + + bindingURI = binding.getURI(); + if (!bindingURI.endsWith("/")) { + bindingURI += "/"; + } + + servletHost.addServletMapping(bindingURI, servlet); } public void stop() { servletHost.removeServletMapping(servletMapping); + servletHost.removeServletMapping(bindingURI); } } |