JBoss Remoting 2.2.2??????Bug
???????????? ???????[ 2014/12/17 15:09:47 ] ??????????????? ??????
??????δ???????????????????????У?????????????????usedPooled++????????
??????????JBoss Remoting????????createClientSocket???д??????jboss remoting??????д???????????????????????????????????п???????????????????£???????д?????????????????????????????????????????????е??????????????????????л????????
?????????????????????pooled=createClientSocket(socket?? address.timeout?? metadata);???д???????????try...catch???????????????????usedPooled--??????createSocket???????????
??????JBoss Remoting 2.4?У?jboss???????usedPooled???long?????usedPoolLock????????????????????????????????????????????Semphore????????????EDG???????????java 5?????????jboss remoting 2.4?е???δ????????????
boolean timedout = !semaphore.attempt(timeToWait);
if (trace) log.trace(this + " obtained semaphore: " + semaphore.permits());
if (timedout)
{
throw new IllegalStateException("Timeout waiting for a free socket");
}
SocketWrapper pooled = null;
if (tryPool)
{
synchronized (pool)
{
// if connection within pool?? use it
if (pool.size() > 0)
{
pooled = getPooledConnection();
if (trace) log.trace(this + " reusing pooled connection: " + pooled);
}
}
}
else
{
if (trace) log.trace(this + " avoiding connection pool?? creating new socket");
}
if (pooled == null)
{
//Need to create a new one
Socket socket = null;
if (trace) { log.trace(this + " creating socket "); }
// timeAllowed < 0 indicates no per invocation timeout has been set.
int timeRemaining = -1;
if (0 <= timeAllowed)
{
timeRemaining = (int) (timeAllowed - (System.currentTimeMillis() - start));
}
socket = createSocket(address.address?? address.port?? timeRemaining);
if (trace) log.trace(this + " created socket: " + socket);
socket.setTcpNoDelay(address.enableTcpNoDelay);
Map metadata = getLocator().getParameters();
if (metadata == null)
{
metadata = new HashMap(2);
}
else
{
metadata = new HashMap(metadata);
}
metadata.put(SocketWrapper.MARSHALLER?? marshaller);
metadata.put(SocketWrapper.UNMARSHALLER?? unmarshaller);
if (timeAllowed > 0)
{
timeRemaining = (int) (timeAllowed - (System.currentTimeMillis() - start));
if (timeRemaining <= 0)
throw new IllegalStateException("Timeout creating a new socket");
metadata.put(SocketWrapper.TEMP_TIMEOUT?? new Integer(timeRemaining));
}
pooled = createClientSocket(socket?? address.timeout?? metadata);
}
return pooled;
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11