Changeset 28985
- Timestamp:
- 2014-04-17T13:14:45+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/OAIServer.java
r28981 r28985 34 34 import org.greenstone.gsdl3.comms.Communicator; 35 35 import org.greenstone.gsdl3.comms.SOAPCommunicator; 36 import org.greenstone.gsdl3.core. MessageRouter;36 import org.greenstone.gsdl3.core.OAIMessageRouter; 37 37 import org.greenstone.gsdl3.core.OAIReceptionist; 38 38 import org.greenstone.gsdl3.util.GSConstants; … … 140 140 this.recept = new OAIReceptionist(); 141 141 142 // the receptionist uses a MessageRouter or Communicator to send its requests to. We either create aMessageRouter here for the designated site (if site_name set), or we create a Communicator for a remote site. The is given to teh Receptionist, and the servlet never talks to it again.directly.142 // the receptionist uses a OAIMessageRouter or Communicator to send its requests to. We either create a OAIMessageRouter here for the designated site (if site_name set), or we create a Communicator for a remote site. The is given to teh Receptionist, and the servlet never talks to it again.directly. 143 143 if (site_name != null) 144 144 { 145 145 //this site_name could consist of comma separated more than one site name. 146 146 String mr_name = (String) config.getInitParameter("messagerouter_class"); 147 MessageRouter message_router = null;147 OAIMessageRouter message_router = null; 148 148 if (mr_name == null) 149 149 { // just use the normal MR ********* 150 message_router = new MessageRouter();150 message_router = new OAIMessageRouter(); 151 151 } 152 152 else … … 154 154 try 155 155 { 156 message_router = ( MessageRouter) Class.forName("org.greenstone.gsdl3.core." + mr_name).newInstance();156 message_router = (OAIMessageRouter) Class.forName("org.greenstone.gsdl3.core." + mr_name).newInstance(); 157 157 } 158 158 catch (Exception e) 159 159 { // cant use this new one, so use normal one 160 logger.error("OAIServlet configure exception when trying to use a new MessageRouter " + mr_name, e);161 message_router = new MessageRouter();160 logger.error("OAIServlet configure exception when trying to use a new OAIMessageRouter " + mr_name, e); 161 message_router = new OAIMessageRouter(); 162 162 } 163 163 } 164 164 165 165 message_router.setSiteName(site_name); 166 // lots of work is done in this step; see MessageRouter.java166 // lots of work is done in this step; see OAIMessageRouter.java 167 167 if (!message_router.configure()) { 168 throw new UnavailableException("OAIServer: Couldn't configure MessageRouter");168 throw new UnavailableException("OAIServer: Couldn't configure OAIMessageRouter"); 169 169 } 170 170 this.recept.setSiteName(site_name);
Note:
See TracChangeset
for help on using the changeset viewer.