Fixed code to not use @deprecated methods from 3rd party JARs

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1386592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Claus Ibsen 2012-09-17 12:59:56 +00:00
parent b358c05696
commit 2d88395073
3 changed files with 10 additions and 8 deletions

View File

@ -234,9 +234,9 @@
</Export-Package>
<Import-Package>
org.eclipse.jetty*;version="[7.5,8.0)";resolution:=optional,
!org.apache.activemq.transport.ws*;version=${project.version};,
!org.apache.activemq.transport.xstream;version=${project.version};,
!org.apache.activemq.transport.util;version=${project.version};,
!org.apache.activemq.transport.ws*;version=${project.version},
!org.apache.activemq.transport.xstream;version=${project.version},
!org.apache.activemq.transport.util;version=${project.version},
org.apache.activemq*;version=${project.version};resolution:=optional
</Import-Package>
</instructions>

View File

@ -49,7 +49,7 @@ import org.apache.http.conn.params.ConnRoutePNames;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.apache.http.message.AbstractHttpMessage;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
@ -59,8 +59,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* A HTTP {@link org.apache.activemq.transport.TransportChannel} which uses the
* <a href="http://jakarta.apache.org/commons/httpclient/">commons-httpclient</a>
* A HTTP {@link org.apache.activemq.transport.Transport} which uses the
* <a href="http://hc.apache.org/index.html">Apache HTTP Client</a>
* library
*/
public class HttpClientTransport extends HttpTransportSupport {
@ -285,7 +285,7 @@ public class HttpClientTransport extends HttpTransportSupport {
}
protected HttpClient createHttpClient() {
DefaultHttpClient client = new DefaultHttpClient(new ThreadSafeClientConnManager());
DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
if (useCompression) {
client.addRequestInterceptor( new HttpRequestInterceptor() {
@Override

View File

@ -32,6 +32,8 @@ import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XppReader;
import org.xmlpull.mxp1.MXParser;
/**
* Transforms object messages to text messages and vice versa using
* {@link XStream}
@ -99,7 +101,7 @@ public class XStreamMessageTransformer extends AbstractXMLMessageTransformer {
if (streamDriver != null) {
in = streamDriver.createReader(new StringReader(textMessage.getText()));
} else {
in = new XppReader(new StringReader(textMessage.getText()));
in = new XppReader(new StringReader(textMessage.getText()), new MXParser());
}
return getXStream().unmarshal(in);
}