beginTransaction("getItemById[]", octxt); MailItem[] items = getItemById(ids, type);  for (int i = 0; i < items.length; i++) checkAccess(items[i]);
beginTransaction("getItemById", octxt); MailItem item = checkAccess(getItemById(id, type));
    public synchronized MailItem[] getItemById(OperationContext octxt, int[] ids, byte type) throws ServiceException {        boolean success = false;        try {            // tag/folder caches are populated in beginTransaction...            beginTransaction("getItemById[]", octxt);            MailItem[] items = getItemById(ids, type);            // make sure all those items are visible...            for (int i = 0; i < items.length; i++)                checkAccess(items[i]);            success = true;            return items;        } finally {            endTransaction(success);        }    }