[jboss-cvs] JBoss Messaging SVN: r5941 - in trunk: src/main/org/jboss/messaging/integration/transports/netty and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 26 12:10:04 EST 2009
Author: jmesnil
Date: 2009-02-26 12:10:04 -0500 (Thu, 26 Feb 2009)
New Revision: 5941
Modified:
trunk/.classpath
trunk/build-thirdparty.xml
trunk/messaging.ipr
trunk/src/main/org/jboss/messaging/integration/transports/netty/HttpAcceptorHandler.java
trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyConnector.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java
Log:
updated netty to 3.1.0.ALPHA4
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/.classpath 2009-02-26 17:10:04 UTC (rev 5941)
@@ -53,6 +53,7 @@
<classpathentry kind="lib" path="thirdparty/jboss/jboss-jaspi-api/lib/jboss-jaspi-api.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/common/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/jnpserver/lib/jnpserver.jar" sourcepath="thirdparty/jboss/jnpserver/lib/jnpserver-sources.jar"/>
+ <classpathentry kind="lib" path="thirdparty/netty/lib/netty-3.1.0.ALPHA4.jar" sourcepath="thirdparty/netty/lib/netty-3.1.0.ALPHA4-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="thirdparty/jboss/jbossts14/lib/jbossjta-integration.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/jboss-javaee/lib/jboss-javaee.jar"/>
@@ -62,7 +63,6 @@
<classpathentry kind="lib" path="thirdparty/easymock-classextension/lib/easymockclassextension.jar"/>
<classpathentry kind="lib" path="thirdparty/cglib/lib/cglib.jar"/>
<classpathentry kind="lib" path="tests/tmpfiles"/>
- <classpathentry kind="lib" path="thirdparty/netty/lib/netty-3.1.0.ALPHA2.jar" sourcepath="thirdparty/netty/lib/netty-3.1.0.ALPHA2-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/apache-mina/lib/mina-core-2.0.0-M4.jar"/>
<classpathentry kind="lib" path="thirdparty/slf4j/log4j/lib/slf4j-log4j12-1.5.2.jar"/>
<classpathentry kind="lib" path="thirdparty/slf4j/api/lib/slf4j-api-1.5.2.jar"/>
Modified: trunk/build-thirdparty.xml
===================================================================
--- trunk/build-thirdparty.xml 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/build-thirdparty.xml 2009-02-26 17:10:04 UTC (rev 5941)
@@ -85,7 +85,7 @@
Dependencies required to build the transport jar
-->
- <componentref name="netty" version="3.1.0.ALPHA2"/>
+ <componentref name="netty" version="3.1.0.ALPHA4"/>
<componentref name="apache-mina" version="2.0.0-M4"/>
<!--
Modified: trunk/messaging.ipr
===================================================================
--- trunk/messaging.ipr 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/messaging.ipr 2009-02-26 17:10:04 UTC (rev 5941)
@@ -477,7 +477,7 @@
<root url="jar://$ANT_HOME$/lib/ant.jar!/" />
<root url="jar://$PROJECT_DIR$/thirdparty/apache-mina/lib/mina-core-2.0.0-M4.jar!/" />
<root url="file:///home/andy/etc" />
- <root url="jar://$PROJECT_DIR$/thirdparty/netty/lib/netty-3.1.0.ALPHA2.jar!/" />
+ <root url="jar://$PROJECT_DIR$/thirdparty/netty/lib/netty-3.1.0.ALPHA4.jar!/" />
<root url="file://$PROJECT_DIR$/src/schemas" />
</CLASSES>
<JAVADOC />
Modified: trunk/src/main/org/jboss/messaging/integration/transports/netty/HttpAcceptorHandler.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/transports/netty/HttpAcceptorHandler.java 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/src/main/org/jboss/messaging/integration/transports/netty/HttpAcceptorHandler.java 2009-02-26 17:10:04 UTC (rev 5941)
@@ -35,9 +35,9 @@
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipelineCoverage;
import org.jboss.netty.channel.ChannelStateEvent;
-import org.jboss.netty.channel.DefaultMessageEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
+import org.jboss.netty.channel.UpstreamMessageEvent;
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpMethod;
@@ -94,8 +94,7 @@
// if we are a post then we send upstream, otherwise we are just being prompted for a response.
if (method.equals(HttpMethod.POST))
{
- MessageEvent event = new DefaultMessageEvent(e.getChannel(),
- e.getFuture(),
+ MessageEvent event = new UpstreamMessageEvent(e.getChannel(),
request.getContent(),
e.getRemoteAddress());
ctx.sendUpstream(event);
@@ -116,7 +115,7 @@
}
else
{
- write(ctx, e.getChannel(), e.getFuture(), e.getMessage(), e.getRemoteAddress());
+ write(ctx, e.getFuture(), e.getMessage(), e.getRemoteAddress());
}
}
@@ -182,7 +181,7 @@
piggyBackResponses();
}
responseHolder.response.setContent(buffer);
- responseHolder.response.addHeader(HttpHeaders.CONTENT_LENGTH, String.valueOf(buffer.writerIndex()));
+ responseHolder.response.addHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(buffer.writerIndex()));
channel.write(responseHolder.response);
}
Modified: trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-02-26 17:10:04 UTC (rev 5941)
@@ -55,9 +55,9 @@
import org.jboss.netty.channel.ChannelPipelineCoverage;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelStateEvent;
+import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory;
-import org.jboss.netty.group.DefaultChannelGroup;
import org.jboss.netty.handler.codec.http.HttpRequestDecoder;
import org.jboss.netty.handler.codec.http.HttpResponseEncoder;
import org.jboss.netty.handler.ssl.SslHandler;
Modified: trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyConnector.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyConnector.java 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyConnector.java 2009-02-26 17:10:04 UTC (rev 5941)
@@ -56,9 +56,9 @@
import org.jboss.netty.channel.ChannelPipelineCoverage;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelStateEvent;
-import org.jboss.netty.channel.DefaultMessageEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
+import org.jboss.netty.channel.UpstreamMessageEvent;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory;
import org.jboss.netty.handler.codec.http.DefaultHttpRequest;
@@ -371,6 +371,7 @@
}
else
{
+ future.getCause().printStackTrace();
return null;
}
}
@@ -435,8 +436,7 @@
public void messageReceived(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception
{
HttpResponse response = (HttpResponse)e.getMessage();
- MessageEvent event = new DefaultMessageEvent(e.getChannel(),
- e.getFuture(),
+ MessageEvent event = new UpstreamMessageEvent(e.getChannel(),
response.getContent(),
e.getRemoteAddress());
waitingGet = false;
@@ -451,13 +451,13 @@
HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/jbm/");
ChannelBuffer buf = (ChannelBuffer)e.getMessage();
httpRequest.setContent(buf);
- httpRequest.addHeader(HttpHeaders.CONTENT_LENGTH, String.valueOf(buf.writerIndex()));
- write(ctx, e.getChannel(), e.getFuture(), httpRequest, e.getRemoteAddress());
+ httpRequest.addHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(buf.writerIndex()));
+ write(ctx, e.getFuture(), httpRequest, e.getRemoteAddress());
lastSendTime = System.currentTimeMillis();
}
else
{
- write(ctx, e.getChannel(), e.getFuture(), e.getMessage(), e.getRemoteAddress());
+ write(ctx, e.getFuture(), e.getMessage(), e.getRemoteAddress());
lastSendTime = System.currentTimeMillis();
}
}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java 2009-02-26 16:15:17 UTC (rev 5940)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java 2009-02-26 17:10:04 UTC (rev 5941)
@@ -21,7 +21,7 @@
*/
package org.jboss.messaging.tests.unit.core.remoting.impl.netty;
-import java.util.UUID;
+import static org.jboss.messaging.tests.util.RandomUtil.randomInt;
import org.easymock.EasyMock;
import org.jboss.messaging.core.exception.MessagingException;
@@ -68,8 +68,8 @@
{
Channel channel = EasyMock.createStrictMock(Channel.class);
- final UUID id = UUID.randomUUID();
-
+ final int id = randomInt();
+
EasyMock.expect(channel.getId()).andReturn(id);
NettyConnection conn = new NettyConnection(channel, new MyListener());
More information about the jboss-cvs-commits
mailing list