一个简单的EJB实例.用DB2连接.JSP页面.很好用.供大家学习

源代码在线查看: locationbean.java

软件大小: 2249 K
上传用户: face137
关键词: EJB DB2 JSP 连接
下载地址: 免注册下载 普通下载 VIP

相关代码

				package salesdb;
				/**
				 * Bean implementation class for Enterprise Bean: Location
				 */
				public abstract class LocationBean implements javax.ejb.EntityBean {
					private javax.ejb.EntityContext myEntityCtx;
					/**
					 * setEntityContext
					 */
					public void setEntityContext(javax.ejb.EntityContext ctx) {
						myEntityCtx = ctx;
					}
					/**
					 * getEntityContext
					 */
					public javax.ejb.EntityContext getEntityContext() {
						return myEntityCtx;
					}
					/**
					 * unsetEntityContext
					 */
					public void unsetEntityContext() {
						myEntityCtx = null;
					}
					/**
					 * ejbCreate
					 */
					public salesdb.LocationKey ejbCreate(java.lang.String zipcode)
						throws javax.ejb.CreateException {
						setZipcode(zipcode);
						return null;
					}
					/**
					 * ejbPostCreate
					 */
					public void ejbPostCreate(java.lang.String zipcode)
						throws javax.ejb.CreateException {
					}
					/**
					 * ejbActivate
					 */
					public void ejbActivate() {
					}
					/**
					 * ejbLoad
					 */
					public void ejbLoad() {
					}
					/**
					 * ejbPassivate
					 */
					public void ejbPassivate() {
					}
					/**
					 * ejbRemove
					 */
					public void ejbRemove() throws javax.ejb.RemoveException {
					}
					/**
					 * ejbStore
					 */
					public void ejbStore() {
					}
					/**
					 * ejbCreate method for a CMP entity bean.
					 */
					public salesdb.LocationKey ejbCreate(
						java.lang.String zipcode,
						java.lang.String city,
						java.lang.String state,
						java.lang.String areacode)
						throws javax.ejb.CreateException {
						setZipcode(zipcode);
						setCity(city);
						setState(state);
						setAreacode(areacode);
						return null;
					}
					/**
					 * ejbPostCreate
					 */
					public void ejbPostCreate(
						java.lang.String zipcode,
						java.lang.String city,
						java.lang.String state,
						java.lang.String areacode)
						throws javax.ejb.CreateException {
					}
					/**
					 * Get accessor for persistent attribute: city
					 */
					public abstract java.lang.String getCity();
					/**
					 * Set accessor for persistent attribute: city
					 */
					public abstract void setCity(java.lang.String newCity);
					/**
					 * Get accessor for persistent attribute: state
					 */
					public abstract java.lang.String getState();
					/**
					 * Set accessor for persistent attribute: state
					 */
					public abstract void setState(java.lang.String newState);
					/**
					 * Get accessor for persistent attribute: zipcode
					 */
					public abstract java.lang.String getZipcode();
					/**
					 * Set accessor for persistent attribute: zipcode
					 */
					public abstract void setZipcode(java.lang.String newZipcode);
					/**
					 * Get accessor for persistent attribute: areacode
					 */
					public abstract java.lang.String getAreacode();
					/**
					 * Set accessor for persistent attribute: areacode
					 */
					public abstract void setAreacode(java.lang.String newAreacode);
				}
							

相关资源