📄 baseclass.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -