You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org> on 2006/11/12 02:06:37 UTC

[jira] Created: (OPENJPA-78) Automatic runtime enhancement only works when the class is listed in the first persistence-unit

Automatic runtime enhancement only works when the class is listed in the first persistence-unit
-----------------------------------------------------------------------------------------------

                 Key: OPENJPA-78
                 URL: http://issues.apache.org/jira/browse/OPENJPA-78
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
            Reporter: Marc Prud'hommeaux


When multiple persistence-units are defined in the persistence.xml, only the first one is examined when looking for classes to enhance when using the automatic runtime enhancement (e.g., using the "-javaagent:openjpa.jar" argument). So if the project uses the following persistence.xml:

<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
    <persistence-unit name="unit1" transaction-type="RESOURCE_LOCAL">
        <class>unit1.SomeClass</class>
    </persistence-unit>
    <persistence-unit name="unit2" transaction-type="RESOURCE_LOCAL">
        <class>unit2.SomeClass</class>
    </persistence-unit>
</persistence>

In this example, when unit1.SomeClass is loaded, it will be enhanced, but unit2.SomeClass won't ever be enhanced.

The only workaround is to list all of your persistent classes in an initial entry in the persistence-unit.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OPENJPA-78) Automatic runtime enhancement only works when the class is listed in the first persistence-unit

Posted by "Markus Wolf (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494694 ] 

Markus Wolf commented on OPENJPA-78:
------------------------------------

This problem also occurs when enhancing classes at build-time.
The workaround here is listing all classes on the commandline (or from ant/maven) but this is a duplication of the class list.

> Automatic runtime enhancement only works when the class is listed in the first persistence-unit
> -----------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-78
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-78
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>             Fix For: 0.9.8
>
>
> When multiple persistence-units are defined in the persistence.xml, only the first one is examined when looking for classes to enhance when using the automatic runtime enhancement (e.g., using the "-javaagent:openjpa.jar" argument). So if the project uses the following persistence.xml:
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
>     <persistence-unit name="unit1" transaction-type="RESOURCE_LOCAL">
>         <class>unit1.SomeClass</class>
>     </persistence-unit>
>     <persistence-unit name="unit2" transaction-type="RESOURCE_LOCAL">
>         <class>unit2.SomeClass</class>
>     </persistence-unit>
> </persistence>
> In this example, when unit1.SomeClass is loaded, it will be enhanced, but unit2.SomeClass won't ever be enhanced.
> The only workaround is to list all of your persistent classes in an initial entry in the persistence-unit.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-78) Automatic runtime enhancement only works when the class is listed in the first persistence-unit

Posted by "Markus Wolf (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Wolf updated OPENJPA-78:
-------------------------------

    Priority: Major  (was: Minor)

> Automatic runtime enhancement only works when the class is listed in the first persistence-unit
> -----------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-78
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-78
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Marc Prud'hommeaux
>             Fix For: 0.9.8
>
>
> When multiple persistence-units are defined in the persistence.xml, only the first one is examined when looking for classes to enhance when using the automatic runtime enhancement (e.g., using the "-javaagent:openjpa.jar" argument). So if the project uses the following persistence.xml:
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
>     <persistence-unit name="unit1" transaction-type="RESOURCE_LOCAL">
>         <class>unit1.SomeClass</class>
>     </persistence-unit>
>     <persistence-unit name="unit2" transaction-type="RESOURCE_LOCAL">
>         <class>unit2.SomeClass</class>
>     </persistence-unit>
> </persistence>
> In this example, when unit1.SomeClass is loaded, it will be enhanced, but unit2.SomeClass won't ever be enhanced.
> The only workaround is to list all of your persistent classes in an initial entry in the persistence-unit.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-78) Automatic runtime enhancement only works when the class is listed in the first persistence-unit

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-78:
-----------------------------------

    Priority: Minor  (was: Major)

> Automatic runtime enhancement only works when the class is listed in the first persistence-unit
> -----------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-78
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-78
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>             Fix For: 0.9.7
>
>
> When multiple persistence-units are defined in the persistence.xml, only the first one is examined when looking for classes to enhance when using the automatic runtime enhancement (e.g., using the "-javaagent:openjpa.jar" argument). So if the project uses the following persistence.xml:
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
>     <persistence-unit name="unit1" transaction-type="RESOURCE_LOCAL">
>         <class>unit1.SomeClass</class>
>     </persistence-unit>
>     <persistence-unit name="unit2" transaction-type="RESOURCE_LOCAL">
>         <class>unit2.SomeClass</class>
>     </persistence-unit>
> </persistence>
> In this example, when unit1.SomeClass is loaded, it will be enhanced, but unit2.SomeClass won't ever be enhanced.
> The only workaround is to list all of your persistent classes in an initial entry in the persistence-unit.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-78) Automatic runtime enhancement only works when the class is listed in the first persistence-unit

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-78:
-----------------------------------

    Fix Version/s: 0.9.7

> Automatic runtime enhancement only works when the class is listed in the first persistence-unit
> -----------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-78
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-78
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Marc Prud'hommeaux
>             Fix For: 0.9.7
>
>
> When multiple persistence-units are defined in the persistence.xml, only the first one is examined when looking for classes to enhance when using the automatic runtime enhancement (e.g., using the "-javaagent:openjpa.jar" argument). So if the project uses the following persistence.xml:
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
>     <persistence-unit name="unit1" transaction-type="RESOURCE_LOCAL">
>         <class>unit1.SomeClass</class>
>     </persistence-unit>
>     <persistence-unit name="unit2" transaction-type="RESOURCE_LOCAL">
>         <class>unit2.SomeClass</class>
>     </persistence-unit>
> </persistence>
> In this example, when unit1.SomeClass is loaded, it will be enhanced, but unit2.SomeClass won't ever be enhanced.
> The only workaround is to list all of your persistent classes in an initial entry in the persistence-unit.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.