一个简单的EJB实例.用DB2连接.JSP页面.很好用.供大家学习
源代码在线查看: itembeaninjectorimpl_ff154d23.java
package salesdb.websphere_deploy.DB2UDBNT_V8_1; /** * ItemBeanInjectorImpl_ff154d23 */ public class ItemBeanInjectorImpl_ff154d23 implements salesdb.websphere_deploy.ItemBeanInjector_ff154d23 { /** * ejbCreate */ public void ejbCreate(com.ibm.ws.ejbpersistence.beanextensions.ConcreteBean cb, javax.resource.cci.IndexedRecord record) { salesdb.ConcreteItem_ff154d23 concreteBean=(salesdb.ConcreteItem_ff154d23)cb; record.set(0,concreteBean.getItemid()); record.set(1,concreteBean.getName()); } /** * ejbStore */ public void ejbStore(com.ibm.ws.ejbpersistence.beanextensions.ConcreteBean cb, javax.resource.cci.IndexedRecord record) { salesdb.ConcreteItem_ff154d23 concreteBean=(salesdb.ConcreteItem_ff154d23)cb; record.set(0,concreteBean.getItemid()); record.set(1,concreteBean.getName()); } /** * ejbRemove */ public void ejbRemove(com.ibm.ws.ejbpersistence.beanextensions.ConcreteBean cb, javax.resource.cci.IndexedRecord record) { salesdb.ConcreteItem_ff154d23 concreteBean=(salesdb.ConcreteItem_ff154d23)cb; record.set(0,concreteBean.getItemid()); } /** * ejbFindByPrimaryKey */ public void ejbFindByPrimaryKey(Object pkeyObject, javax.resource.cci.IndexedRecord record) { salesdb.ItemKey pkey=(salesdb.ItemKey)pkeyObject; record.set(0,pkey.itemid); } /** * findItemfkByItemfkPurchaseInverseKey_Local */ public void findItemfkByItemfkPurchaseInverseKey_Local(salesdb.PurchaseKey fkey, javax.resource.cci.IndexedRecord record) { record.set(0,fkey.purchaseid); } }