Information Technology Reference
In-Depth Information
public String newOrder (String p0, String p1, Set p2)
throws RemoteException, PlaceOrderException
{
PVCSSBContext context = null;
final DiscoMethodToken token =
discoPreInvoke (TransactionAttribute.REQUIRED);
String retVal = null;
try {
context = getHome().getPooledSessionContext();
retVal = getBean(context).newOrder(p0, p1, p2);
if (token.shouldLog()) {
final Class[] formalParameterTypes = new Class [3];
formalParameterTypes[0] = String.class;
formalParameterTypes[1] = String.class;
formalParameterTypes[2] = Set.class;
final Object[]
args = new Object[3];
args[0] = p0;
args[1] = p1;
args[2] = p2;
discoLogMethod("newOrder", retVal, formalParameterTypes, args);
}
}
catch (PlaceOrderException e) {
discoPostInvoke(TransactionAttribute.REQUIRED, token);
throw e;
}
catch (Throwable e) {
discoPostInvoke(TransactionAttribute.REQUIRED, token, e);
}
finally {
getHome().replaceContext(context);
}
discoPostInvoke(TransactionAttribute.REQUIRED, token);
return (retVal);
}
S AMPLE 16. newOrder for disconnected container.
the business logic provided by the bean developer in any way. (This is the approach
used by connected EJB containers in which the deployed component delegates all
business logic to the original bean, and only adds additional, container-specific, func-
tion.) Rather, the deployed component “calls out” to the logging function after a
top-level transaction completes successfully, in a manner that resembles—from the
Search WWH ::




Custom Search