-
1. Re: Deploying JPA 2 (OpenJPA 2.1.0) on Jboss 7.1.0-Final-Snapshot
smarlow Jan 18, 2012 11:19 AM (in response to sathwik.bp)1 of 1 people found this helpfulHi,
Yes, the providerModule name which can include a version (slot) also. For example, you placed your OpenJPA jars in the AS7/module/org/apache/openjpa/main folder. To specify this module, you could add <property name="jboss.as.jpa.providerModule" value="org.apache.openjpa" /> or <property name="jboss.as.jpa.providerModule" value="org.apache.openjpa:main" />.
If you add a second version of the OpenJPA module (2.1.1), you would place that in AS7/module/org/apache/openjpa/2.1.1 (replace 2.1.1 with whatever you want, if you prefer something else). The slot for this different version, is now called "2.1.1" and can be referenced via <property name="jboss.as.jpa.providerModule" value="org.apache.openjpa:2.1.1" />.
Lets say, you instead put the jars in the AS7/module/org/apache/openjpa/2.x folder. The property would then be <property name="jboss.as.jpa.providerModule" value="org.apache.openjpa:2.x" />.
Contributions to the doc at https://docs.jboss.org/author/display/AS71/JPA+Reference+Guide are welcome for this.
Scott
-
2. Re: Deploying JPA 2 (OpenJPA 2.1.0) on Jboss 7.1.0-Final-Snapshot
sathwik.bp Jan 18, 2012 12:29 PM (in response to smarlow)Hi Scott,
Thanks for your explanation.
Couple of questions,
1) Does this mean that for multiple versions of a library one needs to create slots under the module and use the slot which suits best for the application?
2) How come the value "hibernate3-bundled" allows the application to host the required libraries. I would imagine that it should have been "org.hibernate:3"?
regards,
sathwik
-
3. Re: Deploying JPA 2 (OpenJPA 2.1.0) on Jboss 7.1.0-Final-Snapshot
smarlow Jan 18, 2012 1:59 PM (in response to sathwik.bp)1) Does this mean that for multiple versions of a library one needs to create slots under the module and use the slot which suits best for the application?
Yes, more about modules is here. You have the flexibility to determine your own naming scheme. If you have additional questions about module/slots, you might want to create a new forum thread for that.
2) How come the value "hibernate3-bundled" allows the application to host the required libraries. I would imagine that it should have been "org.hibernate:3"?
Yes, that is a special name that is checked for internally (see code here), that is used for bundling the Hibernate 3.x jars with an application. Specifying "org.hibernate:3" and a few other properties would of been equivalent.