openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <ja...@laskowski.net.pl>
Subject Re: For adventurous: first run of OSGified OpenEJB *seems* running fine
Date Thu, 29 Oct 2009 19:36:52 GMT
On Thu, Oct 29, 2009 at 6:15 PM, Quintin Beukes <quintin@skywalk.co.za> wrote:
> How much of the actual OpenEJB code changes to do a shift like this (to
> OSGi)?

Almost nothing. The goal was to make as less changes as possible and
introduce some to make openejb more modular. The bundles are in fact
the maven modules themselves. Just add/remove imports/exports and it
begun working with not much hassle on my part. I was really surprised
when openejb booted up in osgi.

OSGi is just an enhanced classloader platform with a notion of
services. Each bundle is to provide exports for the other bundles
which import them. That's the way class visibility is handled. The
other part of OSGi is the service layer. That's exactly how EJB3
works. You expose a business intf and that's what you see from a
client's perspective - no real implementation. In OSGi you register a
service in the service registry with a set of interfaces backed by an
implementation. When a bundle is started its activator is fired that's
in turn registers itself as a service provider or a service consumer.
Throw some listeners into it and that's what OSGi is all about. Easy
:)

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl

Mime
View raw message