Uploaded image for project: 'ServiceMix 4'
  1. ServiceMix 4
  2. SMX4-398

openjpa bundle should import the transaction package without optional flag

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 4.3.0
    • Component/s: Bundles
    • Labels:
      None

      Description

      When I rerun the OSGi integration test of JPA, I found current servicemix JPA bundle set the importation of the javax.transaction to be optional.
      It will cause the JPA test failure, so I submit this patch to fix this issue.

      1. smx4-398.patch
        0.7 kB
        Willem Jiang

        Activity

        Hide
        gnt Guillaume Nodet added a comment -

        But JPA can be used without a transaction manager, so if openjpa bundle can be used without the javax.transaction package, we should not mandate it.
        If this is the case, the fix might be elsewhere.

        Show
        gnt Guillaume Nodet added a comment - But JPA can be used without a transaction manager, so if openjpa bundle can be used without the javax.transaction package, we should not mandate it. If this is the case, the fix might be elsewhere.
        Hide
        njiang Willem Jiang added a comment -

        My test uses the spring JpaTransactionManager.
        You can find the spring configuration file here[1], the test[2] is running within PAX-EXAM.

        Is there any way to force the PAX-EXAM to reload the bundle with optional imports ?

        [1] https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/jpa/springJpaRouteTest.xml
        [2] https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java

        Show
        njiang Willem Jiang added a comment - My test uses the spring JpaTransactionManager. You can find the spring configuration file here [1] , the test [2] is running within PAX-EXAM. Is there any way to force the PAX-EXAM to reload the bundle with optional imports ? [1] https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/jpa/springJpaRouteTest.xml [2] https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
        Hide
        jb@nanthrax.net Jean-Baptiste Onofré added a comment -

        As OpenJPA can be used without a transaction manager, the optional import statement is normal.

        Show
        jb@nanthrax.net Jean-Baptiste Onofré added a comment - As OpenJPA can be used without a transaction manager, the optional import statement is normal.

          People

          • Assignee:
            jb@nanthrax.net Jean-Baptiste Onofré
            Reporter:
            njiang Willem Jiang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development