Java Reference
In-Depth Information
public PolicyDetailDao getPolicyDetailDao() {
return policyDetailDao;
public void setPolicyDetailDao(PolicyDetailDao policyDetailDao) {
this.policyDetailDao = policyDetailDao;
The PolicyDetailDao is injected in the application service by the Spring container.
The data access object also needs a data source to save data. This is shown in the EJB
application context configuration in Listing 4-23.
Listing 4-23. Underwriting-beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
<bean id="uwrBusinessService"
<property name="policyDetailDao" ref="policyDetailDao"/>
<! - - Data access object - ->
<bean id="policyDetailDao"
<property name="dataSource" ref="datasource"/>
<!- - Lookup JNDI bound datasource - - >
<bean id="datasource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="einsureDatasource" />
<property name="jndiEnvironment">
Search WWH ::

Custom Search