/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package nl.marcenschede.tests; import java.util.logging.Level; import java.util.logging.Logger; import javax.ejb.EJB; import javax.faces.bean.ManagedBean; @ManagedBean(name = "mb") public class MyBean { @EJB(beanName = "OrderManager") private OrderManager om; private String name = new String("Marc"); private String city = new String("Enschede"); private String phone = new String("06-nogiets"); private String code = new String("0"); private String result; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getResult() { return result; } public void setResult(String result) { this.result = result; } public void store() { Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Store"); result = om.registerCustomer(name, city, phone, Integer.parseInt(code) ); } }