SWS-289
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.ws.transport.context;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.ws.transport.WebServiceConnection;
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,7 @@ public class DefaultTransportContext implements TransportContext {
|
||||
|
||||
/** Creates a new <code>DefaultTransportContext</code> that exposes the given connection. */
|
||||
public DefaultTransportContext(WebServiceConnection connection) {
|
||||
Assert.notNull(connection, "'connection' must not be null");
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
@@ -37,4 +39,7 @@ public class DefaultTransportContext implements TransportContext {
|
||||
return connection;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return connection.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ package org.springframework.ws.transport.context;
|
||||
*/
|
||||
public abstract class TransportContextHolder {
|
||||
|
||||
private static final ThreadLocal transportContextHolder = new ThreadLocal();
|
||||
private static final ThreadLocal transportContextHolder = new TransportThreadLocal();
|
||||
|
||||
/**
|
||||
* Associate the given <code>TransportContext</code> with the current thread.
|
||||
@@ -44,4 +44,11 @@ public abstract class TransportContextHolder {
|
||||
public static TransportContext getTransportContext() {
|
||||
return (TransportContext) transportContextHolder.get();
|
||||
}
|
||||
|
||||
private static class TransportThreadLocal extends ThreadLocal {
|
||||
|
||||
public String toString() {
|
||||
return "Transport State";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user