Hi.
I have a annotation-based EJB3 set up with Spring autowiring :
My EAR contains an EJB jar (at its root). In this jar, there is a folder called context which includes a file called beanRefContext.xml; said file contains :Code:@Stateless(name = "WiringExampleFacade") @Remote({WiringExample.class}) @Local({WiringExample.class}) @Interceptors(SpringBeanAutowiringInterceptor.class) public class WiringExampleFacadeEJB implements WiringExample { // automatically injected with a matching Spring bean @Autowired private WiringExampleImpl delegate;
If I understand things correctly, the AutoWiringInterceptor will use by default a ContextSingletonBeanFactoryLocator to retrieve the beanRefContext.xml from the classpath, so this setup should work.Code:<?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:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- This will automatically declare several post-processors including the AutowiredAnnotationBeanPostProcessor --> <context:annotation-config/> <import resource="classpath:businessBeans.xml" /> </beans>
Well, it doesn't.
Any help ?


Reply With Quote