範例
public class
BeanClass
implements
javax.ejb.EntityBean {
public
Object returningMethod () {
//..
return this
;
}
//必須實作這個介面的其他方法
}
解決方案
避免傳回
this
。改用 getEJBObject()。
public class
BeanClass
implements
javax.ejb.EntityBean {
public
Object returningMethod () {
//..
return this
.getEJBObject();
}
//必須實作這個介面的其他方法
}