users@glassfish.java.net

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

From: <forums_at_java.net>
Date: Tue, 11 Dec 2012 09:52:59 -0600 (CST)

Thats not quite it (I think it was most likely a typo). WAB2 has registered
pure OSGI service *WAB1* is invoking that service The services are operating
under WAB1's JavaEE context. That makes it clear, thanks. For me EJB are off
the table since we are using Spring. However, I have found a solution which
is to run a Thread created during Spring initialization which will have the
right JavaEE context and then dispatch everything that needs that context
(like EntityManagerFactory JNDI lookups) as a Runnable to run asynchronously.
However, further, I have found a way to wire up Spring so that the
EntityManagerFactory and Transactions are all registered as OSGI services. In
that case we wouldn't need the JavaEE context. Like you said though, I had to
register the EntityManagerFactory manually since neither Glassfish nor Aries
provides this currently. Thanks

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