private SessionContect ctx;
private HashSet cart;
/* callback methods*/
public void setSessionContext(SessionContext ctx) { this.ctx
= ctx; }
public void ejbCreate() throws CreateException {
cart = new HashSet();
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove() {}
/*business methods*/
public void addCourses(String[] courseIds) {
if(courseIds == null) { return; }
for (int i=0; i<courseIDs.length;
i++) {
cart.add(courseIds[i]);
}
}
public Collection getCourses() { return cart; }
public void empty() {cart.clear(); }