You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/06/13 13:05:54 UTC
svn commit: r667472 - in /incubator/tuscany/java/sca:
itest/transaction/src/main/resources/
modules/assembly-xml/src/main/resources/
modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/
modules/assembly/src/main/resources/ modul...
Author: slaws
Date: Fri Jun 13 04:05:53 2008
New Revision: 667472
URL: http://svn.apache.org/viewvc?rev=667472&view=rev
Log:
TUSCANY-2384 & TUSCANY-2267, Thanks for the patch Ram
Modified:
incubator/tuscany/java/sca/itest/transaction/src/main/resources/definitions.xml
incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ProblemImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties
incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
incubator/tuscany/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultLoggingMonitorImpl.java
incubator/tuscany/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultMonitorImpl.java
incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/policy-xml-validation-messages.properties
incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java
Modified: incubator/tuscany/java/sca/itest/transaction/src/main/resources/definitions.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/transaction/src/main/resources/definitions.xml?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/transaction/src/main/resources/definitions.xml (original)
+++ incubator/tuscany/java/sca/itest/transaction/src/main/resources/definitions.xml Fri Jun 13 04:05:53 2008
@@ -20,7 +20,7 @@
<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
- <policySet name="tuscany:ManagedTransactionPolicySet" provides="managedTransaction" appliesTo="implementation">
+ <policySet name="tuscany:ManagedTransactionPolicySet" provides="managedTransaction" appliesTo="sca:implementation.java">
<intentMap provides="managedTransaction" default="global">
<qualifier name="global">
<tuscany:transactionPolicy transactionTimeout="1200" action="REQUIRE_GLOBAL" />
@@ -36,19 +36,19 @@
<tuscany:transactionPolicy action="REQUIRE_NONE" />
</policySet>
- <policySet name="tuscany:PropagatesTransactionPolicySet" provides="propagatesTransaction" appliesTo="binding">
+ <policySet name="tuscany:PropagatesTransactionPolicySet" provides="propagatesTransaction" appliesTo="sca:component">
<tuscany:transactionPolicy action="PROPAGATE" />
</policySet>
- <policySet name="tuscany:SuspendsTransactionPolicySet" provides="suspendsTransaction" appliesTo="binding">
+ <policySet name="tuscany:SuspendsTransactionPolicySet" provides="suspendsTransaction" appliesTo="sca:binding.sca">
<tuscany:transactionPolicy action="SUSPEND" />
</policySet>
- <policySet name="tuscany:TransactedOneWayPolicySet" provides="transactedOneWay" appliesTo="binding">
+ <policySet name="tuscany:TransactedOneWayPolicySet" provides="transactedOneWay" appliesTo="sca:binding.sca">
<tuscany:transactionPolicy action="PROPAGATE" />
</policySet>
- <policySet name="tuscany:ImmediateOneWayPolicySet" provides="immediateOneWay" appliesTo="binding">
+ <policySet name="tuscany:ImmediateOneWayPolicySet" provides="immediateOneWay" appliesTo="sca:binding.sca">
<tuscany:transactionPolicy action="SUSPEND" />
</policySet>
Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties Fri Jun 13 04:05:53 2008
@@ -24,6 +24,6 @@
UnexpectedImplementationElement = Unexpected <implementation> element found. It should appear inside a <component> element.
PolicyImplValidationException = PolicyValidation exception when processing implementation of component {0} due to {1}.
PolicyServiceValidationException = PolicyValidation exceptions when processing service/reference {0} in {1}. Error is {2}
-ContributionReadException = ContributionReadException occured due to :
-ContributionWriteException = ContributionWriteException occured due to :
+ContributionReadException = ContributionReadException occured due to : {0}
+ContributionWriteException = ContributionWriteException occured due to : {0}
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java Fri Jun 13 04:05:53 2008
@@ -298,10 +298,24 @@
* @param model
*/
private void warning(String message, Object model, String... messageParameters) {
- if (monitor != null) {
- Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
- monitor.problem(problem);
- }
+ if (monitor != null) {
+ Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+ monitor.problem(problem);
+ }
+ }
+
+ /**
+ * Report a error.
+ *
+ * @param problems
+ * @param message
+ * @param model
+ */
+ private void error(String message, Object model, String... messageParameters) {
+ if (monitor != null) {
+ Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+ monitor.problem(problem);
+ }
}
/**
@@ -392,9 +406,7 @@
// Check that a type or element are specified
if (componentProperty.getXSDElement() == null && componentProperty.getXSDType() == null) {
- warning("No type specified on component property: " + component.getName()
- + "/"
- + componentProperty.getName(), component);
+ warning("NoTypeForComponentProperty", component, component.getName(), componentProperty.getName());
}
}
}
@@ -553,10 +565,7 @@
if (interfaceContract != null && !componentService.getInterfaceContract().equals(interfaceContract)) {
if (!interfaceContractMapper.isCompatible(componentService.getInterfaceContract(),
interfaceContract)) {
- warning("Component service interface incompatible with service interface: " + component
- .getName()
- + "/"
- + componentService.getName(), component);
+ warning("ServiceIncompatibleComponentInterface", component, component.getName(), componentService.getName());
}
}
} else {
@@ -640,9 +649,7 @@
}
for (Service service : implementation.getServices()) {
if (services.containsKey(service.getName())) {
- warning("Duplicate service name: " + component.getName()
- + "/"
- + service.getName(), component);
+ warning("DuplicateImplementationServiceName", component, component.getName(), service.getName());
} else {
services.put(service.getName(), service);
}
@@ -1261,13 +1268,7 @@
binding.setURI(constructBindingURI(baseURI, componentURI, bindingURI, includeBindingName, bindingName));
} catch (URISyntaxException ex) {
- warning("URLSyntaxException when creating binding URI at component " +
- componentURIString +
- " service " +
- service.getName() +
- " binding " +
- binding.getName(),
- ex);
+ error("URLSyntaxException", binding, componentURIString, service.getName(), binding.getName());
}
}
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java Fri Jun 13 04:05:53 2008
@@ -134,7 +134,7 @@
warning("ReferenceWithoutTargets", composite, composite.getName().toString(), componentReference.getName());
}
} else {
- warning("Too many targets on reference: " + componentReference.getName(), composite);
+ warning("TooManyReferenceTargets", composite, componentReference.getName());
}
}
}
@@ -202,8 +202,23 @@
*/
private void warning(String message, Object model, String... messageParameters) {
if (monitor != null) {
- Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
- monitor.problem(problem);
+ Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+ monitor.problem(problem);
+ }
+ }
+
+ /**
+ * Report a exception.
+ *
+ * @param problems
+ * @param message
+ * @param model
+ */
+ private void error(String message, Object model, Exception ex) {
+ if (monitor != null) {
+ Problem problem = null;
+ problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.ERROR, model, message, ex);
+ monitor.problem(problem);
}
}
@@ -295,7 +310,7 @@
// Check the compositeServiceInterfaceContract and promotedServiceInterfaceContract
boolean isCompatible = interfaceContractMapper.isCompatible(compositeServiceInterfaceContract, promotedServiceInterfaceContract);
if(!isCompatible){
- warning("Interface of composite service "+promotedServiceName +" must be subset of the interface declared by promoted component service.", compositeService);
+ warning("ServiceInterfaceNotSubSet", compositeService, promotedServiceName);
}
}
@@ -358,7 +373,7 @@
// Check the compositeInterfaceContract and componentInterfaceContract
boolean isCompatible = interfaceContractMapper.isCompatible(compositeReferenceInterfaceContract, componentReferenceInterfaceContract);
if (!isCompatible) {
- warning("Interface of composite reference "+componentReferenceName +" must be compatible with the interface declared by promoted component reference.", compositeReference);
+ warning("ReferenceInterfaceNotSubSet", compositeReference, componentReferenceName);
}
}
} else {
@@ -414,13 +429,19 @@
if (multiplicity == Multiplicity.ONE_N || multiplicity == Multiplicity.ONE_ONE) {
if (endpoints.size() == 0) {
- warning("No target services found for the component reference to be autowired: " + componentReference
- .getName(),
- componentReference);
+ warning("NoComponentReferenceTarget", componentReference, componentReference.getName());
}
}
} else if (!componentReference.getTargets().isEmpty()) {
+
+ // Check if the component reference does not mix the use of endpoints specified via
+ // binding elements with target endpoints specified via the target attribute
+ for (Binding binding : componentReference.getBindings()) {
+ if (binding.getURI() != null) {
+ warning("ReferenceEndPointMixWithTarget", composite, componentReference.getName());
+ }
+ }
// Resolve targets specified on the component reference
for (ComponentService componentService : componentReference.getTargets()) {
@@ -456,7 +477,8 @@
// see if an sca binding is associated with a resolved target or not
componentService.setUnresolved(false);
} else {
- warning("ReferenceIncompatibleInterface", composite, composite.getName().toString(), componentReference.getName(), componentService.getName());
+ warning("ReferenceIncompatibleInterface", composite, composite.getName().toString(),
+ componentReference.getName(), componentService.getName());
}
} else {
// add all the reference bindings into the target so that they
@@ -472,7 +494,8 @@
// The bindings will be cloned back into the reference when the
// target is finally resolved.
- warning("ComponentReferenceTargetNotFound", composite, composite.getName().toString(), componentService.getName());
+ warning("ComponentReferenceTargetNotFound", composite,
+ composite.getName().toString(), componentService.getName());
}
}
} else if (componentReference.getReference() != null) {
@@ -513,11 +536,8 @@
// see if an sca binding is associated with a resolved target or not
componentService.setUnresolved(false);
} else {
- warning("Incompatible interfaces on component reference and target: " + componentReference
- .getName()
- + " : "
- + componentService.getName(),
- composite);
+ warning("ComponentIncompatibleInterface", composite,
+ componentReference.getName(), componentService.getName());
}
} else {
// add all the reference bindings into the target so that they
@@ -534,7 +554,8 @@
endpoint.getCandidateBindings().addAll(componentReference.getBindings());
endpoints.add(endpoint);
- warning("Component reference target from component type not found, it might be a remote service: " + componentService.getName(), composite);
+ warning("ComponentReferenceTargetNotFound", composite,
+ composite.getName().toString(), componentService.getName());
}
}
}
@@ -861,7 +882,7 @@
if (resolvedReference != null) {
wire.setSource(resolvedReference);
} else {
- warning("Wire source not found: " + source.getName(), composite);
+ warning("WireSourceNotFound", composite, source.getName());
}
} else {
resolvedReference = wire.getSource();
@@ -874,7 +895,7 @@
if (resolvedService != null) {
wire.setTarget(target);
} else {
- warning("Wire target not found: " + source.getName(), composite);
+ warning("WireTargetNotFound", composite, source.getName());
}
} else {
resolvedService = wire.getTarget();
@@ -892,9 +913,7 @@
//resolvedReference.getTargets().add(resolvedService);
resolvedReference.getTargets().add(wire.getTarget());
} else {
- warning("Incompatible interfaces on wire source and target: " + source.getName()
- + " : "
- + target.getName(), composite);
+ warning("WireIncompatibleInterface", composite, source.getName(), target.getName());
}
}
}
@@ -1097,8 +1116,7 @@
if (promotedReference.getMultiplicity() == Multiplicity.ONE_ONE || promotedReference.getMultiplicity() == Multiplicity.ZERO_ONE) {
if (promotedReference.getBindings().size() > 1) {
- warning("Component reference " + promotedReference.getName() + " has more than one wires",
- promotedReference);
+ warning("ComponentReferenceMoreWire", promotedReference, promotedReference.getName());
}
}
Set<Binding> callbackBindings = new HashSet<Binding>();
@@ -1152,7 +1170,7 @@
try {
PolicyConfigurationUtil.computeImplementationIntentsAndPolicySets(implemenation, component);
} catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
+ error("PolicyRelatedException", implemenation, e);
//throw new RuntimeException(e);
}
@@ -1192,7 +1210,7 @@
PolicyConfigurationUtil.determineApplicableBindingPolicySets(componentService, null);
} catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
+ error("PolicyRelatedException", componentService, e);
//throw new RuntimeException(e);
}
}
@@ -1223,7 +1241,7 @@
false);
}
} catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
+ error("PolicyRelatedException", componentReference, e);
//throw new RuntimeException(e);
}
}
@@ -1243,7 +1261,7 @@
PolicyConfigurationUtil.computeBindingIntentsAndPolicySets(service);
PolicyConfigurationUtil.determineApplicableBindingPolicySets(service, null);
} catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
+ error("PolicyRelatedException", service, e);
//throw new RuntimeException(e);
}
@@ -1268,7 +1286,7 @@
PolicyConfigurationUtil.computeBindingIntentsAndPolicySets(reference);
PolicyConfigurationUtil.determineApplicableBindingPolicySets(reference, null);
} catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
+ error("PolicyRelatedException", reference, e);
//throw new RuntimeException(e);
}
}
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java Fri Jun 13 04:05:53 2008
@@ -23,29 +23,38 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.logging.Logger;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.Problem.Severity;
/**
* Implementation of a CompositeBuilder.
*
* @version $Rev$ $Date$
*/
-public class CompositeIncludeBuilderImpl implements CompositeBuilder {
-
- public static final Logger logger = Logger.getLogger(CompositeIncludeBuilderImpl.class.getName());
-
+public class CompositeIncludeBuilderImpl implements CompositeBuilder {
+
+ private Monitor monitor;
+
public CompositeIncludeBuilderImpl(Monitor monitor) {
+ this.monitor = monitor;
}
-
+
public void build(Composite composite) throws CompositeBuilderException {
fuseIncludes(composite);
}
+ private void warning(String message, Object model, String... messageParameters) {
+ if (monitor != null){
+ Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+ monitor.problem(problem);
+ }
+ }
+
/**
* Collect all includes in a graph of includes.
*
@@ -55,7 +64,7 @@
private void collectIncludes(Composite composite, List<Composite> includes, Set<Composite> visited) {
for (Composite include : composite.getIncludes()) {
if (visited.contains(include)) {
- logger.warning("Composite " + include.getName() + " has already been included.");
+ warning("CompositeAlreadyIncluded", composite, include.getName().toString());
continue;
}
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java Fri Jun 13 04:05:53 2008
@@ -46,7 +46,15 @@
Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
}
- }
+ }
+
+ private void error(String message, Object model, Exception ex) {
+ if (monitor != null){
+ Problem problem = null;
+ problem = new ProblemImpl(this.getClass().getName(), "assembly-validation-messages", Severity.ERROR, model, message, ex);
+ monitor.problem(problem);
+ }
+ }
/**
* Resolve an endpoint against the provided target information and the
@@ -82,7 +90,7 @@
PolicyConfigurationUtil.determineApplicableBindingPolicySets(endpoint.getSourceComponentReference(),
endpoint.getTargetComponentService());
} catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
+ error("PolicyRelatedException", endpoint, e);
}
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ProblemImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ProblemImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ProblemImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ProblemImpl.java Fri Jun 13 04:05:53 2008
@@ -113,7 +113,15 @@
Logger logger = Logger.getLogger(sourceClassName, bundleName);
LogRecord record = new LogRecord(Level.INFO, messageId);
- record.setParameters(messageParams);
+
+ if (cause == null){
+ record.setParameters(messageParams);
+
+ } else {
+ Object[] params = new String[1];
+ params[0] = cause.toString();
+ record.setParameters(params);
+ }
record.setResourceBundle(logger.getResourceBundle());
record.setSourceClassName(sourceClassName);
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties Fri Jun 13 04:05:53 2008
@@ -26,6 +26,7 @@
ServiceNotFoundForComponentService = Service not found for component service: Component = {0} Service = {1}
UnresolvedComponentImplementation = Component implementation not found: Component = {0} Uri = {1}
DuplicateImplementationPropertyName = Duplicate property name: Component = {0} Property = {1}
+DuplicateImplementationServiceName = Duplicate service name: Component = {0} Service = {1}
DuplicateImplementationReferenceName = Duplicate reference name: Component = {0} Reference = {1}
PropertyNotFound = Property not found for component property: Component = {0} Property = {1}
PropertyMustSupplyIncompatible = Component property mustSupply attribute incompatible with property: Component = {0} Property = {1}
@@ -35,6 +36,7 @@
ReferenceIncompatibleMultiplicity = Component reference multiplicity incompatible with reference multiplicity: Component = {0} Reference = {1}
ReferenceIncompatibleInterface = Incompatible interfaces on component reference and target: Composite = {0} Reference = {1} Service = {2}
ReferenceIncompatibleComponentInterface = Component reference interface incompatible with reference interface: Component = {0} Reference = {1}
+ServiceIncompatibleComponentInterface = Component service interface incompatible with service interface: Component = {0} Service = {1}
MultipleBindingsForService = Multiple bindings with the same name for a service: Binding = {0} Service = {1} Binding = {2}
ReferenceWithoutTargets = No targets for reference: Composite = {0} Reference = {1}
PromotedReferenceNotFound = Promoted component reference not found: Composite = {0} Reference = {1}
@@ -42,4 +44,18 @@
ComponentReferenceTargetNotFound = Component reference target not found, it might be a remote service running elsewhere in the SCA Domain: Composite = {0} Service = {1}
NoSCABindingAvailableForUnresolvedService = A local service cannot be found for reference {0} target {1} and there is no SCA binding available to represent the unresolved target
NoMatchingBinding = Component reference {0} does not have a binding which matches the bindings of service {1}
-NoMatchingCallbackBinding = Component reference {0} does not have a callback binding which matches the callback bindings of service {1}
\ No newline at end of file
+NoMatchingCallbackBinding = Component reference {0} does not have a callback binding which matches the callback bindings of service {1}
+ReferenceEndPointMixWithTarget = Reference {0} must not specify endpoints using both target attribute and with binding uri attribute
+PolicyRelatedException = Policy Related Exception occured due to : {0}
+CompositeAlreadyIncluded = Composite {0} has already been included.
+ComponentReferenceMoreWire = Component reference {0} has more than one wires
+WireTargetNotFound = Wire target not found : {0}
+WireSourceNotFound = Wire source not found : {0}
+WireIncompatibleInterface = Incompatible interfaces on wire source and target : source = {0} target = {1}
+ComponentIncompatibleInterface = Incompatible interfaces on component reference and target : reference = {0} target = {1}
+TooManyReferenceTargets = Too many targets on reference: {0}
+ReferenceInterfaceNotSubSet = Interface of composite reference {0} must be compatible with the interface declared by promoted component reference.
+ServiceInterfaceNotSubSet = Interface of composite service {0} must be subset of the interface declared by promoted component service.
+NoComponentReferenceTarget = No target services found for the component reference to be autowired: {0}
+NoTypeForComponentProperty = No type specified on component property: Component = {0} Property = {1}
+URLSyntaxException = URLSyntaxException when creating binding URI at component = {0} service = {1} binding = {2}
\ No newline at end of file
Modified: incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java Fri Jun 13 04:05:53 2008
@@ -170,8 +170,10 @@
* @param model
*/
private void error(String message, Object model, Object... messageParameters) {
- Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
- monitor.problem(problem);
+ if (monitor != null) {
+ Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-impl-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+ monitor.problem(problem);
+ }
}
public Contribution contribute(String contributionURI, URL sourceURL, boolean storeInRepository)
Modified: incubator/tuscany/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultLoggingMonitorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultLoggingMonitorImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultLoggingMonitorImpl.java (original)
+++ incubator/tuscany/java/sca/modules/monitor-logging/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultLoggingMonitorImpl.java Fri Jun 13 04:05:53 2008
@@ -64,7 +64,7 @@
if (problem.getCause() != null) {
problemCache.add(problem);
problemLogger.logp(Level.SEVERE, problem.getSourceClassName(),
- null, problem.getMessageId(), problem.getCause());
+ null, problem.getMessageId(), problem.getCause().toString());
} else {
problemCache.add(problem);
problemLogger.logp(Level.SEVERE, problem.getSourceClassName(), null,
Modified: incubator/tuscany/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultMonitorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultMonitorImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultMonitorImpl.java (original)
+++ incubator/tuscany/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/DefaultMonitorImpl.java Fri Jun 13 04:05:53 2008
@@ -62,7 +62,8 @@
if (problem.getCause() != null) {
problemCache.add(problem);
problemLogger.logp(Level.SEVERE, problem.getSourceClassName(),
- null, problem.getMessageId(), problem.getCause());
+ null, problem.getMessageId(), problem.getCause().toString());
+
} else {
problemCache.add(problem);
problemLogger.logp(Level.SEVERE, problem.getSourceClassName(), null,
Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/policy-xml-validation-messages.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/policy-xml-validation-messages.properties?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/policy-xml-validation-messages.properties (original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/policy-xml-validation-messages.properties Fri Jun 13 04:05:53 2008
@@ -33,4 +33,4 @@
RequiredAttributeMissing = Required attribute {0} missing from BindingType Definition
AlwaysProvidedIntentNotFound = Always Provided Intent - {0} not found for ExtensionType {1}
MayProvideIntentNotFound = May Provide Intent - {0} not found for ExtensionType {1}
-ContributionReadException = ContributionReadException occured due to:
\ No newline at end of file
+ContributionReadException = ContributionReadException occured due to: {0}
\ No newline at end of file
Modified: incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java?rev=667472&r1=667471&r2=667472&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java Fri Jun 13 04:05:53 2008
@@ -136,8 +136,10 @@
* @param model
*/
private void warning(String message, Object model, Object... messageParameters) {
- Problem problem = new ProblemImpl(getClass().getName(), "workspace-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
- monitor.problem(problem);
+ if (monitor != null) {
+ Problem problem = new ProblemImpl(getClass().getName(), "workspace-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+ monitor.problem(problem);
+ }
}
}