Example: lr.start_transaction
The sample below illustrates timing the duration of a method call getStockList from an ORB interface. It adds checks for exceptions and ensures that the getStockList method returns an non-zero length array.
lr.start_transaction("GetStocks");
try { String stocks[];
stocks = orStockServer1.getStockList();
if (stocks.length == 0) throw new Exception("No stocks returned/available");
lr.end_transaction("GetStocks", lr.PASS);
}
catch (Exception e1) {
lr.end_transaction("GetStocks", lr.FAIL); lr.message(" An exception occurred : " + e1.toString() ); }