Top Description Fields Constructors Methods
org.springframework.ejb.config

pack-priv Class JndiLookupBeanDefinitionParser

extends AbstractJndiLocatingBeanDefinitionParser
Class Inheritance
Imports
org.w3c.dom.Element, org.springframework.beans.factory.config.RuntimeBeanReference, org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.beans.factory.xml.ParserContext, org.springframework.jndi.JndiObjectFactoryBean, org.springframework.util.StringUtils

Simple org.springframework.beans.factory.xml.BeanDefinitionParser implementation that translates jndi-lookup tag into JndiObjectFactoryBean definitions.
Authors
Rob Harrop, Juergen Hoeller
Since
2.0
See Also
JndiObjectFactoryBean

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String
Inherited from org.springframework.ejb.config.AbstractJndiLocatingBeanDefinitionParser:
ENVIRONMENTENVIRONMENT_REFJNDI_ENVIRONMENT

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
doParse(Element
the XML element being parsed
element
,
ParserContext
the object encapsulating the current state of the parsing process
parserContext
,
BeanDefinitionBuilder
used to define the BeanDefinition
builder
)

Overrides org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.doParse.

Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.
protected Class<?>
getBeanClass(Element
the Element that is being parsed
element
)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClass.

Determine the bean class corresponding to the supplied Element.
protected boolean
isEligibleAttribute(String
the attribute name taken straight from the XML element being parsed (never null)
attributeName
)

Overrides org.springframework.ejb.config.AbstractJndiLocatingBeanDefinitionParser.isEligibleAttribute.

Determine whether the given attribute is eligible for being turned into a corresponding bean property value.
Inherited from org.springframework.ejb.config.AbstractJndiLocatingBeanDefinitionParser:
postProcess

Field Detail

DEFAULT_OBJECTback to summary
public static final String DEFAULT_OBJECT
DEFAULT_REFback to summary
public static final String DEFAULT_REF
DEFAULT_VALUEback to summary
public static final String DEFAULT_VALUE

Constructor Detail

JndiLookupBeanDefinitionParserback to summary
pack-priv JndiLookupBeanDefinitionParser()

Method Detail

doParseback to summary
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)

Overrides org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.doParse.

Doc from org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.doParse.

Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.

This implementation maps any attributes present on the supplied element to org.springframework.beans.PropertyValue instances, and adds them to the builder.

The extractPropertyName(String) method is used to reconcile the name of an attribute with the name of a JavaBean property.

Parameters
element:Element

the XML element being parsed

parserContext:ParserContext

Doc from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.doParse.

the object encapsulating the current state of the parsing process

builder:BeanDefinitionBuilder

used to define the BeanDefinition

Annotations
@Override
getBeanClassback to summary
protected Class<?> getBeanClass(Element element)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClass.

Doc from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClass.

Determine the bean class corresponding to the supplied Element.

Note that, for application classes, it is generally preferable to override getBeanClassName instead, in order to avoid a direct dependence on the bean implementation class. The BeanDefinitionParser and its NamespaceHandler can be used within an IDE plugin then, even if the application classes are not available on the plugin's classpath.

Parameters
element:Element

the Element that is being parsed

Returns:Class<?>

the Class of the bean that is being defined via parsing the supplied Element, or null if none

Annotations
@Override
isEligibleAttributeback to summary
protected boolean isEligibleAttribute(String attributeName)

Overrides org.springframework.ejb.config.AbstractJndiLocatingBeanDefinitionParser.isEligibleAttribute.

Doc from org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser.isEligibleAttribute.

Determine whether the given attribute is eligible for being turned into a corresponding bean property value.

The default implementation considers any attribute as eligible, except for the "id" attribute.

Parameters
attributeName:String

the attribute name taken straight from the XML element being parsed (never null)

Annotations
@Override