users@glassfish.java.net

Re: Service calls from/to OSGI WAB Hybrid applications have wron

From: <forums_at_java.net>
Date: Wed, 28 Nov 2012 08:12:35 -0600 (CST)

Thanks for the info, Sahoo. I can see now what you mean, but let me explain
my setup. I'm not using any EJB technology, but instead the Spring framework
to provide transactions, dependency injection, ect. So here the assumption
that some service class will not be interacting with JavaEE no longer holds
true. The service implementation that implements the OSGI service can be a
Spring bean, and it can be wired with other services or DAOs. Spring knows
about entityManagerFactories, ect by wiring them up from
applicationContext.xml through JNDI lookups. Also Spring will create
transactions if you specify so, so it will also be making lookups to the
UserTransaction as apart of its AOP interceptor. And therefore we will
definitely need a JavaEE context. What would be the proper way to use Spring
in a Web Application Bundle, is it not feasible at all? Note: I have managed
to get everything working, even this part with a workaround.

--
[Message sent by forum member 'chejavara']
View Post: http://forums.java.net/node/892749