Changeset 28985

Show
Ignore:
Timestamp:
17.04.2014 13:14:45 (5 years ago)
Author:
kjdon
Message:

use OAIMessageRouter instead of MessageRouter?. this will use OAICollection. then only the oai services will be loaded, not other colleciton services or site wide services, none of which are needed for oai server

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/OAIServer.java

    r28981 r28985  
    3434import org.greenstone.gsdl3.comms.Communicator; 
    3535import org.greenstone.gsdl3.comms.SOAPCommunicator; 
    36 import org.greenstone.gsdl3.core.MessageRouter; 
     36import org.greenstone.gsdl3.core.OAIMessageRouter; 
    3737import org.greenstone.gsdl3.core.OAIReceptionist; 
    3838import org.greenstone.gsdl3.util.GSConstants; 
     
    140140        this.recept = new OAIReceptionist(); 
    141141 
    142         // the receptionist uses a MessageRouter or Communicator to send its requests to. We either create a MessageRouter 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. 
    143143        if (site_name != null) 
    144144        { 
    145145            //this site_name could consist of comma separated more than one site name. 
    146146            String mr_name = (String) config.getInitParameter("messagerouter_class"); 
    147             MessageRouter message_router = null; 
     147            OAIMessageRouter message_router = null; 
    148148            if (mr_name == null) 
    149149            { // just use the normal MR ********* 
    150                 message_router = new MessageRouter(); 
     150                message_router = new OAIMessageRouter(); 
    151151            } 
    152152            else 
     
    154154                try 
    155155                { 
    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(); 
    157157                } 
    158158                catch (Exception e) 
    159159                { // 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(); 
    162162                } 
    163163            } 
    164164 
    165165            message_router.setSiteName(site_name); 
    166             // lots of work is done in this step; see MessageRouter.java 
     166            // lots of work is done in this step; see OAIMessageRouter.java 
    167167            if (!message_router.configure()) { 
    168               throw new UnavailableException("OAIServer: Couldn't configure MessageRouter"); 
     168              throw new UnavailableException("OAIServer: Couldn't configure OAIMessageRouter"); 
    169169            } 
    170170            this.recept.setSiteName(site_name);