SessBean.java~4~
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:
Java编程
开发平台:
Java
- package com.cwj.userjmssesenbdb;
- import javax.ejb.*;
- import javax.naming.*;
- import com.miaoq.userjmssesenbdb.*;
- public class SessBean implements SessionBean {
- SessionContext sessionContext;
- BMPBEANHome bMPBEANHome;
- public void ejbCreate() throws CreateException, javax.naming.NamingException, java.rmi.RemoteException {
- Context TX = new InitialContext();
- bMPBEANHome =(BMPBEANHome) javax.rmi.PortableRemoteObject.narrow(TX.lookup("BMPBEANHome"), BMPBEANHome.class);
- }
- 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;
- }
- public void insTableAa11(String shancbz, String xiwbz) throws CreateException, javax.naming.NamingException, java.rmi.RemoteException {
- System.out.println("begin to insert...........");
- bMPBEANHome.ejbInsertAa11(shancbz, xiwbz);
- }
- }