portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/prefs/src/test/org/apache/jetspeed/containers test.prefs.groovy
Date Tue, 09 Mar 2004 22:33:26 GMT
dlestrat    2004/03/09 14:33:26

  Added:       components/prefs/src/test/org/apache/jetspeed/containers
                        test.prefs.groovy
  Log:
  Now using container assembly.
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/components/prefs/src/test/org/apache/jetspeed/containers/test.prefs.groovy
  
  Index: test.prefs.groovy
  ===================================================================
  import org.picocontainer.defaults.DefaultPicoContainer
  
  import org.apache.jetspeed.components.util.NanoQuickAssembler
  import java.io.File
  
  // WARNING!!!!!!
  // DO NOT use {Class}.class as it appears to be broken in Groovy
  // You end getting a Class instance of the type java.lang.Class
  // instead of the requested type!  This causes AssignabilityExceptions
  // in pico.  You need to use Class.forName() instead.
  
  
  
  // create the root container
  container = new DefaultPicoContainer()
  
  ClassLoader cl = Thread.currentThread().getContextClassLoader()
  
  NanoQuickAssembler.assemble(cl, "org/apache/jetspeed/containers/rdbms.container.groovy",
container)
  
  NanoQuickAssembler.assemble(cl, "org/apache/jetspeed/containers/persistence.container.groovy",
container)
  
  //
  // Preferences
  //
  
  NanoQuickAssembler.assemble(cl, "org/apache/jetspeed/containers/prefs.container.groovy",
container)
  
  //
  // Do not forget to get component instance.
  //
  //container.getComponentInstance(PreferencesProvider);
  
  return container
  
  
  

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