Methods Summary |
---|
public void | doEnvLookup()
try {
InitialContext ic = new InitialContext();
Double dbl = (Double) ic.lookup("java:comp/env/custDiscount");
customerDiscount = dbl.doubleValue();
// use the primitive double value to calculate the discount
} catch (Exception ex) {
ex.printStackTrace();
}
|
public void | doLookup()
try {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/CustomerDB");
Connection conn = ds.getConnection();
} catch (Exception ex) {
ex.printStackTrace();
}
|
public void | ejbActivate()
|
public java.lang.String | ejbCreate(java.lang.String last, java.lang.String first, java.lang.String addr, java.lang.String ID)
System.out.println("in create");
this.setLast(last);
this.setFirst(first);
this.setPK(ID);
this.setCustAddress(addr);
this.setLimit(2000.00);
System.out.println("finishing create");
return null;
|
public void | ejbLoad()
|
public void | ejbPassivate()
|
public void | ejbPostCreate(java.lang.String last, java.lang.String first, java.lang.String addr, java.lang.String ID)
System.out.println("in ejbPostCreate");
|
public void | ejbRemove()
|
public void | ejbStore()
|
public java.lang.String | getAddress()
return this.getCustAddress();
|
public double | getCreditLimit()
return this.getLimit();
|
public abstract java.lang.String | getCustAddress()
|
public abstract java.lang.String | getFirst()
|
public java.lang.String | getFirstName()
return this.getFirst();
|
public abstract java.lang.String | getLast()
|
public java.lang.String | getLastName()
return this.getLast();
|
public abstract double | getLimit()
|
public abstract java.lang.String | getPK()
|
public void | setAddress(java.lang.String addr)
this.setCustAddress(addr);
|
public void | setCreditLimit(double amt)
this.setLimit(amt);
|
public abstract void | setCustAddress(java.lang.String addr)
|
public void | setEntityContext(EntityContext ctx)
context = ctx;
|
public abstract void | setFirst(java.lang.String first)
|
public void | setFirstName(java.lang.String name)
this.setFirst(name);
|
public abstract void | setLast(java.lang.String last)
|
public void | setLastName(java.lang.String name)
this.setLast(name);
|
public abstract void | setLimit(double amt)
|
public abstract void | setPK(java.lang.String pk)
|
public void | unsetEntityContext()
|