Hi
I am testing Object Pooling using the Commons framework from Apache (Spring 1.2.8)
The applicationContext.xml looks like this (see bold below):
<beans>
<bean id="pooledBean" class="com.winterthur.test.web.spring.TestPooledBe an" singleton="false">
</bean>
<bean id="poolTargetSource" class="org.framework.aop.target.CommonsPoolTargetS ource">
<property name="targetBeanName" value="pooledBean"/>
<property name="minSize" value="2"/>
<property name="maxSize" value="10"/>
</bean>
<bean id="pool" class="org.springframework.aop.framewokr.ProxyFact oryBean">
<property name="targetSource" ref="poolTargetSource"/>
</bean>
</beans>
When I start my web application inside of Ecplise I am getting the following exception - though I don't see any settings for minimum size:
[7/17/06 9:00:44:281 CDT] 00000019 DefaultListab I Destroying singletons in factory {org.springframework.beans.factory.support.Default ListableBeanFactory defining beans [EIServiceBean,poolTargetSource,EIServiceProxy,EIOb jectPool,eiObjectFactory]; root of BeanFactory hierarchy}
[7/17/06 9:00:44:296 CDT] 00000019 ContextLoader E Context initialization failed
[7/17/06 9:00:44:359 CDT] 00000019 ContextLoader E TRAS0014I: The following exception was logged org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'poolTargetSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'minSize' of bean class [org.springframework.aop.target.CommonsPoolTargetSo urce]: Bean property 'minSize' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'minSize' of bean class [org.springframework.aop.target.CommonsPoolTargetSo urce]: Bean property 'minSize' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:670)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:572)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:737)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValues(BeanWrapperImpl.java:764)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValues(BeanWrapperImpl.java:753)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:857)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:378)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:283)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:313)
at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServle tContextCreated(WebApp.java:1355)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(W ebApp.java:371)
at com.ibm.ws.webcontainer.webapp.WebGroup.addWebAppl ication(WebGroup.java:114)
at com.ibm.ws.webcontainer.VirtualHost.addWebApplicat ion(VirtualHost.java:127)
at com.ibm.ws.webcontainer.WebContainer.addWebApp(Web Container.java:776)
at com.ibm.ws.webcontainer.WebContainer.addWebApplica tion(WebContainer.java:729)
at com.ibm.ws.runtime.component.WebContainerImpl.inst all(WebContainerImpl.java:140)
at com.ibm.ws.runtime.component.WebContainerImpl.star t(WebContainerImpl.java:360)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.st art(ApplicationMgrImpl.java:1019)
at com.ibm.ws.runtime.component.DeployedApplicationIm pl.fireDeployedObjectStart(DeployedApplicationImpl .java:1028)
at com.ibm.ws.runtime.component.DeployedModuleImpl.st art(DeployedModuleImpl.java:538)
at com.ibm.ws.runtime.component.DeployedApplicationIm pl.start(DeployedApplicationImpl.java:724)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.st artApplication(ApplicationMgrImpl.java:683)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$Ap pInitializer.run(ApplicationMgrImpl.java:1678)
at com.ibm.ws.runtime.component.ComponentImpl$_Asynch Initializer.run(ComponentImpl.java:304)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1332)
.


Reply With Quote
