Configuracion faces-config.xml

agey
18 de Febrero del 2010
Hola a todos,



Quiero implementar una peque帽a aplicaci贸n web con J2EE. He creado los DAOs, los Services y estoy con los Beans que controlar谩n las jsp. He hecho pruebas unitarias con JUnit en los DAOS y Services y funcionan pero cuando los llamo desde la JSP me devuelve un error por null al llamar al Service correspondiente (UserService). Estoy casi segura de que es por la configuraci贸n pero non encuentro el problema. Os pongo aqu铆 la configuraci贸n a ver si me podeis ayudar. Muchas Gracias.

faces-config.xml

<managed-bean>
<managed-bean-name>LoginBean</managed-bean-name>
<managed-bean-class>org.sm.khp.web.beans.LoginBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>userSession</property-name>
<value>#{UserSession}</value>
</managed-property>
<managed-property>
<property-name>userService</property-name>
<value>#{UserService}</value>
</managed-property>
</managed-bean>

applicationContext.xml

<bean id="UserService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.sm.khp.services.userservices.UserService</value>
</property>
<property name="transactionManager"><ref local="transactionManager"/></property>
<property name="target"><ref local="UserServiceImpl"/></property>
<property name="transactionAttributes">
<props>
<prop key="list*">readOnly, PROPAGATION_SUPPORTS, ISOLATION_DEFAULT</prop>
<prop key="show*">readOnly, PROPAGATION_SUPPORTS, ISOLATION_DEFAULT</prop>
<prop key="exist*">readOnly, PROPAGATION_SUPPORTS, ISOLATION_DEFAULT</prop>
<prop key="create*">PROPAGATION_REQUIRED, ISOLATION_DEFAULT</prop>
<prop key="register*">PROPAGATION_REQUIRED, ISOLATION_DEFAULT</prop>
</props>
</property>
</bean>

<bean id="UserServiceImpl" class="org.sm.khp.services.userservices.UserServiceImpl">

<property name="userDao">
<ref bean="UserDao" />
</property>

</bean>