Package org.wso2.carbon.billing.core

Examples of org.wso2.carbon.billing.core.BillingException


            String msg = "Error occurred while getting subscription: " + filter;
            if(customer != null) {
                msg = msg + " for customer: " + customer.getName();
            }
            log.error(msg);
            throw new BillingException(msg, e);
        }finally {
            if (succeeded) {
                dataAccessObject.commitTransaction();
            } else {
                dataAccessObject.rollbackTransaction();
View Full Code Here


            conn.setAutoCommit(false);
            Transaction.incNestedDepth();
        } catch (SQLException e) {
            String msg = "Failed to start new billing transaction. " + e.getMessage();
            log.error(msg, e);
            throw new BillingException(msg, e);
        }

        Transaction.setConnection(conn);
    }
View Full Code Here

            conn.rollback();

        } catch (SQLException e) {
            String msg = "Failed to rollback transaction. " + e.getMessage();
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            endTransaction();
            Transaction.decNestedDepth();
        }
View Full Code Here

        if (Transaction.isRollbacked()) {
            String msg = "The transaction is already rollbacked, you can not commit a transaction "
                    + "already rollbacked, nested depth: " + Transaction.getNestedDepth() + ".";
            log.debug(msg);
            Transaction.decNestedDepth();
            throw new BillingException(msg);
        }

        Connection conn = Transaction.getConnection();
        try {
            conn.commit();

        } catch (SQLException e) {
            String msg = "Failed to commit transaction. " + e.getMessage();
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            endTransaction();
            Transaction.decNestedDepth();
        }
View Full Code Here

                conn.close();
                //log.info("Database connection closed: ");
            } catch (SQLException e) {
                String msg = "Failed to close transaction. " + e.getMessage();
                log.error(msg, e);
                throw new BillingException(msg, e);

            } finally {
                Transaction.setStarted(false);
                Transaction.setConnection(null);
            }
View Full Code Here

                id = result.getInt("BC_ID");
            }
        } catch (SQLException e) {
            String msg = "Failed to check the existence of the items with name " + itemName + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
View Full Code Here

                id = result.getInt("BC_ID");
            }
        } catch (SQLException e) {
            String msg = "Failed to check the existence of the items with name " + itemName + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
View Full Code Here

                items.add(item);
            }
        } catch (SQLException e) {
            String msg = "Failed to get the items with name " + itemName + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
View Full Code Here

            }
        } catch (SQLException e) {
            String msg = "Failed to insert the invoice for customer, "
                    + invoice.getCustomer().getName() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
View Full Code Here

            }
        } catch (SQLException e) {
            String msg = "Failed to insert the item, " +
                    item.getName() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
View Full Code Here

TOP

Related Classes of org.wso2.carbon.billing.core.BillingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.