Topic
2 replies Latest Post - ‏2013-01-14T15:31:00Z by sutter
SystemAdmin
SystemAdmin
45 Posts
ACCEPTED ANSWER

Pinned topic Is openjpa.RuntimeUnenhancedClasses setting ignored by WAS ?

‏2013-01-14T01:46:42Z |
Hi ,
I'm running my app on WAS 7.0.0.19 with Feature Pack for OSGi Applications and Java Persistence API 2.0:
I have enhanced (build-time) my JPA 2.0 persistence classes and settings on my persistence.xml
• <provider>com.ibm.websphere.persistence.PersistenceProviderImpl</provider>
• <property name="openjpa.RuntimeUnenhancedClasses" value="supported" />

Please advice if I do something wrong here.

Initially I encountered "OutOfMemoryError" but now it seems ok after changes made with the above settings:

"12/20/12 19:42:51:726 PST 00000982 SystemOut O 1425 medx-persistence-pu INFO ThreadPool worker thread #13 openjpa.Enhance - Creating subclass for "[class com.compressus.medx.persistence.entity.Otherpatientaddress, class com.compressus.medx.persistence.entity.Peermsg,........."
"12/20/12 14:55:53:439 PST 00000333 SystemOut O INFO *** Persistence started at Thu Dec 20 14:55:53 PST 2012" seen this Four times before the OutOfMemoryError occurs.

The initial settings were:

<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<property name="openjpa.RuntimeUnenhancedClasses" value="unsupported" />
Thanks
Bernard
Updated on 2013-01-14T15:31:00Z at 2013-01-14T15:31:00Z by sutter
  • leealber
    leealber
    19 Posts
    ACCEPTED ANSWER

    Re: Is openjpa.RuntimeUnenhancedClasses setting ignored by WAS ?

    ‏2013-01-14T15:18:16Z  in response to SystemAdmin
    The "openjpa.RuntimeUnenhancedClasses" property is confusing, it depends on the version and provider you are using. Due to the incomplete nature of implementation, the recommended setting is "unsupported".

    If you are running in the container, WebSphere should automatically invoked the standard enhancer rather than using the subclassing implementation, which the openjpa.RuntimeUnenhancedClasses property is being used. If you enable trace "JPA=all", you should see the container get into the path where the transformer is being called to enhance entity class when "almost" every class is loaded.

    Have you enhanced the WebSphere profile after installing the OSGI/JPA Feature Pack?

    Albert Lee.
    • sutter
      sutter
      93 Posts
      ACCEPTED ANSWER

      Re: Is openjpa.RuntimeUnenhancedClasses setting ignored by WAS ?

      ‏2013-01-14T15:31:00Z  in response to leealber
      It looks like Bernard is posting the same question multiple times... Let's cut this back to a single conversation...

      https://www.ibm.com/developerworks/forums/thread.jspa?threadID=467926&tstart=0

      Kevin Sutter, JPA Architect, IBM WebSphere