FUSE ESB 4.2 XML Configuration Reference

http://www.springframework.org/schema/beans
element bean

Model
<bean
  abstract = boolean
  autowire = "default" | "no" | "byName" | "byType" | "constructor" : "default"
  autowire-candidate = "default" | "true" | "false" : "default"
  class = string
  depends-on = string
  destroy-method = string
  factory-bean = string
  factory-method = string
  id = ID
  init-method = string
  lazy-init = "default" | "true" | "false" : "default"
  name = string
  parent = string
  primary = boolean
  scope = string
  (any attribute from any namespace other than http://www.springframework.org/schema/beans)>
description?, (meta | constructor-arg | property | qualifier | lookup-method | replaced-method | (any element from any namespace other than http://www.springframework.org/schema/beans))*
</bean>
Disallowed substitutions (block)
none (extensions, restrictions and substitutions are allowed)
Substitution group exclusion (final)
none (extensions and restrictions are allowed)
Content Type
element-only content, not nillable.
Usage
This element can be the root element of XML instance documents.
This element can be a child of the following elements: interceptToEndpoint, setHeader, loop, removeProperty, intercept, setBody, setExchangePattern, policy, interceptFrom, aop, doCatch, sample, aggregate, doFinally, filter, doTry, multicast, throttle, stop, split, idempotentConsumer, process, recipientList, route, threads, enrich, resequence, removeHeader, otherwise, pipeline, setProperty, sort, transacted, onCompletion, delay, unmarshal, transform, pollEnrich, marshal, when, setOutHeader, onException, loadBalance, bean, onExceptionDefinition/onWhen, onCompletionDefinition/onWhen, catchDefinition/onWhen, camelContextFactoryBean/interceptSendToEndpoint, array, list, property, key, set, beans, entry, constructor-arg.
Documentation
	Defines a single (usually named) bean.

	A bean definition may contain nested tags for constructor arguments,
	property values, lookup methods, and replaced methods. Mixing constructor
	injection and setter injection on the same bean is explicitly supported.
			
See also
java:org.springframework.beans.factory.config.BeanDefinition

Nested Element Summary
sequence
beanElements
anonymous type derived from anyTypedescription optional
          Contains informative text describing the purpose of the enclosing element.
choice
0...∞
metaTypemeta
           Arbitrary metadata attached to a bean definition.
anonymous type derived from anyTypeconstructor-arg
          Bean definitions can specify zero or more constructor arguments.
propertyTypeproperty
          Bean definitions can have zero or more properties.
anonymous type derived from anyTypequalifier
           Bean definitions can provide qualifiers to match against annotations on a field or parameter for fine-grained autowire candidate resolution.
anonymous type derived from anyTypelookup-method
          A lookup method causes the IoC container to override the given method and return the bean with the name given in the bean attribute.
anonymous type derived from anyTypereplaced-method
          Similar to the lookup method mechanism, the replaced-method element is used to control IoC container method overriding: Method Injection.


Attribute Summary
booleanabstract
          Is this bean "abstract", that is, not meant to be instantiated itself but rather just serving as parent for concrete child bean definitions? The default is "false".
anonymous type derived from NMTOKENautowire
          Controls whether bean properties are "autowired".
defaultable-booleanautowire-candidate
          Indicates whether or not this bean should be considered when looking for matching candidates to satisfy another bean's autowiring requirements.
stringclass
           The fully qualified name of the bean's class, except if it serves only as a parent definition for child bean definitions.
stringdepends-on
          The names of the beans that this bean depends on being initialized.
stringdestroy-method
          The name of the custom destroy method to invoke on bean factory shutdown.
stringfactory-bean
          Alternative to class attribute for factory-method usage.
stringfactory-method
          The name of a factory method to use to create this object.
IDid
           The unique identifier for a bean.
stringinit-method
          The name of the custom initialization method to invoke after setting bean properties.
defaultable-booleanlazy-init
          Indicates whether or not this bean is to be lazily initialized.
stringname
          Can be used to create one or more aliases illegal in an (XML) id.
stringparent
          The name of the parent bean definition.
booleanprimary
          Specifies that this bean should be given preference when multiple candidates are qualified to autowire a single-valued dependency.
stringscope
          The scope of this bean: typically "singleton" (one shared instance, which will be returned by all calls to getBean with the given id), or "prototype" (independent instance resulting from each call to getBean).

Attribute Detail

abstract

Documentation
	Is this bean "abstract", that is, not meant to be instantiated itself
	but rather just serving as parent for concrete child bean definitions?
	The default is "false". Specify "true" to tell the bean factory to not
	try to instantiate that particular bean in any case.

	Note: This attribute will not be inherited by child bean definitions.
	Hence, it needs to be specified per abstract bean definition.
				
Definition

Defined with global type boolean

Namespace
no namespace
Model
boolean
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, finit value space
White Space Processing
collapse

autowire

Documentation
	Controls whether bean properties are "autowired".
	This is an automagical process in which bean references don't need
	to be coded explicitly in the XML bean definition file, but rather the
	Spring container works out dependencies.

	There are 4 modes:

	1. "no"
	The traditional Spring default. No automagical wiring. Bean references
	must be defined in the XML file via the <ref/> element (or "ref"
	attribute). We recommend this in most cases as it makes documentation
	more explicit.

	Note that this default mode also allows for annotation-driven autowiring,
	if activated. "no" refers to externally driven autowiring only, not
	affecting any autowiring demands that the bean class itself expresses.

	2. "byName"
	Autowiring by property name. If a bean of class Cat exposes a "dog"
	property, Spring will try to set this to the value of the bean "dog"
	in the current container. If there is no matching bean by name, nothing
	special happens.

	3. "byType"
	Autowiring if there is exactly one bean of the property type in the
	container. If there is more than one, a fatal error is raised, and
	you cannot use byType autowiring for that bean. If there is none,
	nothing special happens.

	4. "constructor"
	Analogous to "byType" for constructor arguments. If there is not exactly
	one bean of the constructor argument type in the bean factory, a fatal
	error is raised.

	Note that explicit dependencies, i.e. "property" and "constructor-arg"
	elements, always override autowiring.

	Note: This attribute will not be inherited by child bean definitions.
	Hence, it needs to be specified per concrete bean definition.
				
Namespace
no namespace
Model
"default" | "no" | "byName" | "byType" | "constructor"
Default Value
"default"
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse
Enumeration Facet
"default", "no", "byName", "byType", "constructor"
Pattern Facet
\c+

autowire-candidate

Documentation
	Indicates whether or not this bean should be considered when looking
	for matching candidates to satisfy another bean's autowiring requirements.
	Note that this does not affect explicit references by name, which will get
	resolved even if the specified bean is not marked as an autowire candidate.
				
Definition

Defined with global type defaultable-boolean

Namespace
no namespace
Model
"default" | "true" | "false"
Default Value
"default"
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

class

Documentation
	The fully qualified name of the bean's class, except if it serves only
	as a parent definition for child bean definitions.
				
See also
java:java.lang.Class
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

depends-on

Documentation
	The names of the beans that this bean depends on being initialized.
	The bean factory will guarantee that these beans get initialized
	before this bean.

	Note that dependencies are normally expressed through bean properties
	or constructor arguments. This property should just be necessary for
	other kinds of dependencies like statics (*ugh*) or database preparation
	on startup.

	Note: This attribute will not be inherited by child bean definitions.
	Hence, it needs to be specified per concrete bean definition.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

destroy-method

Documentation
	The name of the custom destroy method to invoke on bean factory
	shutdown. The method must have no arguments, but may throw any
	exception.

	Note: Only invoked on beans whose lifecycle is under the full
	control of the factory - which is always the case for singletons,
	but not guaranteed for any other scope.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

factory-bean

Documentation
	Alternative to class attribute for factory-method usage.
	If this is specified, no class attribute should be used.
	This must be set to the name of a bean in the current or
	ancestor factories that contains the relevant factory method.
	This allows the factory itself to be configured using Dependency
	Injection, and an instance (rather than static) method to be used.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

factory-method

Documentation
	The name of a factory method to use to create this object. Use
	constructor-arg elements to specify arguments to the factory method,
	if it takes arguments. Autowiring does not apply to factory methods.

	If the "class" attribute is present, the factory method will be a static
	method on the class specified by the "class" attribute on this bean
	definition. Often this will be the same class as that of the constructed
	object - for example, when the factory method is used as an alternative
	to a constructor. However, it may be on a different class. In that case,
	the created object will *not* be of the class specified in the "class"
	attribute. This is analogous to FactoryBean behavior.

	If the "factory-bean" attribute is present, the "class" attribute is not
	used, and the factory method will be an instance method on the object
	returned from a getBean call with the specified bean name. The factory
	bean may be defined as a singleton or a prototype.

	The factory method can have any number of arguments. Autowiring is not
	supported. Use indexed constructor-arg elements in conjunction with the
	factory-method attribute.

	Setter Injection can be used in conjunction with a factory method.
	Method Injection cannot, as the factory method returns an instance,
	which will be used when the container creates the bean.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

id

Documentation
	The unique identifier for a bean.
				
Definition

Defined with global type ID

Model
ID
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

init-method

Documentation
	The name of the custom initialization method to invoke after setting
	bean properties. The method must have no arguments, but may throw any
	exception.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

lazy-init

Documentation
	Indicates whether or not this bean is to be lazily initialized.
	If false, it will be instantiated on startup by bean factories
	that perform eager initialization of singletons. The default is
	"false".

	Note: This attribute will not be inherited by child bean definitions.
	Hence, it needs to be specified per concrete bean definition.
				
Definition

Defined with global type defaultable-boolean

Namespace
no namespace
Model
"default" | "true" | "false"
Default Value
"default"
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

name

Documentation
	Can be used to create one or more aliases illegal in an (XML) id.
	Multiple aliases can be separated by any number of spaces, commas,
	or semi-colons (or indeed any mixture of the three).
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

parent

Documentation
	The name of the parent bean definition.

	Will use the bean class of the parent if none is specified, but can
	also override it. In the latter case, the child bean class must be
	compatible with the parent, i.e. accept the parent's property values
	and constructor argument values, if any.

	A child bean definition will inherit constructor argument values,
	property values and method overrides from the parent, with the option
	to add new values. If init method, destroy method, factory bean and/or
	factory method are specified, they will override the corresponding
	parent settings.

	The remaining settings will always be taken from the child definition:
	depends on, autowire mode, scope, lazy init.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

primary

Documentation
	Specifies that this bean should be given preference when multiple
	candidates are qualified to autowire a single-valued dependency.
	If exactly one 'primary' bean exists among the candidates, it
	will be the autowired value.
				
Definition

Defined with global type boolean

Namespace
no namespace
Model
boolean
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, finit value space
White Space Processing
collapse

scope

Documentation
	The scope of this bean: typically "singleton" (one shared instance,
	which will be returned by all calls to getBean with the given id), or
	"prototype" (independent instance resulting from each call to getBean).

	By default, a bean will be a singleton, unless the bean has a parent
	bean definition in which case it will inherit the parent's scope.

	Singletons are most commonly used, and are ideal for multi-threaded
	service objects. Further scopes, such as "request" or "session", might
	be supported by extended bean factories (e.g. in a web environment).

	Inner bean definitions inherit the singleton status of their containing
	bean definition, unless explicitly specified: The inner bean will be a
	singleton if the containing bean is a singleton, and a prototype if
	the containing bean has any other scope.
				
Definition

Defined with global type string

Namespace
no namespace
Model
string
Attribute Usage
optional
Fundamental Facets
equality, non-numeric, unbounded, unordered, countable infinite value space
White Space Processing
collapse

FUSE ESB 4.2 XML Configuration Reference

FUSE ESB 4.2 XML Configuration Reference