long custId3 = customerBean.createCustomer("Jai", "NoLastName");
System.out.println("Jai NoLastName created with id = " + custId3);
// now let's find customer with some specific id
System.out.println("Searching for customer with id = " + custId2);
Customer customer = customerBean.getCustomer(custId2);
System.out.println("Found customer " + customer.getFname() + " " + customer.getLname() + " with id = " + custId2);
//let's use the other bean to search another customer
CustomerRemote anotherCustomerBean = (CustomerRemote) ctx.lookup("AnotherCustBean");
System.out.println("Searching for customer with id = " + custId3);
Customer oneMoreCustomer = anotherCustomerBean.getCustomer(custId3);
System.out.println("Found customer " + oneMoreCustomer.getFname() + " " + oneMoreCustomer.getLname() + " with id = " + custId3);
// now let's find customers with first name=Jai
System.out.println("Searching for customers with first name Jai");
List<Customer> customers = customerBean.getCustomers("Jai");
System.out.println("Found " + customers.size() + " customers with first name Jai");