Project

General

Profile

« Previous | Next » 

Revision 252

Added by bojilova over 24 years ago

finished user auth & session tracking

View differences:

src/edu/ucsb/nceas/metacat/MetaCatSession.java
38 38
            // SRB properties that tells about the location of SRB RMI Server
39 39
            // srbProps.properties should reside on metacat server
40 40
            SRBProps = (PropertyResourceBundle)
41
                        PropertyResourceBundle.getBundle("srbProps.properties");
41
                        PropertyResourceBundle.getBundle("edu.ucsb.nceas.metacat.srbProps");
42 42
            srbHost = (String)SRBProps.handleGetObject("host");
43 43
            srbPort = (String)SRBProps.handleGetObject("port");
44 44
            // should handle missing RMIhost name here
......
90 90
      int srbconn = 0;
91 91
      int err;
92 92
      
93
      if (srbJG == null) {
94
        srbConnection();
95
        return false;
96
      } else return true;
97
 /*     
98 93
      // try SRB RMI Connection
99 94
      // integer value of the SBR Connection ID is returned only
100 95
      try {
......
123 118
      // store SRB Connection in the session for later use if necessary
124 119
      this.session.putValue("srbconnection", new Integer(srbconn));
125 120
      return true; 
126
*/
127 121
    }
128 122

  
129
    // temp
130
    private void srbConnection () {
131
        try {
132
            PropertyResourceBundle SRBProps = null;
133
            // SRB properties that tells about the location of SRB RMI Server
134
            // srbProps.properties should reside on metacat server
135
            SRBProps = (PropertyResourceBundle)
136
                        PropertyResourceBundle.getBundle("srbProps.properties");
137
            srbHost = (String)SRBProps.handleGetObject("host");
138
            srbPort = (String)SRBProps.handleGetObject("port");
139
            // should handle missing RMIhost name here
140
            String RMIhost = (String)SRBProps.handleGetObject("RMIhost");
141
            String name = "//" + RMIhost + "/SrbJavaGlue";
142
            srbJG = (SrbJavaGlueInterface)Naming.lookup(name);
143
        } catch (Exception e) {
144
            System.out.println("MetaCatSession static: " + e.getMessage());
145
        }    
146
    }    
147
    
148 123
    /**
149 124
     * Invalidate this HTTPSession object. 
150 125
     * All objects stored in the session are unbound 

Also available in: Unified diff