use of org.apache.catalina.tribes.transport.RxTaskPool in project tomcat by apache.
the class BioReceiver method start.
@Override
public void start() throws IOException {
super.start();
try {
setPool(new RxTaskPool(getMaxThreads(), getMinThreads(), this));
} catch (Exception x) {
log.fatal(sm.getString("bioReceiver.threadpool.fail"), x);
if (x instanceof IOException)
throw (IOException) x;
else
throw new IOException(x.getMessage());
}
try {
getBind();
bind();
String channelName = "";
if (getChannel().getName() != null)
channelName = "[" + getChannel().getName() + "]";
Thread t = new Thread(this, "BioReceiver" + channelName);
t.setDaemon(true);
t.start();
} catch (Exception x) {
log.fatal(sm.getString("bioReceiver.start.fail"), x);
if (x instanceof IOException)
throw (IOException) x;
else
throw new IOException(x.getMessage());
}
}
use of org.apache.catalina.tribes.transport.RxTaskPool in project tomcat by apache.
the class NioReceiver method start.
/**
* Start cluster receiver.
*
* @throws IOException If the receiver fails to start
*
* @see org.apache.catalina.tribes.ChannelReceiver#start()
*/
@Override
public void start() throws IOException {
super.start();
try {
setPool(new RxTaskPool(getMaxThreads(), getMinThreads(), this));
} catch (Exception x) {
log.fatal(sm.getString("nioReceiver.threadpool.fail"), x);
if (x instanceof IOException)
throw (IOException) x;
else
throw new IOException(x.getMessage());
}
try {
getBind();
bind();
String channelName = "";
if (getChannel().getName() != null)
channelName = "[" + getChannel().getName() + "]";
Thread t = new Thread(this, "NioReceiver" + channelName);
t.setDaemon(true);
t.start();
} catch (Exception x) {
log.fatal(sm.getString("nioReceiver.start.fail"), x);
if (x instanceof IOException)
throw (IOException) x;
else
throw new IOException(x.getMessage());
}
}
Aggregations