Enterprise1Bean.java~12~
上传用户:jnhyscl
上传日期:2010-03-08
资源大小:345k
文件大小:1k
- package shiponline;
- import javax.ejb.*;
- import com.borland.dx.dataset.*;
- public class Enterprise1Bean implements SessionBean {
- SessionContext sessionContext;
- private transient ServerDataModuleLocal serverDataModule;
- private transient VaoPortHome vaoPortHome;
- javax.naming.Context context;
- public void ejbCreate() throws CreateException {
- /**@todo Complete this method*/
- }
- public void ejbRemove() {
- /**@todo Complete this method*/
- }
- public void ejbActivate() {
- /**@todo Complete this method*/
- }
- public void ejbPassivate() {
- /**@todo Complete this method*/
- }
- public void setSessionContext(SessionContext sessionContext) {
- this.sessionContext = sessionContext;
- }
- private void lookup() {
- try {
- context = getInitialContext();
- ServerDataModuleLocalHome home = (ServerDataModuleLocalHome) context.lookup("java:comp/env/ejb/ServerDataModule");
- serverDataModule = home.create();
- }
- catch (Exception ex) {
- throw new EJBException(ex);
- }
- }
- private javax.naming.Context getInitialContext() {
- try {
- if (context == null) {
- context = new javax.naming.InitialContext();
- }
- return context;
- }
- catch (Exception ex) {
- throw new EJBException(ex);
- }
- }
- }