summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/builder/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-22 15:16:38 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-22 15:16:38 +0000
commit76b3a4b78fce4be4804c6958197abb6e34267e7b (patch)
tree7d1ff57ba08d23daf31629420110feaeaeab1ba7 /java/sca/modules/builder/src/main
parent52e64b4f23ce37410adbc772ef519998f4306089 (diff)
Add missing monitor.popContext() calls
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@828741 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/builder/src/main')
-rw-r--r--java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java131
1 files changed, 69 insertions, 62 deletions
diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java
index a2e7819d24..6b181db0c1 100644
--- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java
+++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java
@@ -67,70 +67,77 @@ public class EndpointBuilderImpl implements CompositeBuilder {
for (Component component : composite.getComponents()) {
- monitor.pushContext("Component: " + component.getName().toString());
-
- // recurse for composite implementations
- Implementation implementation = component.getImplementation();
- if (implementation instanceof Composite) {
- processComponentServices((Composite)implementation, context);
- }
-
- // create an endpoint for each component service binding
- for (ComponentService service : component.getServices()) {
- monitor.pushContext("Service: " + service.getName());
-
- //verify JAX-WS async assertions as in JavaCAA section 11.1
- List<Operation> asyncOperations = null;
- try {
- asyncOperations = (List<Operation>) service.getInterfaceContract().getInterface().getAttributes().get("JAXWS-ASYNC-OPERATIONS");
- }catch(Exception e) {
- //ignore
+ try {
+ monitor.pushContext("Component: " + component.getName().toString());
+
+ // recurse for composite implementations
+ Implementation implementation = component.getImplementation();
+ if (implementation instanceof Composite) {
+ processComponentServices((Composite)implementation, context);
}
-
-
- if(asyncOperations != null) {
- if( ! asyncOperations.isEmpty()) {
-
- //error JCA100006
-
- //FIXME create a java validation message resource bundle
- Monitor.error(monitor,
- this,
- null,
- "[JCA100006] JAX-WS client-side asynchronous pooling and callback methods are not allowed in service interfaces",
- service,
- service.getName());
- }
+
+ // create an endpoint for each component service binding
+ for (ComponentService service : component.getServices()) {
+ try {
+ monitor.pushContext("Service: " + service.getName());
+
+ //verify JAX-WS async assertions as in JavaCAA section 11.1
+ List<Operation> asyncOperations = null;
+ try {
+ asyncOperations = (List<Operation>) service.getInterfaceContract().getInterface().getAttributes().get("JAXWS-ASYNC-OPERATIONS");
+ }catch(Exception e) {
+ //ignore
+ }
+
+ if(asyncOperations != null) {
+ if( ! asyncOperations.isEmpty()) {
+
+ //error JCA100006
+
+ //FIXME create a java validation message resource bundle
+ Monitor.error(monitor,
+ this,
+ null,
+ "[JCA100006] JAX-WS client-side asynchronous pooling and callback methods are not allowed in service interfaces",
+ service,
+ service.getName());
+ }
+ }
+
+
+
+
+ /* change to finding the promoted component and service
+ * when the wire is created as storing them here leads to
+ * the wrong URI being calculated
+ Component endpointComponent = component;
+ ComponentService endpointService = service;
+
+ // TODO - EPR - We maintain all endpoints at the right level now
+ // but endpoints for promoting services must point down
+ // to the services they promote.
+ if (service.getService() instanceof CompositeService) {
+ CompositeService compositeService = (CompositeService)service.getService();
+ endpointService = ServiceConfigurationUtil.getPromotedComponentService(compositeService);
+ endpointComponent = ServiceConfigurationUtil.getPromotedComponent(compositeService);
+ } // end if
+ */
+
+ for (Binding binding : service.getBindings()) {
+ Endpoint endpoint = assemblyFactory.createEndpoint();
+ endpoint.setComponent(component);
+ endpoint.setService(service);
+ endpoint.setBinding(binding);
+ endpoint.setUnresolved(false);
+ service.getEndpoints().add(endpoint);
+ } // end for
+ } finally {
+ monitor.popContext();
+ }
}
-
-
-
-
- /* change to finding the promoted component and service
- * when the wire is created as storing them here leads to
- * the wrong URI being calculated
- Component endpointComponent = component;
- ComponentService endpointService = service;
-
- // TODO - EPR - We maintain all endpoints at the right level now
- // but endpoints for promoting services must point down
- // to the services they promote.
- if (service.getService() instanceof CompositeService) {
- CompositeService compositeService = (CompositeService)service.getService();
- endpointService = ServiceConfigurationUtil.getPromotedComponentService(compositeService);
- endpointComponent = ServiceConfigurationUtil.getPromotedComponent(compositeService);
- } // end if
- */
-
- for (Binding binding : service.getBindings()) {
- Endpoint endpoint = assemblyFactory.createEndpoint();
- endpoint.setComponent(component);
- endpoint.setService(service);
- endpoint.setBinding(binding);
- endpoint.setUnresolved(false);
- service.getEndpoints().add(endpoint);
- } // end for
- }
+ } finally {
+ monitor.popContext();
+ }
}
}