Examples of CustomerHome


Examples of com.sun.ebank.ejb.customer.CustomerHome

        if (accountId == null)
            throw new IllegalArgumentException("null accountId" );

        ArrayList customerIds;
        CustomerHome customerHome;

        if (customerExists(customerId) == false)
            throw new CustomerNotFoundException(customerId);

        if (accountExists(accountId) == false)
View Full Code Here

Examples of com.sun.ebank.ejb.customer.CustomerHome

    private boolean customerExists(String customerId) {

        Debug.print("AccountControllerBean customerExists");

        CustomerHome customerHome;

        try {
            customerHome = EJBGetter.getCustomerHome();
        } catch (Exception ex) {
             throw new EJBException("customerExists: " +
                 ex.getMessage());
        }

        try {
            customerHome.findByPrimaryKey(customerId);
            return true;
        } catch (Exception ex) {
            return false;
        }
View Full Code Here

Examples of com.sun.ebank.ejb.customer.CustomerHome

        if (accountId == null)
            throw new InvalidParameterException("null accountId" );

        ArrayList customerIds;
        CustomerHome customerHome;

        if (customerExists(customerId) == false)
            throw new CustomerNotFoundException(customerId);

        if (accountExists(accountId) == false)
View Full Code Here

Examples of com.sun.ebank.ejb.customer.CustomerHome

    private boolean customerExists(String customerId) {

        Debug.print("AccountControllerBean customerExists");

        CustomerHome customerHome;

        try {
            customerHome = EJBGetter.getCustomerHome();
        } catch (Exception ex) {
             throw new EJBException("customerExists: " +
                 ex.getMessage());
        }

        try {
            customerHome.findByPrimaryKey(customerId);
            return true;
        } catch (Exception ex) {
            return false;
        }
View Full Code Here

Examples of org.jboss.test.bankiiop.interfaces.CustomerHome

   public void testPassivation()
      throws Exception
   {
      // Create a bunch of customers, to test passivation
        
      CustomerHome home = (CustomerHome)PortableRemoteObject.narrow(
                           getInitialContext().lookup(CustomerHome.JNDI_NAME),
                           CustomerHome.class);
     
      getLog().info("Create customers");
     
      for (int i = 0; i < getIterationCount(); i++)
         home.create(i+"", "Smith_"+i);
      getLog().debug("Customers created");
     
   }
View Full Code Here

Examples of org.jboss.test.bankiiop.interfaces.CustomerHome

            acct.remove();
         }
      }
      getLog().info("Remove customers");
      {
         CustomerHome home = (CustomerHome)PortableRemoteObject.narrow(
                           getInitialContext().lookup(CustomerHome.JNDI_NAME),
                           CustomerHome.class);
         Collection customers = home.findAll();
         Iterator i = customers.iterator();
         while(i.hasNext())
         {
            Customer cust =
               (Customer)PortableRemoteObject.narrow(i.next(),
View Full Code Here

Examples of test.interfaces.CustomerHome

     */
    public void patrolBank() {
        System.out.println("Patrolling bank.");

        try {
            CustomerHome home = (CustomerHome) new InitialContext().lookup("java:comp/env/ejb/bank/Customer");
            Collection customers = home.findAll();
            for (Iterator customersInBank = customers.iterator(); customersInBank.hasNext();) {
                Customer customer = (Customer) customersInBank.next();
                customer.talkTo();
            }
        }
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.