osgi « Glassfish « JPA Q&A

1. using JPA from WAB in glassfish 3.1    stackoverflow.com

I try to create JPA persistency module and access it from OSGI WAB in glassfish 3.1. The way to do it in non-OSGI WAR is to copy the persistency jar into WAR. ...

2. JPA/OSGi Bundle    java.net

/The Java SE bootstrapping API (Persistence.createEntityManagerFactory) relies on Thread's context class loader to be set properly for two reasons: to discover persistence units and JPA domain classes, . to discover Persistence Provider. . While it is easy to work around the first one by just setting the context class loader to the bundle class loader before making the call to the ...

3. Re: JPA/OSGi Bundle    java.net

4. RE: using JPA from OSGI WAB in glassfish 3.1    java.net

Yes, I have only raised that bug against maven-bundle-plugin. I just to came to know that there is now better support for WAB in maven-bundle-plugin. I am yet to experiment the same. Let me do that first and then I can advise how to organise the pom.xml to not have "." in Bundle-ClassPath.

5. using JPA from OSGI WAB in glassfish 3.1    java.net

(I am new in OSGI) I am trying to access a JPA JAR from OSGI WAB in glassfish 3.1. When I deploy the OSGI WAB with JPA jar, I get the exception: [#|2011-02-01T18:29:10.035+0200|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-1;|java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: META-INF/maven/com.test/test-web/pom.properties at org.glassfish.osgijavaeebase.OSGiBundleArchive$1.run(OSGiBundleArchive.java:366) Caused by: java.util.zip.ZipException: duplicate entry: META-INF/maven/com.test/test-web/pom.properties at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175) at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92) at org.glassfish.osgijavaeebase.OSGiBundleArchive$1.run(OSGiBundleArchive.java:348) |#] More details about my JAR and WAB:

6. hybrid OSGI+Web+EJB+JPA application    java.net

4. The problem is that currently, the hybrid OSGI+WEB+EJB bundle must be packet into one single bundle, an analog of EAR. Are you planning to extend the functionality of the deployment module to allow the installation of OSGI modules from Maven repositories with resolving (and installing) of referenced\dependent modules? There is an external OSGI module called PAX URL(http://wiki.ops4j.org/display/paxurl/Pax+URL) that allows installing ...

7. Hibernate working in EJB OSGI bundle?    java.net

I am using Glassfish 3.1 b04 with the 15 Jun snapshots of osgi-jpa and osgi-ejb. When deploying your unmodified examples it works fine, I can use the webclient to create users and login. When I use the hibernate sample it deploys, but does not attempt to do anything with the database. If I don't bundle the hibernate dependencies it will complain ...