BatooOrg/BatooJPA — pull request #189 by lburgazzoli (2013-05-07 07:13:44+00:00)
Title: Isse #175 : Make BatooJPA OSGi friendly

Hi,
I've worked to make BatooJPA full OSGi friend and here the first patch on which I did:
- amended some pom.xml to use org.apache.felix/maven-bundle-plugin
- add a PersistenceActivator to register a persistence provider in the OSGi runtime

I've tested it Karaf and the basic tests are working fine.

- BatooJPA headers:

```
karaf@kha-1> headers 677

batoo-jpa (677)
---------------
Manifest-Version = 1.0
Bnd-LastModified = 1367909918241
Tool = Bnd-1.50.0
Built-By = c300125
Build-Jdk = 1.7.0_21
Created-By = Apache Maven Bundle Plugin

Bundle-Vendor = Batoo Software & Consultancy
Bundle-Activator = org.batoo.jpa.core.osgi.PersistenceActivator
Bundle-Name = batoo-jpa
Bundle-DocURL = http://www.batoo.org
Bundle-Description = The fastest JPA 2.0 Implementation
Bundle-SymbolicName = org.batoo.jpa.batoo-jpa
Bundle-Version = 2.0.1.0-SNAPSHOT
Bundle-License = http://www.gnu.org/licenses/lgpl.html
Bundle-ManifestVersion = 2
```

- BatooJPA PersistenceProvider

```
karaf@kha-1> jpa:provider-list
BundleID | BundleName | PersistenceProvider
-------------------------------------------------------------------------------------------
138 | org.apache.openjpa | org.apache.openjpa.persistence.PersistenceProviderImpl
677 | org.batoo.jpa.batoo-jpa | org.batoo.jpa.core.BatooPersistenceProvider
```

- Examples: https://github.com/lburgazzoli/lb-karaf-examples