Hi Oliver,

Thanks for straight answer. That will save my efforts to run it.

Just for discussion:

Hibernate (EntityManager) runs in OSGi, so it must have some bundle://
protocol handling functionality, and it is open-source. Since the problem is
the same (classpath scanning), is it possible/feasible to try to find this
functionality, and to plug it into OpenEJB?

Regards,
Donatas

-----Original Message-----
From: Oliver Günther [mailto:[email protected]] 
Sent: Monday, January 26, 2009 2:29 PM
To: [email protected]
Subject: Re: Using OpenEJB in Eclipse RCP application

Hi,

to make something long very short. OpenEJB does not run in an OSGi
environment (e.g. Eclipse RCP), neither local nor remote.

The little bit longer one.
OpenEJB makes heavy usage of the of Resource (JAR) finding through the
Classloader.
Eclipse (OSGi) uses different Classloaders, which do not support the
classic way of Resource finding.
The NullPointerException is caused by the OpenEJB, by getting an OSGI
Resource String
(e.g. Expects something like /home/OpenEJB/xxx.jar,  gets :
bundle://42:22/ )

You can overcome this by setting a special OpenEJB option, which
disables the classpath inspection.
But then you get completely stuck, if you try to let openejb start you
EJBs, because it uses the same algorithm to find them.

There is an ongoing thread about the OSGi integration, but the team
seams to have other priorities, so don't expect it to run
anytime soon.

PS: Don't try to get it to run in remote mode. The OpenEJB client has
also some classloading issues, which will not work in Eclipse.

-
Olli


Reply via email to