-
1. Re: Spring integration and embeddable EJB3
alesj Aug 8, 2006 5:47 AM (in response to jaboj)You have two options:
- you must add Spring deployer into the embeddable EJB3 mix.
And then add SpringInterceptor into ejb3-interceptors-aop.xml (see how this is done in app. server).
- or include jboss-spring-jdk5.jar into classpath and use Spring<Lifecycle|Passivation>Interceptor as EJB3 uses interceptors.
But be sure you deploy/bind your spring-context (BeanFactory or ApplicationContext) under specified jndi name (see @Spring jndiName and SpringInjectionSupport). -
2. Re: Spring integration and embeddable EJB3
jaboj Aug 8, 2006 11:18 AM (in response to jaboj)HI,
About my first option: I've no clue how to mix the spring deployer into the embeddable EJB3. Anyone?
The second option seems more easy. However, it seems to be difficult to bind a BeanFactory or ApplicationContext in JNDI, because they're not Serializable. I've tried to use the SpringBeanFactoryDeployerImpl class in the spring-deployer jars, but without luck.
How can I from my standalone environment load the spring ApplicationContext or BeanFactory?
Regards
Jacob Boje -
3. Re: Spring integration and embeddable EJB3
alesj Aug 8, 2006 11:25 AM (in response to jaboj)For the 2nd option:
look at NonSerializableFactory.rebind(ctx, name, beanFactory); -
4. Re: Spring integration and embeddable EJB3
jaboj Aug 8, 2006 12:00 PM (in response to jaboj)HI,
YES ITS WORKING!. Just the method I needed!
Actually both options it working (with or without the SpringLifecycleInterceptor), after I mixed the spring-deployer into the embeddable EJB3.
Thank you very much, especially for your very fast answers.
Regards
Jacob Boje