Minor changes, due to code review by Juergen.

This commit is contained in:
Arjen Poutsma
2006-11-13 20:31:35 +00:00
parent dbd91287e6
commit ce6f562937
6 changed files with 20 additions and 23 deletions

View File

@@ -29,7 +29,7 @@ import java.io.InputStream;
public interface WebServiceMessageFactory {
/**
* Creates a new, empty {@link WebServiceMessage}.
* Creates a new, empty <code>WebServiceMessage</code>.
*
* @return the empty message
*/
@@ -38,8 +38,8 @@ public interface WebServiceMessageFactory {
/**
* Reads {@link WebServiceMessage} from the given input stream.
* <p/>
* If the given stream is an instance of {@link org.springframework.ws.transport.TransportOutputStream
* TransportOutputStream}, the headers will be read from the request.
* If the given stream is an instance of {@link org.springframework.ws.transport.TransportInputStream
* TransportInputStream}, the headers will be read from the request.
*
* @param inputStream the inputstream to read the message from
* @return the created message

View File

@@ -42,6 +42,10 @@ public abstract class TransformerObjectSupport {
private static TransformerFactory transformerFactory;
static {
transformerFactory = TransformerFactory.newInstance();
}
/**
* Creates a new <code>Transformer</code>. Must be called per request, as transformer is not thread-safe.
*
@@ -50,23 +54,7 @@ public abstract class TransformerObjectSupport {
* if thrown by JAXP methods
*/
protected final Transformer createTransformer() throws TransformerConfigurationException {
if (transformerFactory == null) {
transformerFactory = createTransformerFactory();
}
return transformerFactory.newTransformer();
}
/**
* Create a <code>TransformerFactory</code> that this endpoint will use to create <code>Transformer</code>s. Can be
* overridden in subclasses, adding further initialization of the factory. The resulting
* <code>TransformerFactory</code> is cached, so this method will only be called once.
*
* @return the created <code>TransformerFactory</code>
* @throws TransformerFactoryConfigurationError
* if thrown by JAXP methods
*/
protected TransformerFactory createTransformerFactory() throws TransformerFactoryConfigurationError {
return TransformerFactory.newInstance();
}
}

View File

@@ -24,7 +24,7 @@ package org.springframework.ws.transport;
*/
public abstract class TransportContextHolder {
private static final ThreadLocal transportContextHolder = new InheritableThreadLocal();
private static final ThreadLocal transportContextHolder = new ThreadLocal();
/**
* Associate the given <code>TransportContext</code> with the current thread.