portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/containers profiler-container.groovy
Date Fri, 27 Feb 2004 18:59:02 GMT
weaver      2004/02/27 10:59:02

  Modified:    portal/src/java/org/apache/jetspeed/profiler/containers
                        profiler-container.groovy
  Log:
  - removed HSQL references from .groovy script
  
  Revision  Changes    Path
  1.2       +13 -9     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/containers/profiler-container.groovy
  
  Index: profiler-container.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/profiler/containers/profiler-container.groovy,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- profiler-container.groovy	25 Feb 2004 22:22:04 -0000	1.1
  +++ profiler-container.groovy	27 Feb 2004 18:59:02 -0000	1.2
  @@ -5,8 +5,6 @@
   import org.picocontainer.defaults.ConstantParameter
   import org.picocontainer.defaults.ComponentParameter
   import org.hsqldb.jdbcDriver
  -import org.apache.jetspeed.components.hsql.HSQLServerComponent
  -import org.apache.jetspeed.components.hsql.HSQLServerComponent
   import org.apache.jetspeed.components.jndi.JNDIComponent
   import org.apache.jetspeed.components.jndi.TyrexJNDIComponent
   import org.apache.jetspeed.components.datasource.DBCPDatasourceComponent
  @@ -26,15 +24,21 @@
   // create the root container
   container = new DefaultPicoContainer()
   
  +Class dsClass = Class.forName("org.apache.jetspeed.components.datasource.DatasourceComponent")
  +String url = System.getProperty("org.apache.jetspeed.database.url")
  +String driver = System.getProperty("org.apache.jetspeed.database.driver")
  +String user = System.getProperty("org.apache.jetspeed.database.user")
  +String password = System.getProperty("org.apache.jetspeed.database.password")
   
  -// This is the HSQL engine that holds the test registry
  -if(new File("./test/db/hsql").exists())
  -{
  -   container.registerComponentInstance(new HSQLServerComponent(9001, "sa","","./test/db/hsql/Registry",false,
true))
  -}
  -else
  +Class dsClass = Class.forName("org.apache.jetspeed.components.datasource.DatasourceComponent")
  +String url = System.getProperty("org.apache.jetspeed.database.url")
  +String driver = System.getProperty("org.apache.jetspeed.database.driver")
  +String user = System.getProperty("org.apache.jetspeed.database.user")
  +String password = System.getProperty("org.apache.jetspeed.database.password")
  +
  +if(url != null)
   {
  -   container.registerComponentInstance(new HSQLServerComponent(9001, "sa","","./portal/test/db/hsql/Registry",false,
true))
  +	container.registerComponentInstance(dsClass, new DBCPDatasourceComponent(user, password,
driver, url, 20, 5000, GenericObjectPool.WHEN_EXHAUSTED_GROW, true))
   }
   
   // This JNDI component helps us publish the datasource
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message