[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: AbstractCollectionMetaData fails with optional add() ope

alesj do-not-reply at jboss.com
Wed Jul 4 08:34:01 EDT 2007


"adrian at jboss.org" wrote : In fact, the solution should really be that the type specified on the collection
  | overrides this feature. But currently this is not the case.
  | 
  | i.e. the following should always create a new array list not use the getter.
  | 
  | 
  |   | <?xml version="1.0" encoding="UTF-8"?>
  |   | 
  |   | <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |   |             xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
  |   |             xmlns="urn:jboss:bean-deployer:2.0">
  |   | 
  |   | 
  |   |   <bean name = "Manager" class = "PluginManager">
  |   |     <property name = "bootstrapPlugins">
  |   |       <list elementClass = "java.lang.String" class="java.util.ArrayList">
  |   |         <value>Test</value>
  |   |       </list>
  |   |     </property>
  |   |   </bean>
  |   | 
  |   | </deployment>
  |   | 

I'll turn the 'preinstantiate' to false by default.
So this will then work out-of-the-box.
And if you explicitly tell to use preinstantiated, then the class attribute will be ignored in the case getter returns non null instance.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060425#4060425

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060425



More information about the jboss-dev-forums mailing list