mirror of https://github.com/apache/activemq.git
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:
parent
b358c05696
commit
2d88395073
|
@ -234,9 +234,9 @@
|
||||||
</Export-Package>
|
</Export-Package>
|
||||||
<Import-Package>
|
<Import-Package>
|
||||||
org.eclipse.jetty*;version="[7.5,8.0)";resolution:=optional,
|
org.eclipse.jetty*;version="[7.5,8.0)";resolution:=optional,
|
||||||
!org.apache.activemq.transport.ws*;version=${project.version};,
|
!org.apache.activemq.transport.ws*;version=${project.version},
|
||||||
!org.apache.activemq.transport.xstream;version=${project.version};,
|
!org.apache.activemq.transport.xstream;version=${project.version},
|
||||||
!org.apache.activemq.transport.util;version=${project.version};,
|
!org.apache.activemq.transport.util;version=${project.version},
|
||||||
org.apache.activemq*;version=${project.version};resolution:=optional
|
org.apache.activemq*;version=${project.version};resolution:=optional
|
||||||
</Import-Package>
|
</Import-Package>
|
||||||
</instructions>
|
</instructions>
|
||||||
|
|
|
@ -49,7 +49,7 @@ import org.apache.http.conn.params.ConnRoutePNames;
|
||||||
import org.apache.http.entity.ByteArrayEntity;
|
import org.apache.http.entity.ByteArrayEntity;
|
||||||
import org.apache.http.impl.client.BasicResponseHandler;
|
import org.apache.http.impl.client.BasicResponseHandler;
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
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.message.AbstractHttpMessage;
|
||||||
import org.apache.http.params.HttpConnectionParams;
|
import org.apache.http.params.HttpConnectionParams;
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
@ -59,8 +59,8 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HTTP {@link org.apache.activemq.transport.TransportChannel} which uses the
|
* A HTTP {@link org.apache.activemq.transport.Transport} which uses the
|
||||||
* <a href="http://jakarta.apache.org/commons/httpclient/">commons-httpclient</a>
|
* <a href="http://hc.apache.org/index.html">Apache HTTP Client</a>
|
||||||
* library
|
* library
|
||||||
*/
|
*/
|
||||||
public class HttpClientTransport extends HttpTransportSupport {
|
public class HttpClientTransport extends HttpTransportSupport {
|
||||||
|
@ -285,7 +285,7 @@ public class HttpClientTransport extends HttpTransportSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected HttpClient createHttpClient() {
|
protected HttpClient createHttpClient() {
|
||||||
DefaultHttpClient client = new DefaultHttpClient(new ThreadSafeClientConnManager());
|
DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
|
||||||
if (useCompression) {
|
if (useCompression) {
|
||||||
client.addRequestInterceptor( new HttpRequestInterceptor() {
|
client.addRequestInterceptor( new HttpRequestInterceptor() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -32,6 +32,8 @@ import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
|
||||||
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
|
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
|
||||||
import com.thoughtworks.xstream.io.xml.XppReader;
|
import com.thoughtworks.xstream.io.xml.XppReader;
|
||||||
|
|
||||||
|
import org.xmlpull.mxp1.MXParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transforms object messages to text messages and vice versa using
|
* Transforms object messages to text messages and vice versa using
|
||||||
* {@link XStream}
|
* {@link XStream}
|
||||||
|
@ -99,7 +101,7 @@ public class XStreamMessageTransformer extends AbstractXMLMessageTransformer {
|
||||||
if (streamDriver != null) {
|
if (streamDriver != null) {
|
||||||
in = streamDriver.createReader(new StringReader(textMessage.getText()));
|
in = streamDriver.createReader(new StringReader(textMessage.getText()));
|
||||||
} else {
|
} else {
|
||||||
in = new XppReader(new StringReader(textMessage.getText()));
|
in = new XppReader(new StringReader(textMessage.getText()), new MXParser());
|
||||||
}
|
}
|
||||||
return getXStream().unmarshal(in);
|
return getXStream().unmarshal(in);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue