mysessionbean.java

来自「一个java 代码生成器」· Java 代码 · 共 99 行

JAVA
99
字号
package com.session.stateless;import javax.naming.InitialContext;import javax.ejb.CreateException;import javax.ejb.SessionBean;import javax.ejb.SessionContext;import javax.ejb.SessionSynchronization;import java.rmi.RemoteException;import java.util.*;import java.math.*;/** * This is the MySessionBean  Session Bean. * * @Author: Siddhartha P. Chandurkar * @version $ID: $ * */public class MySessionBean implements  SessionBean{	private SessionContext context;	//Attributes		private String firstName;		private String lastName;		//METHODS		public void bar()throws MyException, MyOtherException{		//Do Something	}		public void foo(){		//Do Something	}	    /**     * No argument constructor needed by the Container     */     public MySessionBean(){     }    /**     * Create method specified in EJB 1.1 section 6.10.3     */    public void ejbCreate() throws CreateException {    }    /* Methods required by SessionBean Interface. EJB 1.1 section 6.5.1. */    /**     * @see javax.ejb.SessionBean#setContext(javax.ejb.SessionContext)     */    public void setSessionContext(SessionContext context){        this.context = context;    }    /**     * @see javax.ejb.SessionBean#ejbActivate()     */    public void ejbActivate() {    }    /**     * @see javax.ejb.SessionBean#ejbPassivate()     */    public void ejbPassivate() {    }    /**     * @see javax.ejb.SessionBean#ejbRemove()     */    public void ejbRemove() {    }    	/**	 * Write your manual code between these tags. They will be retained if code is 	 * regenerated.	 * IMPORTANT !!! Please do not remove these tags even if you dont add any manual code.	 */			//<manual-code>		//</manual-code>}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?