geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r148871 - /geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java
Date Fri, 28 Jan 2005 10:27:06 GMT
Author: jules
Date: Fri Jan 28 02:27:04 2005
New Revision: 148871

URL: http://svn.apache.org/viewcvs?view=rev&rev=148871
Log:
force the construction of all Spring defined beans - until a better way comes along.

Modified:
   geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java

Modified: geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java?view=diff&rev=148871&p1=geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java&r1=148870&p2=geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java&r2=148871
==============================================================================
--- geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java
(original)
+++ geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java
Fri Jan 28 02:27:04 2005
@@ -142,6 +142,12 @@
       xbdr.setBeanClassLoader(cl);
       xbdr.loadBeanDefinitions(new ClassPathResource("META-INF/spring.xml", cl));
 
+      // force lazy construction of every bean described...
+      DefaultListableBeanFactory dlbf=(DefaultListableBeanFactory)xbdr.getBeanFactory();
+      String[] ids=dlbf.getBeanDefinitionNames();
+      for (int i=ids.length; i>0; i--)
+	dlbf.getBean(ids[i-1]);
+
       ObjectName name=new ObjectName("geronimo.config", "name", sprFile.getName());
       GBeanData gbeanData = new GBeanData(name, org.apache.geronimo.j2ee.management.impl.SpringApplicationImpl.GBEAN_INFO);
 

Mime
View raw message