ShiponlineBean.java~20~
上传用户:jnhyscl
上传日期:2010-03-08
资源大小:345k
文件大小:1k
- package shiponline;
- import javax.naming.*;
- import javax.ejb.*;
- import com.borland.dx.dataset.*;
- public class ShiponlineBean implements SessionBean {
- SessionContext sessionContext;
- transient Context context;
- public void ejbRemove() {
- /**@todo Complete this method*/
- }
- public void ejbActivate() {
- }
- public void ejbPassivate() {
- /**@todo Complete this method*/
- }
- public void setSessionContext(SessionContext sessionContext) {
- this.sessionContext = sessionContext;
- }
- public int addVaoPort(DataSetData[] dataArray, String code, String name) {
- /*
- try{
- try{
- vaoPortHome.findByCode(code);
- return 1;
- }catch (ObjectNotFoundException ex){
- }
- try{
- vaoPortHome.findByName(name);
- return 2;
- }catch(ObjectNotFoundException exc){
- }
- //serverDataModule.addVaoPort(dataArray);
- return 3;
- }catch(Exception e){
- return 4;
- }
- */
- return 3;
- }
- private javax.naming.Context getInitialContext() {
- try {
- if (context == null) {
- context = new javax.naming.InitialContext();
- }
- return context;
- }
- catch (Exception ex) {
- throw new EJBException(ex);
- }
- }
- public void ejbCreate() throws CreateException {
- /**@todo Complete this method*/
- }
- }