baseclass.java

来自「jbuilder9+weblogic8+oracle9开发的客户管理系统。服务器」· Java 代码 · 共 65 行

JAVA
65
字号
package testejb;import javax.naming.*;import java.util.*;import javax.rmi.PortableRemoteObject;import java.io.*;public class baseclass implements Serializable{  private javax.naming.Context context;  public baseclass() {     initialize();  }  public void initialize() {    try{       context = getInitialContext();        }    catch (Exception e)    {System.out.println("Unable to connect to WebLogic server");     System.out.println("Please make sure that the server is running.");}  }  private Context getInitialContext() throws Exception {   String url = "t3://localhost:7001";   String user = null;   String password = null;   Properties properties = null;   try {     properties = new Properties();     properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");     properties.put(Context.PROVIDER_URL, url);     if (user != null) {       properties.put(Context.SECURITY_PRINCIPAL, user);       properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);     }     return new InitialContext(properties);   }   catch(Exception e) {     throw e;   } }  public javax.naming.Context getContext() {    return context;  } public java.util.Vector getrestperm(Vector myperms,Vector totalperms) { Vector restperm=new Vector();   for(int i=0;i<totalperms.size();i++)   {     allperm totalperm=(allperm)totalperms.elementAt(i);     int j=Integer.parseInt(totalperm.getCode());     if(myperms.elementAt(j)==null)       {restperm.add(totalperm);}    }      return restperm; }}

⌨️ 快捷键说明

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