posted 15 years ago
actually the 1st session bean will create a asynch bean, not sure whether it's a session bean.
here is the code:
private void startWork(final RecordInfo recordInfo)
throws
CreateException,
WorkException,
IllegalArgumentException,
CCMSPublisherException
{
final PublisherWorkerLocal threadRemote = pWorkerThreadHome.create();
Work w = new Work()
{
public void run()
{
try
{
threadRemote.publishMessage(recordInfo);
}
catch (Throwable t)
{
t.printStackTrace();
logMesg = null;
logMesg =
new LogMessage(
MessageUtil.getMessage("311", t.toString()),
CCMSLogConstants.PUBSUB,
CCMSLogConstants.MESSAGE_SEVERITY_FATAL_ERROR,
CCMSLogConstants.PRIORITY_ONE,
"PublisherMessageBean");
logMesg.setTrace(true);
CCMSLog.log(logMesg);
return;
}
}
public void release()
{
}
};
WorkItem witm = wm.startWork(w);
} // end InvokeThread()