juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svi...@apache.org
Subject cvs commit: ws-juddi/src/java/org/apache/juddi/registry RegistryServlet.java
Date Thu, 03 Jun 2004 14:35:05 GMT
sviens      2004/06/03 07:35:05

  Modified:    src/java/org/apache/juddi/registry RegistryServlet.java
  Log:
  All core jUDDI property values for a Registry are set when a juddi.properties file doesn't
exist in the WEB-INF directory. Added more comments.
  
  Revision  Changes    Path
  1.2       +69 -23    ws-juddi/src/java/org/apache/juddi/registry/RegistryServlet.java
  
  Index: RegistryServlet.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/registry/RegistryServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RegistryServlet.java	3 Jun 2004 02:54:57 -0000	1.1
  +++ RegistryServlet.java	3 Jun 2004 14:35:05 -0000	1.2
  @@ -61,9 +61,8 @@
   
       log.info("jUDDI Starting: Initializing resources and subsystems.");
   
  -    // Import jUDDI configuration from the 
  -    // juddi.properties file found in the 
  -    // WEB-INF directory.
  +    // Calculate the path to the juddi.properties 
  +    // file found in the WEB-INF directory.
   
       StringBuffer propFilePath = new StringBuffer(255);
       propFilePath.append(getServletContext().getRealPath("/"));
  @@ -102,6 +101,7 @@
     {
       if (registry == null)
         registry = createRegistry();
  +    
       return registry;
     }
   
  @@ -118,29 +118,75 @@
       try
       {      
         if (propertyFile.exists())
  -        props.load(new FileInputStream(propertyFile));
  +      {
  +        // Import jUDDI configuration from the 
  +        // juddi.properties file found in the 
  +        // WEB-INF directory.
  +
  +      	props.load(new FileInputStream(propertyFile));
  +      }
         else
         {
  -        props.put("juddi.operatorName","Apache.org");        
  -        props.put("juddi.operatorSiteURL","http://localhost:8080/juddi");
  -        props.put("juddi.adminEmailAddress","nobody@apache.org");
  -        props.put("juddi.dataSource","java:comp/env/jdbc/juddiDB");
  -        props.put("juddi.useConnectionPool","false"); // ??
  +        // A juddi.properties file doesn't exist
  +      	// yet so create one in the WEB-INF directory
  +      	// populated with default properties.
  +      	
  +        props.put(RegistryEngine.PROPNAME_OPERATOR_NAME,
  +        		      RegistryEngine.DEFAULT_OPERATOR_NAME);
  +        
  +        props.put(RegistryEngine.PROPNAME_OPERATOR_URL,
  +        		      RegistryEngine.DEFAULT_OPERATOR_URL);
  +        
  +        props.put(RegistryEngine.PROPNAME_ADMIN_EMAIL_ADDRESS,
  +        		      RegistryEngine.DEFAULT_ADMIN_EMAIL_ADDRESS);
  +        
  +        props.put(RegistryEngine.PROPNAME_DATASOURCE_NAME,
  +        		      RegistryEngine.DEFAULT_DATASOURCE_NAME);
                 
  -        props.put("juddi.auth","org.apache.juddi.auth.DefaultAuthenticator");
  -        props.put("juddi.cryptor","org.apache.juddi.cryptor.DefaultCryptor");
  -        props.put("juddi.dataStore","org.apache.juddi.datastore.jdbc.JDBCDataStore");
  -        //props.put("juddi.monitor","org.apache.juddi.monitor.jdbc.JDBCMonitor");
  -        props.put("juddi.uuidgen","org.apache.juddi.uuidgen.DefaultUUIDGen");
  -        props.put("juddi.validator","org.apache.juddi.validator.DefaultValidator");  
  -
  -        props.put("juddi.maxNameLength","255");
  -        props.put("juddi.maxNameElementsAllowed","5");
  -        props.put("juddi.maxBusinessEntitiesPerUser","25");
  -        props.put("juddi.maxBusinessServicesPerBusiness","20");
  -        props.put("juddi.maxBindingTemplatesPerService","10");
  -        props.put("juddi.maxTModelsPerUser","100");
  -        props.put("juddi.maxRowsLimit","10");
  +        props.put(RegistryEngine.PROPNAME_AUTH_CLASS_NAME,
  +        		      RegistryEngine.DEFAULT_AUTH_CLASS_NAME);
  +        
  +        props.put(RegistryEngine.PROPNAME_CRYPTOR_CLASS_NAME,
  +        		      RegistryEngine.DEFAULT_CRYPTOR_CLASS_NAME);
  +        
  +        props.put(RegistryEngine.PROPNAME_DATASTORE_CLASS_NAME,
  +        		      RegistryEngine.DEFAULT_DATASTORE_CLASS_NAME);
  +        
  +        props.put(RegistryEngine.PROPNAME_MONITOR_CLASS_NAME,
  +        		      RegistryEngine.DEFAULT_MONITOR_CLASS_NAME);
  +        
  +        props.put(RegistryEngine.PROPNAME_UUIDGEN_CLASS_NAME,
  +        		      RegistryEngine.DEFAULT_UUIDGEN_CLASS_NAME);
  +        
  +        props.put(RegistryEngine.PROPNAME_VALIDATOR_CLASS_NAME,
  +        		      RegistryEngine.DEFAULT_VALIDATOR_CLASS_NAME);  
  +
  +        props.put(RegistryEngine.PROPNAME_MAX_NAME_ELEMENTS,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_NAME_ELEMENTS));
  +        
  +        props.put(RegistryEngine.PROPNAME_MAX_NAME_LENGTH,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_NAME_LENGTH));
  +
  +        props.put(RegistryEngine.PROPNAME_MAX_MESSAGE_SIZE,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_MESSAGE_SIZE));        
  +
  +        props.put(RegistryEngine.PROPNAME_MAX_BUSINESS_ENTITIES_PER_USER,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_BUSINESS_ENTITIES_PER_USER));
  +        
  +        props.put(RegistryEngine.PROPNAME_MAX_BUSINESS_SERVICES_PER_BUSINESS,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_BUSINESS_SERVICES_PER_BUSINESS));
  +        
  +        props.put(RegistryEngine.PROPNAME_MAX_BINDING_TEMPLATES_PER_SERVICE,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_BINDING_TEMPLATES_PER_SERVICE));
  +        
  +        props.put(RegistryEngine.PROPNAME_MAX_TMODELS_PER_USER,
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_TMODELS_PER_USER));
  +        
  +        props.put(RegistryEngine.PROPNAME_MAX_ROWS_LIMIT,        		
  +        		      Integer.toString(RegistryEngine.DEFAULT_MAX_ROWS_LIMIT));
  +        
  +        // Create a new "juddi.properties" file in
  +        // the WEB-INF directory.
           
           props.store(new FileOutputStream(propertyFile),"");
         }
  
  
  

Mime
View raw message