Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project

This commit is contained in:
Greg Wilkins 2012-01-19 12:40:07 +11:00
commit 7cd887d48b
11 changed files with 114 additions and 71 deletions

View File

@ -163,6 +163,10 @@
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -233,6 +237,11 @@
<artifactId>mail</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jaspic_1.0_spec</artifactId>

View File

@ -147,6 +147,10 @@
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -217,6 +221,11 @@
<artifactId>mail</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jaspic_1.0_spec</artifactId>

View File

@ -96,6 +96,10 @@
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -113,5 +117,10 @@
<artifactId>mail</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -12,6 +12,7 @@
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit</jetty-orbit-url>
<assembly-directory>target/distribution</assembly-directory>
<eclipse-ecj-version>3.6</eclipse-ecj-version>
<orbit-javax-activation-version>${javax-activation-version}.0.v201005080500</orbit-javax-activation-version>
<orbit-javax-annotation-version>1.0.0.v20100513-0750</orbit-javax-annotation-version>
<orbit-javax-el-version>2.1.0.v201004190952</orbit-javax-el-version>
<orbit-javax-mail-glassfish-version>${javax-mail-version}.v201005082020</orbit-javax-mail-glassfish-version>
@ -68,6 +69,7 @@
<mkdir dir="${orbit-cache}" />
<get dest="${orbit-cache}" verbose="true" skipexisting="true">
<url url="${jetty-orbit-url}/javax.servlet_${orbit-javax-servlet-version}.jar" />
<url url="${jetty-orbit-url}/javax.activation_${orbit-javax-activation-version}.jar" />
<url url="${jetty-orbit-url}/javax.annotation_${orbit-javax-annotation-version}.jar" />
<url url="${jetty-orbit-url}/javax.mail.glassfish_${orbit-javax-mail-glassfish-version}.jar" />
<url url="${jetty-orbit-url}/javax.el_${orbit-javax-el-version}.jar" />

View File

@ -640,7 +640,6 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
catch (IOException e)
{
LOG.warn(e.toString());
LOG.debug(e);
try{close();}
catch(IOException e2){LOG.ignore(e2);}
}

View File

@ -42,7 +42,7 @@ import org.eclipse.jetty.util.thread.Timeout.Task;
*/
public class SslConnection extends AbstractConnection implements AsyncConnection
{
static final Logger LOG=Log.getLogger("org.eclipse.jetty.io.nio.ssl");
private final Logger _logger = Log.getLogger("org.eclipse.jetty.io.nio.ssl");
private static final NIOBuffer __ZERO_BUFFER=new IndirectNIOBuffer(0);
@ -195,7 +195,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
progress=true;
}
LOG.debug("{} handle {} progress={}", _session, this, progress);
_logger.debug("{} handle {} progress={}", _session, this, progress);
}
}
finally
@ -211,9 +211,10 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
catch(Throwable x)
{
LOG.warn("onInputShutdown failed", x);
_logger.warn("onInputShutdown failed", x);
try{_sslEndPoint.close();}
catch(IOException e2){LOG.ignore(e2);}
catch(IOException e2){
_logger.ignore(e2);}
}
}
}
@ -244,7 +245,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
{
try
{
LOG.debug("onIdleExpired {}ms on {}",idleForMs,this);
_logger.debug("onIdleExpired {}ms on {}",idleForMs,this);
if (_endp.isOutputShutdown())
_sslEndPoint.close();
else
@ -252,7 +253,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
catch (IOException e)
{
LOG.warn(e);
_logger.warn(e);
super.onIdleExpired(idleForMs);
}
}
@ -335,7 +336,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
finally
{
LOG.debug("{} {} {} filled={}/{} flushed={}/{}",_session,this,_engine.getHandshakeStatus(),filled,_inbound.length(),flushed,_outbound.length());
_logger.debug("{} {} {} filled={}/{} flushed={}/{}",_session,this,_engine.getHandshakeStatus(),filled,_inbound.length(),flushed,_outbound.length());
}
// handle the current hand share status
@ -437,8 +438,8 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
out_buffer.position(_outbound.putIndex());
out_buffer.limit(out_buffer.capacity());
result=_engine.wrap(bbuf,out_buffer);
if (LOG.isDebugEnabled())
LOG.debug("{} wrap {} {} consumed={} produced={}",
if (_logger.isDebugEnabled())
_logger.debug("{} wrap {} {} consumed={} produced={}",
_session,
result.getStatus(),
result.getHandshakeStatus(),
@ -451,7 +452,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
catch(SSLException e)
{
LOG.warn(String.valueOf(_endp), e);
_logger.debug(String.valueOf(_endp), e);
_endp.close();
throw e;
}
@ -479,13 +480,13 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
break;
case CLOSED:
LOG.debug("wrap CLOSE {} {}",this,result);
_logger.debug("wrap CLOSE {} {}",this,result);
if (result.getHandshakeStatus()==HandshakeStatus.FINISHED)
_endp.close();
break;
default:
LOG.warn("{} wrap default {}",_session,result);
_logger.debug("{} wrap default {}",_session,result);
throw new IOException(result.toString());
}
@ -513,8 +514,8 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
in_buffer.limit(_inbound.putIndex());
result=_engine.unwrap(in_buffer,bbuf);
if (LOG.isDebugEnabled())
LOG.debug("{} unwrap {} {} consumed={} produced={}",
if (_logger.isDebugEnabled())
_logger.debug("{} unwrap {} {} consumed={} produced={}",
_session,
result.getStatus(),
result.getHandshakeStatus(),
@ -527,7 +528,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
catch(SSLException e)
{
LOG.warn(String.valueOf(_endp), e);
_logger.debug(String.valueOf(_endp), e);
_endp.close();
throw e;
}
@ -549,7 +550,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
break;
case BUFFER_OVERFLOW:
LOG.debug("{} unwrap {} {}->{}",_session,result.getStatus(),_inbound.toDetailString(),buffer.toDetailString());
_logger.debug("{} unwrap {} {}->{}",_session,result.getStatus(),_inbound.toDetailString(),buffer.toDetailString());
break;
case OK:
@ -558,13 +559,13 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
break;
case CLOSED:
LOG.debug("unwrap CLOSE {} {}",this,result);
_logger.debug("unwrap CLOSE {} {}",this,result);
if (result.getHandshakeStatus()==HandshakeStatus.FINISHED)
_endp.close();
break;
default:
LOG.warn("{} wrap default {}",_session,result);
_logger.debug("{} wrap default {}",_session,result);
throw new IOException(result.toString());
}
@ -613,7 +614,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
{
synchronized (SslConnection.this)
{
LOG.debug("{} ssl endp.oshut {}",_session,this);
_logger.debug("{} ssl endp.oshut {}",_session,this);
_engine.closeOutbound();
_oshut=true;
}
@ -630,7 +631,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
public void shutdownInput() throws IOException
{
LOG.debug("{} ssl endp.ishut!",_session);
_logger.debug("{} ssl endp.ishut!",_session);
// We do not do a closeInput here, as SSL does not support half close.
// isInputShutdown works it out itself from buffer state and underlying endpoint state.
}
@ -647,7 +648,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
public void close() throws IOException
{
LOG.debug("{} ssl endp.close",_session);
_logger.debug("{} ssl endp.close",_session);
_endp.close();
}

View File

@ -5,7 +5,6 @@ import java.io.IOException;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
@ -91,7 +90,7 @@ public class SelectChannelEndPointSslTest extends SelectChannelEndPointTest
ByteBuffer appIn = ByteBuffer.allocate(engine.getSession().getApplicationBufferSize());
ByteBuffer sslIn = ByteBuffer.allocate(engine.getSession().getPacketBufferSize()*2);
boolean debug=SslConnection.LOG.isDebugEnabled();
boolean debug=false;
if (debug) System.err.println(engine.getHandshakeStatus());
int loop=20;

View File

@ -78,13 +78,13 @@
<profile>
<id>below-jdk1.6</id>
<activation>
<jdk>!1.6</jdk>
<jdk>(,1.6)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax-activation-version}</version>
<version>1.1</version>
</dependency>
</dependencies>
</profile>

View File

@ -14,6 +14,7 @@
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
<assembly-directory>target/distribution</assembly-directory>
<eclipse-ecj-version>3.6</eclipse-ecj-version>
<orbit-javax-activation-version>${javax-activation-version}.0.v201005080500</orbit-javax-activation-version>
<orbit-javax-annotation-version>1.0.0.v20100513-0750</orbit-javax-annotation-version>
<orbit-javax-el-version>2.1.0.v201004190952</orbit-javax-el-version>
<orbit-javax-mail-glassfish-version>${javax-mail-version}.v201005082020</orbit-javax-mail-glassfish-version>
@ -197,6 +198,7 @@
<mkdir dir="${orbit-cache}" />
<get dest="${orbit-cache}" verbose="true" skipexisting="true">
<url url="${jetty-orbit-url}/javax.servlet_${orbit-javax-servlet-version}.jar" />
<url url="${jetty-orbit-url}/javax.activation_${orbit-javax-activation-version}.jar" />
<url url="${jetty-orbit-url}/javax.mail.glassfish_${orbit-javax-mail-glassfish-version}.jar" />
<url url="${jetty-orbit-url}/javax.el_${orbit-javax-el-version}.jar" />
<url url="${jetty-orbit-url}/javax.servlet.jsp_${orbit-javax-servlet-jsp-version}.jar" />

View File

@ -601,6 +601,12 @@ class JettyAwareLogger implements org.slf4j.Logger
_logger.log(marker, FQCN, level, msg, null, t);
}
else
{
int loggerLevel = _logger.isTraceEnabled() ? TRACE :
_logger.isDebugEnabled() ? DEBUG :
_logger.isInfoEnabled() ? INFO :
_logger.isWarnEnabled() ? WARN : ERROR;
if (loggerLevel <= level)
{
// Don't assume downstream handles argArray properly.
// Do it the SLF4J way here to eliminate that as a bug.
@ -609,3 +615,4 @@ class JettyAwareLogger implements org.slf4j.Logger
}
}
}
}

View File

@ -11,6 +11,7 @@
<url>${jetty.url}</url>
<packaging>pom</packaging>
<properties>
<javax-activation-version>1.1</javax-activation-version>
<javax-mail-version>1.4.1</javax-mail-version>
<javax-servlet-jsp-version>2.1.v20100127</javax-servlet-jsp-version>
<javax-transaction-version>1.1.1</javax-transaction-version>
@ -401,6 +402,11 @@
<artifactId>mail</artifactId>
<version>${javax-mail-version}</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax-activation-version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>