Share this page

# 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() );
        }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: