Methods Summary |
---|
public com.sun.enterprise.jbi.serviceengine.comm.MessageAcceptor | getMessageAcceptor()Retrieves the MessageAcceptor of the work manager.
return this.acceptor;
|
public java.lang.String | getPoolName()Retrieves the name of the thread pool used by this
work manager.
return this.threadPoolName;
|
public void | run()
try {
startAcceptor();
} catch(ServiceEngineException se) {
se.printStackTrace();
} finally {
stop();
}
|
public void | setPoolName(java.lang.String poolName)Set the name of thread pool.
this.threadPoolName = poolName;
|
public void | startAcceptor()Start the message acceptor thread.
tpm = S1ASThreadPoolManager.getThreadPoolManager();
if (getPoolName() == null) {
// This will be default orb thread pool
tp = tpm.getDefaultThreadPool();
} else {
try {
tp = tpm.getThreadPool(getPoolName());
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE,
"Got the thread pool for :" + getPoolName());
}
} catch (NoSuchThreadPoolException e) {
logger.log(Level.SEVERE,
"workmanager.threadpool_not_found", getPoolName());
throw new ServiceEngineException(e.getMessage());
}
}
this.acceptor = new MessageAcceptor();
this.acceptor.startAccepting();
|
public void | stop()Convenience method to release acceptor thread.
this.acceptor.release();
|
public void | submitWork(OneWork work)Submit a work to the queue of the thread pool.
We just submit to a random queue of the thread pool.
tp.getAnyWorkQueue().addWork(work);
|