users@glassfish.java.net

lookup ejb (not a bundle) that deploy on the server from a bundle

From: <forums_at_java.net>
Date: Wed, 21 Dec 2011 00:33:17 -0600 (CST)

 Hi Sahoo,

we have two type of application on the same glassfish, one is an regular JEE
Application with an exposed EJB and the second is Bundle inside the Felix
framework (inside the glassfish server)

now I am trying to lookup (with InitialContext)  one of the EJB that exposed
in the JEE app from the bundle.

I tried to do it in several way none of them worked:

1- including the jar that exposed the EJB in the bundle (additional to the
(ejb) jar that in the JEE app) -

result: when I get the bean and try to cast it to the interface I got
ClassCastException (another situation that also show up in this use case,
is that the bundle try to load again the bean that already exist and get
collision)

2- define the jar only as 'provided' inside the pom.xml

result: the deploy passed ok but in run time I am getting ClassNotFoundError
(even that I add the package to the osgi.system.framework list)

Thanks In advance

Eyal


 


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