StoreAccessStateBean.java
资源名称:MyStore.rar [点击查看]
上传用户:hgs128
上传日期:2007-02-03
资源大小:166k
文件大小:2k
源码类别:
百货/超市行业
开发平台:
WINDOWS
- /*
- * Created on 1999-5-17
- */
- package state;
- import javax.ejb.SessionBean;
- import javax.ejb.SessionContext;
- /**
- * @ejb.bean name="StoreAccessState"
- * jndi-name="StoreAccessStateBean"
- * type="Stateful"
- *
- *@ejb.dao class="dao.StoreAccessStateDAO"
- *impl-class="dao.StoreAccessDAOImpl"
- *--
- * This is needed for JOnAS.
- * If you are not using JOnAS you can safely remove the tags below.
- * @jonas.bean ejb-name="StoreAccessState"
- * jndi-name="StoreAccessStateBean"
- *
- *@ejb.resource-ref res-ref-name="jdbc/OracleDS"
- * res-type="javax.sql.Datasource"
- * res-auth="Container"
- *
- *@jboss.resource-ref res-ref-name="jdbc/OracleDS" jndi-name="java:/OracleDS"
- *
- *@jboss.container-configuration name="Standard Stateful SessionBean"
- *--
- **/
- public abstract class StoreAccessStateBean implements SessionBean {
- protected SessionContext ctx=null;
- private String userID;
- /**
- * Sets the session context
- * @param javax.ejb.SessoinContext the new ctx value
- * @ejb.method stSessionContext
- **/
- public void setSessionContext(javax.ejb.SessionContext ctx){
- this.ctx=ctx;
- }
- /**
- * Unsets the session context
- * @param javax.ejb.SessionContext ctx value
- * @ejb.method unsetSessionContext
- */
- public void unsetSessionContext(){
- this.ctx=null;
- }
- /**
- * @ejb.interface-method
- * view-type="remote"
- *@dao.call name="loginUser"
- **/
- public String loginUser (String username, String password){
- System.out.println("Entering StoreAccessStateBean....");
- System.out.println("Leaving StoreAccessStateBean...");
- return null;
- }
- /**
- * @ejb.interface-method
- * view-type="remote"
- **/
- public void setUserID(String userID){
- this.userID=userID;
- }
- /**
- * @ejb.interface-method
- * view-type="remote"
- **/
- public String getUserID(){
- return userID;
- }
- /**
- * The EJB Create Method
- * @ejb.create-method
- **/
- public void ejbCreate(String userID) throws javax.ejb.CreateException{
- System.out.println("Entering StoreAccessStateBean.ejbCreate()");
- this.userID=userID;
- System.out.println("Leaving StoreAccessStateBean.ejbCreate()");
- } }