Thanks a lot for all of you, I modify my code, and I had an org.springframework.beans.factory.BeanCreationExce ption:
Code:
Resource resource = new ClassPathResource("testContext.xml");
//BeanFactory factory = new XmlBeanFactory(resource);
ApplicationContext context = new ClassPathXmlApplicationContext(
new String[] {"testContext.xml"});
BeanFactory factory = (BeanFactory) context;
PerfilDao ldapContact = (PerfilDaoImpl)factory.getBean("myDataAccessObjectTarget");
and my configuration:
Code:
<bean id="transactionManager"
class="org.springframework.ldap.transaction.compensating.manager.ContextSourceTransactionManager">
<constructor-arg ref="contextSource" />
</bean>
<bean id="myDataAccessObjectTarget" class="PerfilDaoImpl">
<property name="ldapTemplate" ref="ldapTemplate" />
</bean>
<bean id="myDataAccessObject"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="transactionManager" />
<property name="target" ref="myDataAccessObjectTarget" />
<property name="transactionAttributes">
<props>
<prop key="create">PROPAGATION_SUPPORTS</prop>
<prop key="delete">PROPAGATION_SUPPORTS</prop>
<prop key="update">PROPAGATION_SUPPORTS</prop>
<prop key="getAllPerfilCuentas">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>