|Re: [eclipselink-users] EclipseLink in RCP|
OSGi includes a services model which allows you to decouple a service requirement from possible implementations. Much like in Spring where you code against interfaces and then use Spring IoC to inject an implementation you select. With OSGi services you can depend on a service interface and then obtain an implementation at runtime. This can be done either programatically with a Service Tracker or in a more IoC way with Declarative Services or Spring DM (previously called Spring OSGi). You can find a number of articles on OSGi Services on the Eclipse Resources page in the OSGi category.
In the EclipseLink OSGi proof of concept EclipseLink provides a JPA service. You can "inject" it directly into your bundle or you can obtain it from javax.persistence.Persistence. Behind the scenes, javax.persistence.Persistence is listening for provider services as the become available. It just plays the role of a directory service.
I know you can embed Equinox inside a servlet container but I wonder if you can embed Equinox inside a Swing app and have the core application functionality built on OSGi?
Frans Thamura wrote:
Back to the top