Package com.bigbank.account

Examples of com.bigbank.account.AccountService


    public static void main(String[] args) throws Exception {
        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.account.testclient", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        AccountService accountService = (AccountService) moduleContext.locateService("AccountServiceComponent");

        AccountReport accountReport = accountService.getAccountReport(12345);

        for (Iterator i = accountReport.getAccountSummaries().iterator(); i.hasNext();) {
            AccountSummary accountSummary = (AccountSummary) i.next();

            System.out.println(accountSummary.getAccountNumber());
View Full Code Here


    public static void main(String[] args) throws Exception {
        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.webclient.testclient", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        AccountService accountService = (AccountService) moduleContext.locateService("AccountServiceComponent");

        AccountReport report = accountService.getAccountReport(12345);
        List summaries = report.getAccountSummaries();

        System.out.println("retrieved " + summaries.size() + " summaries");

        tuscany.stop();
View Full Code Here

        ProfileService profile = (ProfileService) moduleContext.locateService(mProfileService);
        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(mAccountService);
        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List summaries;
        try {
            AccountReport accountReport = service.getAccountReport(profile.getId());
            pageContext.setAttribute("StockSummaries", accountReport.getStockSummaries());
            summaries = accountReport.getAccountSummaries();
        } catch (Exception e) {
            throw new JspException(e);
        }
View Full Code Here

    public void doPost(HttpServletRequest pReq, HttpServletResponse pResp) throws ServletException {

        try {
            final String action = pReq.getParameter("action");
            ModuleContext moduleContext = CurrentModuleContext.getContext();
            AccountService accountServices = (AccountService) moduleContext.locateService("AccountServiceComponent");
            if (accountServices == null) {
                throw new ServletException("AccountServiceComponent");
            }
            ProfileService profileServices = null;
            if (!"createAccount".equals(action)) {
View Full Code Here

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(AccountService.class, mAccountService);
        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List entries;
        try {
            AccountLog accountLog = service.getAccountLog(profile.getId());
            pageContext.setAttribute("StockLogEntries", accountLog.getStockLogEntries());
            entries = accountLog.getAccountLogEntries();
        } catch (Exception e) {
            throw new JspException(e);
        }
View Full Code Here

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(AccountService.class, mAccountService);

        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List summaries;
        try {
            AccountReport accountReport = service.getAccountReport(profile.getId());
            pageContext.setAttribute("StockSummaries", accountReport.getStockSummaries());
            summaries = accountReport.getAccountSummaries();
        } catch (Exception e) {
            throw new JspException(e);
        }
View Full Code Here

    public static void main(String[] args) throws Exception {

        CompositeContext context = CurrentCompositeContext.getContext();

        AccountService accountService = context.locateService(AccountService.class, "AccountServiceComponent");

        AccountReport accountReport = accountService.getAccountReport(12345);

        for (Iterator i = accountReport.getAccountSummaries().iterator(); i.hasNext();) {
            AccountSummary accountSummary = (AccountSummary) i.next();

            System.out.println(accountSummary.getAccountNumber());
View Full Code Here

        try {
            final String action = pReq.getParameter("action");

            CompositeContext moduleContext = CurrentCompositeContext.getContext();
            AccountService accountServices = (AccountService) moduleContext.locateService(AccountService.class, "AccountServiceComponent");
            if (accountServices == null) {
                throw new ServletException("AccountServiceComponent");
            }
            ProfileService profileServices = null;
            if (!"createAccount".equals(action)) {
View Full Code Here

    }

    public static void main(String[] args) throws Exception {
        CompositeContext moduleContext = CurrentCompositeContext.getContext();

        AccountService accountService = (AccountService) moduleContext.locateService(AccountService.class, "AccountServiceComponent");

        AccountReport report = accountService.getAccountReport(12345);
        List summaries = report.getAccountSummaries();

        System.out.println("retrieved " + summaries.size() + " summaries");

    }
View Full Code Here

TOP

Related Classes of com.bigbank.account.AccountService

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.