users@glassfish.java.net

Re: lookup ejb from OSGI ServiceListener

From: <forums_at_java.net>
Date: Thu, 2 Jun 2011 08:28:07 -0500 (CDT)

[quote=Sahoo]What happens if you replace @Inject private MyServiceBean
adminService; by @EJB private MyServiceBean adminService;[/quote]

When I invoke the ServiceListener with pseudo event, I get an exception: 

javax.ejb.EJBException: Attempt to invoke when container is in Undeployed at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1995) at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990) at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at $Proxy254.installService(Unknown Source) at
com.test.InstallServicesBean$MyServiceListener.serviceChanged(InstallServicesBean.java:72)
at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3769) at
org.apache.felix.framework.Felix.access$000(Felix.java:80) at
org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:722) at
org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107)
at org.apache.felix.framework.Felix.registerService(Felix.java:2854)
thanks


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