Project

General

Profile

« Previous | Next » 

Revision 237

Added by bojilova almost 24 years ago

testing login

View differences:

MetaCatSession.java
15 15
import javax.servlet.http.HttpSession;
16 16
import javax.servlet.http.HttpServletRequest;
17 17
import java.util.Properties;
18
import java.util.PropertyResourceBundle;
18 19
import java.io.FileInputStream;
19 20
import java.rmi.*;
20 21
import SrbJavaGlueInterface;
......
33 34
    static SrbJavaGlueInterface srbJG;
34 35
    static {
35 36
        try {
36
            Properties SRBProps = new Properties();
37
            PropertyResourceBundle SRBProps = null;
37 38
            // SRB properties that tells about the location of SRB RMI Server
38 39
            // srbProps.properties should reside on metacat server
39
            FileInputStream in = new FileInputStream("srbProps.properties");
40
            SRBProps.load(in);
41
            in.close();
42
            srbHost = (String)SRBProps.get("host");
43
            srbPort = (String)SRBProps.get("port");
40
            SRBProps = (PropertyResourceBundle)
41
                        PropertyResourceBundle.getBundle("srbProps.properties");
42
            srbHost = (String)SRBProps.handleGetObject("host");
43
            srbPort = (String)SRBProps.handleGetObject("port");
44 44
            // should handle missing RMIhost name here
45
            String RMIhost = (String)SRBProps.get("RMIhost");
45
            String RMIhost = (String)SRBProps.handleGetObject("RMIhost");
46 46
            String name = "//" + RMIhost + "/SrbJavaGlue";
47 47
            srbJG = (SrbJavaGlueInterface)Naming.lookup(name);
48 48
        } catch (Exception e) {
......
129 129
    // temp
130 130
    private void srbConnection () {
131 131
        try {
132
            Properties SRBProps = new Properties();
132
            PropertyResourceBundle SRBProps = null;
133 133
            // SRB properties that tells about the location of SRB RMI Server
134 134
            // srbProps.properties should reside on metacat server
135
            FileInputStream in = new FileInputStream("srbProps.properties");
136
            SRBProps.load(in);
137
            in.close();
138
            srbHost = (String)SRBProps.get("host");
139
            srbPort = (String)SRBProps.get("port");
135
            SRBProps = (PropertyResourceBundle)
136
                        PropertyResourceBundle.getBundle("srbProps.properties");
137
            srbHost = (String)SRBProps.handleGetObject("host");
138
            srbPort = (String)SRBProps.handleGetObject("port");
140 139
            // should handle missing RMIhost name here
141
            String RMIhost = (String)SRBProps.get("RMIhost");
140
            String RMIhost = (String)SRBProps.handleGetObject("RMIhost");
142 141
            String name = "//" + RMIhost + "/SrbJavaGlue";
143 142
            srbJG = (SrbJavaGlueInterface)Naming.lookup(name);
144 143
        } catch (Exception e) {

Also available in: Unified diff