Java Reference
In-Depth Information
<bean name="underwritingBusinessDelegate"
class="com.apress.insurance.view.delegate.UnderWritingBusinessDelegate">
<property name="uwrLocalHome" ref="uwrSlsbLocalHome" />
</bean>
<bean id="lazyJndiObjectFactoryBean" abstract="true"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="cache" value="false" />
<property name="lookupOnStartup" value="false" />
</bean>
<bean id="uwrSlsbLocalHome" parent="lazyJndiObjectFactoryBean">
<property name="jndiName" value="UnderwritingBeanLocal" />
<property name="proxyInterface"
value="com.apress.einsure.business.ejbfacade.UnderwritingLocalHome" />
</bean>
<bean id="claimSlsbLocalHome" parent="lazyJndiObjectFactoryBean">
<property name="jndiName" value="ClaimBeanLocal" />
<property name="proxyInterface"
value="com.apress.einsure.business.ejbfacade.ClaimLocalHome" />
</bean>
</beans>
Spring 2.
x
introduces the new
jee
tag, which makes it even simpler to look up JNDI
objects.
Listing 4-10 shows how you can use this new tag to look up the stateless session
beans. Note that in order to use this tag, you need to modify the configuration file to
include the
jee
namespace and schema location.
Listing 4-10.
insurance-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="
http://www.springframework.org/schema/beans"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="
http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
>
<!- - local ejb lookup - ->
