Hi all,
At the beginning I want to say hello for everyone, because I'm new at this forum.
And now to the point:
I'm using @Transactional and transaction management by annotation (<tx:annotation-driven>). I have problem when I'm using GenericApplicationContext to create application context and get some beans from it:
I've got the instance of ServiceInterface but I want to have the proxy which contains information about transactions.Code:GenericApplicationContext ctx = new GenericApplicationContext(); // Load beans definitions XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ctx); xmlReader.loadBeanDefinitions(new ClassPathResource(CONTEXT_PATH)); // Register the datasource ctx.getBeanFactory().registerSingleton(CONTEXT_DATASOURCE_BEAN_NAME, dataSource); // Get the service ServiceInterface service = (ServiceInterface) ctx.getBean("service");
Could you explain me what I've missed?
Thanks for your help
Regards Tomasz


Reply With Quote
