範例
public class
BeanClass
implements
javax.ejb.EntityBean {
public void
ejbCreate () {
//..
}
public void
ejbCreate(
int
a){
//..
}
//沒有相符的 ejbPostCreate() 方法
//必須實作這個介面的其他方法
}
解決方案
每個 ejbCreate() 方法都一律實作相符的 ejbPostCreate() 方法。
public class
BeanClass
implements
javax.ejb.EntityBean {
public void
ejbCreate () {
//..
}
public void
ejbCreate(
int
a){
//..
}
public void
ejbPostCreate () {
//..
}
public void
ejbPostCreate (
int
a) {
//..
}
//必須實作這個介面的其他方法
}