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/components/prefs/src/java/org/apache/jetspeed/containers prefs.container.groovy
Date Fri, 27 Feb 2004 18:31:16 GMT
weaver      2004/02/27 10:31:16

  Modified:    components/prefs/src/java/org/apache/jetspeed/containers
                        prefs.container.groovy
  Log:
  - removed HSQL references from .groovy script
  
  Revision  Changes    Path
  1.2       +8 -10     jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/containers/prefs.container.groovy
  
  Index: prefs.container.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/containers/prefs.container.groovy,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- prefs.container.groovy	26 Feb 2004 04:30:46 -0000	1.1
  +++ prefs.container.groovy	27 Feb 2004 18:31:16 -0000	1.2
  @@ -36,14 +36,15 @@
   container = new DefaultPicoContainer()
   
   
  -// This is the HSQL engine that holds the test prefs
  -if(new File("../../portal/test/db/hsql").exists())
  -{
  -   container.registerComponentInstance(new HSQLServerComponent(9001, "sa","","../../portal/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
  @@ -51,9 +52,6 @@
   Class tyrexJndiClass = Class.forName("org.apache.jetspeed.components.jndi.TyrexJNDIComponent")
   container.registerComponentImplementation(jndiClass, tyrexJndiClass)
   
  -// Create a datasource based on the HSQL server we just created
  -Class dsClass = Class.forName("org.apache.jetspeed.components.datasource.DatasourceComponent")
  -container.registerComponentInstance(dsClass, new DBCPDatasourceComponent("sa","", "org.hsqldb.jdbcDriver",
"jdbc:hsqldb:hsql://127.0.0.1", 20, 5000, GenericObjectPool.WHEN_EXHAUSTED_GROW, true))
   
   //
   // Persistence
  
  
  

---------------------------------------------------------------------
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