Trying to get up to speed with this -- I'm currently very OSGi-unaware
so bear with me.
Sounds like we need to get support in for searching OSGi "bundle:"
URLs. I suspect there'd be a few spots where we'd need this support,
the biggest would be xbean-finder.
The concept of annotation scraping more or less requires the ability
to list everything in an archive and check it for annotations. We
check for annotations by reading the byte code directly rather than
loading the class -- extremely slow, unsecure, and memory intensive to
load all those classes. We'd more or less need a listing of what is
in that bundle.
Is there some way we can do this with a "bundle:" style resource URL?
If we can at least get some proof of concept code that does that,
seems like the rest is easy.
-David
On Jan 26, 2009, at 4:29 AM, Oliver Günther wrote:
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