Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Make BatooJPA OSGi friendly #175

lburgazzoli opened this Issue · 2 comments

2 participants

Luca Burgazzoli Asım Arslan
Luca Burgazzoli

It would be nice to be able to use BatooJPA in OSGi environments like Karaf

Asım Arslan

Batoo JPA is designed and coded OSGi in mind so it should be OSGi compatible. But there may exist bugs as it is in incubation . Please, can you send more specific details on the issue. Thanks.

Luca Burgazzoli

I've tried to install BatooJPA in Apache Karaf and as you can see, the MANIFEST is not OSGi compliant:

karaf@root> install mvn:org.batoo.jpa/batoo-jpa/
[ 199] [Active     ] [            ] [   80] mvn:org.batoo.jpa/batoo-jpa/
karaf@root> headers 199

Bundle 199

Manifest-Version = 1.0
Archiver-Version = Plexus Archiver
Built-By = hceylan
Build-Jdk = 1.7.0_09
Created-By = Apache Maven

In addition it does not export any PersistenceProvider service to be Enterprise OSGi compliant, here a simple example of an Activator for EclipseLink:

public class Activator  implements BundleActivator {

    private static BundleContext context = null;
    private static ServiceRegistration serviceReg = null;

    public void start(BundleContext context) throws Exception {
        this.context = context;

        Hashtable<String,String> props = new Hashtable<String, String>();

        serviceReg = context.registerService(
            new org.eclipse.persistence.jpa.PersistenceProvider(),

    public void stop(BundleContext context) throws Exception {
        if (this.serviceReg != null) {
            this.serviceReg = null;

        this.context = null;
Luca Burgazzoli lburgazzoli closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.