Type converters and the Blueprint Container

During injection, the Blueprint Container converts the XML value elements into value objects that are injected into the manager components. The elements are converted based on the type of the injected property.

The Blueprint Container provides the following built-in conversions:

The Blueprint Container also supports generics. If the generics information is available, the Blueprint Container uses that information for the conversions. For example, in the following Blueprint XML example code, the list element is converted into a list of java.util.Long objects.

public class AccountManager {      
   ...
      public void setAccountNumbers(List<Long> accounts) {
         ...
      }
}
<bean id=”accountManagerFour” class=“org.apache.aries.AccountManager”>
   <property name=”accountNumbers”>
      <list>
         <value>123</value>
         <value>456</value>
         <value>789</value>
      </list>
   </property>
</bean>

A Blueprint bundle can also provide its own converters. The custom converters are bean managers that provide an object that implements the Blueprint Converter interface. Specify the custom converters in the type-converters element under the Blueprint element. When the Blueprint Container is initialized, the type converters are initialized first, so that other managers can use the custom converters. For further details, see the Blueprint Container specification.


Icon that indicates the type of topic Concept topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-iseries&topic=ca_blueprint_type
File name: ca_blueprint_type.html