Examples of AccountService


Examples of bigbank.account.AccountService

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("BigBank.composite", BigBankClient.class.getClassLoader());
        node.start();
       
        AccountService accountService = ((SCAClient)node).getService(AccountService.class, "AccountServiceComponent");

        System.out.println("Account summary: " + accountService.getAccountReport("Customer_01") );

        node.stop();
   
View Full Code Here

Examples of bigbank.account.AccountService

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

        SCADomain domain = SCADomain.newInstance("BigBank.composite");

        AccountService accountService = domain.getService(AccountService.class, "AccountServiceComponent");

        String customerID = "Customer_01";

        System.out.println("Calling account service for customer: " + customerID);
        System.out.println();
        double balance = accountService.getAccountReport(customerID);

        System.out.println();
        System.out.println("Balance: " + balance);

        domain.close();
View Full Code Here

Examples of bigbank.account.AccountService

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

        SCADomain scaDomain = SCADomain.newInstance("BigBank.composite");
       
        AccountService accountService = scaDomain.getService(AccountService.class,
                                                          "AccountServiceComponent");

        System.out.println("Account summary: " + accountService.getAccountReport("Foo") );

        scaDomain.close();
   
View Full Code Here

Examples of bigbank.account.AccountService

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

        SCADomain domain = SCADomain.newInstance("BigBank.composite");

        AccountService accountService = domain.getService(AccountService.class, "AccountServiceComponent");

        String customerID = "1234";

        System.out.println("Calling account service for customer: " + customerID);
        System.out.println();
        double balance = accountService.getAccountReport(customerID);

        System.out.println();
        System.out.println("Balance: " + balance);

        domain.close();
View Full Code Here

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

Examples of com.bigbank.account.AccountService

    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

Examples of com.bigbank.account.AccountService

        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

Examples of com.bigbank.account.AccountService

    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

Examples of com.bigbank.account.AccountService

        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

Examples of com.bigbank.account.AccountService

        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
TOP
Copyright © 2018 www.massapi.com. 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.