Modified: incubator/tuscany/java/sca/services/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/loader/SpringXMLComponentTypeLoader.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/loader/SpringXMLComponentTypeLoader.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/loader/SpringXMLComponentTypeLoader.java (original) +++ incubator/tuscany/java/sca/services/containers/container.spring/src/main/java/org/apache/tuscany/container/spring/loader/SpringXMLComponentTypeLoader.java Wed Dec 13 22:18:28 2006 @@ -95,10 +95,7 @@ try { serviceType = cl.loadClass(reader.getAttributeValue(SCA_NS, "type")); } catch (ClassNotFoundException e) { - MissingResourceException e2 = - new MissingResourceException("Error loading service class", e); - e2.setIdentifier(name); - throw e2; + throw new MissingResourceException("Error loading service class", name, e); } String target = reader.getAttributeValue(SCA_NS, "target"); type.addServiceDeclaration(new ServiceDeclaration(name, serviceType, target)); @@ -108,10 +105,7 @@ try { serviceType = cl.loadClass(reader.getAttributeValue(SCA_NS, "type")); } catch (ClassNotFoundException e) { - MissingResourceException e2 = - new MissingResourceException("Error loading service class", e); - e2.setIdentifier(name); - throw e2; + throw new MissingResourceException("Error loading service class", name, e); } type.addReferenceDeclaration(new ReferenceDeclaration(name, serviceType)); }
Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLLoader.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLLoader.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLLoader.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLLoader.java Wed Dec 13 22:18:28 2006 @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; - import javax.wsdl.PortType; import javax.wsdl.WSDLException; import javax.xml.namespace.QName; @@ -46,7 +45,7 @@ /** * Loads a WSDL interface definition from an XML-based assembly file - * + * * @version $Rev$ $Date$ */ public class InterfaceWSDLLoader extends LoaderExtension { @@ -60,7 +59,7 @@ private InterfaceWSDLIntrospector introspector; - @Constructor ({ "registry", "wsdlRegistry", "introspector" }) + @Constructor({"registry", "wsdlRegistry", "introspector"}) public InterfaceWSDLLoader(@Autowire LoaderRegistry registry, @Autowire WSDLDefinitionRegistry wsdlRegistry, @Autowire InterfaceWSDLIntrospector introspector) { @@ -108,13 +107,9 @@ try { wsdlRegistry.loadDefinition(wsdlLocation, deploymentContext.getClassLoader()); } catch (IOException e) { - LoaderException le = new LoaderException(e); - le.setIdentifier(wsdlLocation); - throw le; + throw new LoaderException(wsdlLocation, e); } catch (WSDLException e) { - LoaderException le = new LoaderException(e); - le.setIdentifier(wsdlLocation); - throw le; + throw new LoaderException(wsdlLocation, e); } } @@ -135,9 +130,7 @@ contract.getExtensions().putAll(extensions); return contract; } catch (InvalidServiceContractException e) { - LoaderException le = new LoaderException(e); - le.setIdentifier(wsdlLocation); - throw le; + throw new LoaderException(wsdlLocation, e); } } Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidFragmentException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidFragmentException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidFragmentException.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidFragmentException.java Wed Dec 13 22:18:28 2006 @@ -22,18 +22,9 @@ * @version $Rev$ $Date$ */ public class InvalidFragmentException extends WSDLLoaderException { - public InvalidFragmentException() { - } public InvalidFragmentException(String message) { super(message); } - public InvalidFragmentException(String message, Throwable cause) { - super(message, cause); - } - - public InvalidFragmentException(Throwable cause) { - super(cause); - } } Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLException.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLException.java Wed Dec 13 22:18:28 2006 @@ -23,35 +23,12 @@ /** * An exception to indicate the WSDL definition is invalid + * + * @version $Rev$ $Date$ */ public class InvalidWSDLException extends InvalidServiceContractException { - /** - * - */ - public InvalidWSDLException() { + public InvalidWSDLException(String message, String identifier) { + super(message, identifier); } - - /** - * @param message - */ - public InvalidWSDLException(String message) { - super(message); - } - - /** - * @param message - * @param cause - */ - public InvalidWSDLException(String message, Throwable cause) { - super(message, cause); - } - - /** - * @param cause - */ - public InvalidWSDLException(Throwable cause) { - super(cause); - } - } Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLLocationException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLLocationException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLLocationException.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InvalidWSDLLocationException.java Wed Dec 13 22:18:28 2006 @@ -22,15 +22,9 @@ * @version $Rev$ $Date$ */ public class InvalidWSDLLocationException extends WSDLLoaderException { - public InvalidWSDLLocationException() { - } public InvalidWSDLLocationException(String message) { super(message); - } - - public InvalidWSDLLocationException(String message, Throwable cause) { - super(message, cause); } public InvalidWSDLLocationException(Throwable cause) { Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/NotSupportedWSDLException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/NotSupportedWSDLException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/NotSupportedWSDLException.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/NotSupportedWSDLException.java Wed Dec 13 22:18:28 2006 @@ -16,42 +16,22 @@ * specific language governing permissions and limitations * under the License. */ - package org.apache.tuscany.idl.wsdl; import org.apache.tuscany.spi.idl.InvalidServiceContractException; /** * An exception to indicate some WSDL styles that we don't support + * + * @version $Rev$ $Date$ */ public class NotSupportedWSDLException extends InvalidServiceContractException { - /** - * - */ - public NotSupportedWSDLException() { - } - - /** - * @param message - */ public NotSupportedWSDLException(String message) { super(message); } - /** - * @param message - * @param cause - */ - public NotSupportedWSDLException(String message, Throwable cause) { - super(message, cause); + public NotSupportedWSDLException(String message, String identifier) { + super(message, identifier); } - - /** - * @param cause - */ - public NotSupportedWSDLException(Throwable cause) { - super(cause); - } - } Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/UnresolveableResourceException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/UnresolveableResourceException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/UnresolveableResourceException.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/UnresolveableResourceException.java Wed Dec 13 22:18:28 2006 @@ -22,18 +22,13 @@ * @version $Rev$ $Date$ */ public class UnresolveableResourceException extends WSDLLoaderException { - public UnresolveableResourceException() { - } public UnresolveableResourceException(String message) { super(message); } - public UnresolveableResourceException(String message, Throwable cause) { - super(message, cause); + public UnresolveableResourceException(String message, String identifier) { + super(message, identifier); } - public UnresolveableResourceException(Throwable cause) { - super(cause); - } } Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderException.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderException.java Wed Dec 13 22:18:28 2006 @@ -31,6 +31,10 @@ super(message); } + protected WSDLLoaderException(String message, String identifier) { + super(message, identifier); + } + protected WSDLLoaderException(String message, Throwable cause) { super(message, cause); } Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java Wed Dec 13 22:18:28 2006 @@ -130,9 +130,7 @@ public String getNamespace(URI iri) throws UnresolveableResourceException { if (!iri.isAbsolute()) { - UnresolveableResourceException ure = new UnresolveableResourceException("no namespace defined in " + iri); - ure.setIdentifier(iri.toString()); - throw ure; + throw new UnresolveableResourceException("No namespace defined in", iri.toString()); } StringBuilder s = new StringBuilder(); s.append(iri.getScheme()); Modified: incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java (original) +++ incubator/tuscany/java/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java Wed Dec 13 22:18:28 2006 @@ -48,22 +48,17 @@ /** * Metadata for a WSDL operation + * + * @version $Rev$ $Date$ */ public class WSDLOperation { - protected XMLSchemaRegistry schemaRegistry; - protected Operation operation; - - private String dataBinding; - protected org.apache.tuscany.spi.model.Operation<QName> operationModel; - protected DataType<List<DataType<QName>>> inputType; - protected DataType<QName> outputType; - protected List<DataType<QName>> faultTypes; + private String dataBinding; /** * @param operation The WSDL4J operation @@ -90,10 +85,10 @@ public boolean isWrapperStyle() throws InvalidWSDLException { if (wrapperStyle == null) { wrapperStyle = - Boolean.valueOf(wrapper.getInputChildElements() != null - && (operation.getOutput() == null || wrapper.getOutputChildElements() != null)); + wrapper.getInputChildElements() != null + && (operation.getOutput() == null || wrapper.getOutputChildElements() != null); } - return wrapperStyle.booleanValue(); + return wrapperStyle; } public Wrapper getWrapper() throws InvalidWSDLException { @@ -228,7 +223,7 @@ if (elementName != null) { element = schemaRegistry.getElement(elementName); if (element == null) { - throw new InvalidWSDLException("Element cannot be resolved: " + elementName); + throw new InvalidWSDLException("Element cannot be resolved", elementName.toString()); } } else { // Create an faked XSD element to host the metadata @@ -239,7 +234,7 @@ if (typeName != null) { XmlSchemaType type = schemaRegistry.getType(typeName); if (type == null) { - throw new InvalidWSDLException("Type cannot be resolved: " + typeName); + throw new InvalidWSDLException("Type cannot be resolved", typeName.toString()); } element.setSchemaType(type); element.setSchemaTypeName(type.getQName()); @@ -306,10 +301,8 @@ } XmlSchemaType type = element.getSchemaType(); if (type == null) { - InvalidWSDLException ex = - new InvalidWSDLException("The XML schema element doesn't have a type"); - ex.addContextName("element: " + element.getQName()); - throw ex; + String qName = element.getQName().toString(); + throw new InvalidWSDLException("The XML schema element does not have a type", qName); } if (!(type instanceof XmlSchemaComplexType)) { // Has to be a complexType @@ -375,10 +368,8 @@ } inputWrapperElement = schemaRegistry.getElement(elementName); if (inputWrapperElement == null) { - InvalidWSDLException ex = - new InvalidWSDLException("The element is not declared in a XML schema"); - ex.addContextName("element: " + elementName); - throw ex; + throw new InvalidWSDLException("The element is not declared in a XML schema", + elementName.toString()); } inputElements = getChildElements(inputWrapperElement); return inputElements; @@ -406,10 +397,7 @@ Part part = (Part) parts.iterator().next(); QName elementName = part.getElementName(); if (elementName == null) { - InvalidWSDLException ex = - new InvalidWSDLException("The element is not declared in the XML schema"); - ex.addContextName("element: " + elementName); - throw ex; + throw new InvalidWSDLException("The element is not declared in the XML schema", part.getName()); } outputWrapperElement = schemaRegistry.getElement(elementName); if (outputWrapperElement == null) { Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/AmbiguousPropertyException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/AmbiguousPropertyException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/AmbiguousPropertyException.java (original) +++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/AmbiguousPropertyException.java Wed Dec 13 22:18:28 2006 @@ -34,11 +34,7 @@ super(message); } - public AmbiguousPropertyException(String message, Throwable cause) { - super(message, cause); - } - - public AmbiguousPropertyException(Throwable cause) { - super(cause); + public AmbiguousPropertyException(String message, String identifier) { + super(message, identifier); } } Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java (original) +++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java Wed Dec 13 22:18:28 2006 @@ -26,18 +26,8 @@ * @version $Rev$ $Date$ */ public class ProviderException extends TuscanyException { - public ProviderException() { - } - public ProviderException(String message) { - super(message); - } - - public ProviderException(String message, Throwable cause) { - super(message, cause); - } - - public ProviderException(Throwable cause) { - super(cause); + public ProviderException(String message, String identifier) { + super(message, identifier); } } Modified: incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/EntityManagerProcessor.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/EntityManagerProcessor.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/EntityManagerProcessor.java (original) +++ incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/EntityManagerProcessor.java Wed Dec 13 22:18:28 2006 @@ -53,14 +53,11 @@ return name; } - protected <T>JavaMappedProperty<T> createProperty(String name, - Class<T> javaType, - Member member) throws ProcessingException { + protected <T> JavaMappedProperty<T> createProperty(String name, + Class<T> javaType, + Member member) throws ProcessingException { if (!EntityManager.class.equals(javaType)) { - InvalidInjectionSite e = - new InvalidInjectionSite("Injection site must by of type " + EntityManager.class.getName()); - e.setIdentifier(name); - throw e; + throw new InvalidInjectionSite("Injection site must by of type " + EntityManager.class.getName(), name); } return super.createProperty(name, javaType, member); } Modified: incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/InvalidInjectionSite.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/InvalidInjectionSite.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/InvalidInjectionSite.java (original) +++ incubator/tuscany/java/sca/services/persistence/openjpa/src/main/java/org/apache/tuscany/service/openjpa/InvalidInjectionSite.java Wed Dec 13 22:18:28 2006 @@ -24,18 +24,12 @@ * @version $Rev$ $Date$ */ public class InvalidInjectionSite extends ProcessingException { - public InvalidInjectionSite() { - } public InvalidInjectionSite(String message) { super(message); } - public InvalidInjectionSite(String message, Throwable cause) { - super(message, cause); - } - - public InvalidInjectionSite(Throwable cause) { - super(cause); + public InvalidInjectionSite(String message, String identifier) { + super(message, identifier); } } Modified: incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/JDBCStore.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/JDBCStore.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/JDBCStore.java (original) +++ incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/JDBCStore.java Wed Dec 13 22:18:28 2006 @@ -35,16 +35,13 @@ import org.apache.tuscany.spi.annotation.Autowire; import org.apache.tuscany.spi.component.SCAObject; import org.apache.tuscany.spi.services.store.RecoveryListener; - -import org.apache.tuscany.api.annotation.Monitor; import org.apache.tuscany.spi.services.store.Store; - import org.apache.tuscany.spi.services.store.StoreMonitor; - import org.apache.tuscany.spi.services.store.StoreReadException; - import org.apache.tuscany.spi.services.store.StoreWriteException; +import org.apache.tuscany.api.annotation.Monitor; + /** * A store implementation that uses a relational database to persist records transactionally. * @@ -61,7 +58,7 @@ private long defaultExpirationOffset = 600000; // 10 minutes //private - public JDBCStore(@Resource(mappedName = "StoreDS") DataSource dataSource, + public JDBCStore(@Resource(mappedName = "StoreDS")DataSource dataSource, @Autowire Converter converter, @Monitor StoreMonitor monitor) { this.dataSource = dataSource; @@ -71,6 +68,7 @@ /** * Returns the maximum default expiration offset for records in the store + * * @return the maximum default expiration offset for records in the store */ @Property @@ -115,9 +113,7 @@ public void insertRecord(SCAObject owner, String id, Object object, long expiration) throws StoreWriteException { if (!(object instanceof Serializable)) { - StoreWriteException e = new StoreWriteException("Type must implement serializable"); - e.setIdentifier(object.getClass().getName()); - throw e; + throw new NonSerializableTypeException("Type must implement serializable", owner.getCanonicalName(), id); } Serializable serializable = (Serializable) object; String canonicalName = owner.getCanonicalName(); @@ -151,10 +147,10 @@ } catch (SQLException e2) { monitor.error(e2); } - throw new StoreWriteException(e); + throw new StoreWriteException(owner.getCanonicalName(), id, e); } } catch (SQLException e) { - throw new StoreWriteException(e); + throw new StoreWriteException(owner.getCanonicalName(), id, e); } finally { close(insertStmt); close(updateStmt); @@ -164,9 +160,7 @@ public void updateRecord(SCAObject owner, String id, Object object, long expiration) throws StoreWriteException { if (!(object instanceof Serializable)) { - StoreWriteException e = new StoreWriteException("Type must implement serializable"); - e.setIdentifier(object.getClass().getName()); - throw e; + throw new NonSerializableTypeException("Type must implement serializable", owner.getCanonicalName(), id); } Serializable serializable = (Serializable) object; String canonicalName = owner.getCanonicalName(); @@ -190,10 +184,10 @@ } catch (SQLException e2) { monitor.error(e2); } - throw new StoreWriteException(e); + throw new StoreWriteException(owner.getCanonicalName(), id, e); } } catch (SQLException e) { - throw new StoreWriteException(e); + throw new StoreWriteException(owner.getCanonicalName(), id, e); } finally { close(insertStmt); close(updateStmt); @@ -217,7 +211,7 @@ } catch (SQLException e2) { monitor.error(e2); } - throw new StoreReadException(e); + throw new StoreReadException(owner.getName(), id, e); } finally { close(conn); } @@ -239,7 +233,7 @@ } catch (SQLException e2) { monitor.error(e2); } - throw new StoreWriteException(e); + throw new StoreWriteException(owner.getCanonicalName(), id, e); } finally { close(conn); } Added: incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/NonSerializableTypeException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/NonSerializableTypeException.java?view=auto&rev=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/NonSerializableTypeException.java (added) +++ incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/NonSerializableTypeException.java Wed Dec 13 22:18:28 2006 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.service.persistence.store.jdbc; + +import org.apache.tuscany.spi.services.store.StoreWriteException; + +/** + * @version $Rev$ $Date$ + */ +public class NonSerializableTypeException extends StoreWriteException { + + public NonSerializableTypeException(String message, String owner, String identifier) { + super(message, owner, identifier); + } +} Propchange: incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/NonSerializableTypeException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/tuscany/java/sca/services/persistence/store.jdbc/src/main/java/org/apache/tuscany/service/persistence/store/jdbc/NonSerializableTypeException.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Modified: incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalIinitializationException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalIinitializationException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalIinitializationException.java (original) +++ incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalIinitializationException.java Wed Dec 13 22:18:28 2006 @@ -26,16 +26,6 @@ * @version $Rev$ $Date$ */ public class JournalIinitializationException extends TuscanyException { - public JournalIinitializationException() { - } - - public JournalIinitializationException(String message) { - super(message); - } - - public JournalIinitializationException(String message, Throwable cause) { - super(message, cause); - } public JournalIinitializationException(Throwable cause) { super(cause); Modified: incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalShutdownException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalShutdownException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalShutdownException.java (original) +++ incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalShutdownException.java Wed Dec 13 22:18:28 2006 @@ -27,17 +27,6 @@ */ public class JournalShutdownException extends TuscanyException { - public JournalShutdownException() { - } - - public JournalShutdownException(String message) { - super(message); - } - - public JournalShutdownException(String message, Throwable cause) { - super(message, cause); - } - public JournalShutdownException(Throwable cause) { super(cause); } Modified: incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStore.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStore.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStore.java (original) +++ incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStore.java Wed Dec 13 22:18:28 2006 @@ -59,11 +59,11 @@ /** * A journal-based store service that uses HOWL for reliable persistence and recovery of object instances. Insert, * update, and delete operations, as well as object instances, are written to a binary log. Delete operations are - * written as a single header block as defined by [EMAIL PROTECTED] SerializationHelper#serializeHeader(short, int, String, String, - * long)}. Insert and update operations are written using multiple blocks consisting of at least one header and 1..n + * written as a single header block as defined by [EMAIL PROTECTED] SerializationHelper#serializeHeader(short,int,String,String, + *long)}. Insert and update operations are written using multiple blocks consisting of at least one header and 1..n * additional blocks containing the object byte array. If the byte array size is greater than the log block size (the * HOWL default is 4K), it must be partitioned into smaller units using [EMAIL PROTECTED] SerializationHelper#partition(byte[], - * int)} and written across multiple blocks. The header contains the number of ensuing blocks a record occupies. Since + *int)} and written across multiple blocks. The header contains the number of ensuing blocks a record occupies. Since * block writes to the log may be interleaved, blocks for a given record may not be consecutive. In order to identify * the record a block belongs to, the first byte array of written data for the block contains the serialized owner id * and UUID associated with the record. @@ -144,6 +144,7 @@ /** * Returns the maximum default expiration offset for records in the store + * * @return the maximum default expiration offset for records in the store */ @Property @@ -429,9 +430,8 @@ private void write(SCAObject owner, String id, Object object, long expiration, short operation) throws StoreWriteException { if (!(object instanceof Serializable)) { - StoreWriteException e = new StoreWriteException("Type must implement serializable"); - e.setIdentifier(object.getClass().getName()); - throw e; + String name = object.getClass().getName(); + throw new StoreWriteException("Type must implement serializable", name, id); } Serializable serializable = (Serializable) object; String canonicalName = owner.getCanonicalName(); Modified: incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStorePropertyException.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStorePropertyException.java?view=diff&rev=486986&r1=486985&r2=486986 ============================================================================== --- incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStorePropertyException.java (original) +++ incubator/tuscany/java/sca/services/persistence/store.journal/src/main/java/org/apache/tuscany/persistence/store/journal/JournalStorePropertyException.java Wed Dec 13 22:18:28 2006 @@ -27,17 +27,6 @@ */ public class JournalStorePropertyException extends TuscanyException { - public JournalStorePropertyException() { - } - - public JournalStorePropertyException(String message) { - super(message); - } - - public JournalStorePropertyException(String message, Throwable cause) { - super(message, cause); - } - public JournalStorePropertyException(Throwable cause) { super(cause); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
