Package org.wso2.carbon.billing.core

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


                invoices.add(invoice);
            }
        } catch (SQLException e) {
            String msg = "Failed to get invoices for customer: " + customer.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 fill the payment for subscription: "
                    + subscription.getId() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg = RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR
                        + ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }

            try {
                if (results != null) {
                    results.close();
View Full Code Here

            ps.executeUpdate();
        } catch (SQLException e) {
            String msg = "Error in associating invoice: " + invoice.getId() +
                    " with payment: " + payment.getId() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg = RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR
                        + ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }
        }
    }
View Full Code Here

            }
        } catch (SQLException e) {
            String msg = "Failed to insert the invoice subscription, invoice id: " +
                    invoice.getId() + ", subscription id: " + subscription.getId() + ".";
            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 subscription item, item id: " +
                    item.getId() + ", invoice subscription id: " + invoiceSubscriptionId + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg = RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR
                        + ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }

            try {
                if (result != null) {
                    result.close();
View Full Code Here

                payment.setId(paymentId);
            }
        } catch (SQLException e) {
            String msg = "Failed to insert the payment, payment id: " + paymentId + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg = RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR
                        + ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }

            try {
                if (result != null) {
                    result.close();
View Full Code Here

            }
        } catch (SQLException e) {
            String msg = "Failed to insert the payment subscriptions, " +
                    "payment id: " + payment.getId() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg = RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR
                        + ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }
        }
    }
View Full Code Here

            }
        } catch (SQLException e) {
            String msg = "Failed to get the active subscriptions for filter: " + filter + "," +
                    "customer = " + customer.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 get the invoice for: " + "customer = " + customer.getName() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg =
                        RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR +
                                ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }

            try {
                if (result != null) {
                    result.close();
View Full Code Here

                fillInvoicePayments(invoice);
            }
        } catch (SQLException e) {
            String msg = "Failed to get the invoice for: " + "invoice id = " + invoiceId + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);

        } finally {
            try {
                if (ps != null) {
                    ps.close();
                }
            } catch (SQLException ex) {
                String msg = RegistryConstants.RESULT_SET_PREPARED_STATEMENT_CLOSE_ERROR +
                        ex.getMessage();
                log.error(msg, ex);
                throw new BillingException(msg, ex);
            }

            try {
                if (result != null) {
                    result.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.