OpenEJB
  1. OpenEJB
  2. OPENEJB-1118

Split package org.apache.openejb.client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.x
    • Fix Version/s: 3.1.3
    • Component/s: osgi
    • Labels:
      None

      Description

      The org.apache.openejb.client package is exported by two bundles: openejb-core and openejb-client. A split package in OSGi causes lots of headaches.

        Activity

        Hide
        Jarek Gawor added a comment -

        The attached patch contains a fix for the split package problem. The patch makes the org.apache.openejb.client NOT to be exported from the openejb-core bundle and instead it exports a new org.apache.openejb.osgi.client package that contains a LocalInitialContextFactory that should be used in OSGi environment. That way, the existing code using the LocalInitialContextFactory in non-OSGI environment will continue to work as before and only the code running in OSGI environment will need to be updated to use the LocalInitialContextFactory from org.apache.openejb.osgi.client package.
        The patch also cleans up the openejb-client module pom a little to remove the unnecessary maven-bundle-plugin entry (the maven-bundle-plugin is already enabled in parent pom).

        Btw, this patch only fixes the split package problem. I haven't tried yet if the new LocalInitialContextFactory actually works in the OSGi environment.

        Show
        Jarek Gawor added a comment - The attached patch contains a fix for the split package problem. The patch makes the org.apache.openejb.client NOT to be exported from the openejb-core bundle and instead it exports a new org.apache.openejb.osgi.client package that contains a LocalInitialContextFactory that should be used in OSGi environment. That way, the existing code using the LocalInitialContextFactory in non-OSGI environment will continue to work as before and only the code running in OSGI environment will need to be updated to use the LocalInitialContextFactory from org.apache.openejb.osgi.client package. The patch also cleans up the openejb-client module pom a little to remove the unnecessary maven-bundle-plugin entry (the maven-bundle-plugin is already enabled in parent pom). Btw, this patch only fixes the split package problem. I haven't tried yet if the new LocalInitialContextFactory actually works in the OSGi environment.
        Hide
        Jacek Laskowski added a comment -

        I've been thinking about a similar change, but didn't mean to introduce any changes to an app on a user's side. It seems there's no other way and hence I committed the changes (they don't break the build either). Thanks Jarek!

        Committed revision 895326.

        Show
        Jacek Laskowski added a comment - I've been thinking about a similar change, but didn't mean to introduce any changes to an app on a user's side. It seems there's no other way and hence I committed the changes (they don't break the build either). Thanks Jarek! Committed revision 895326.

          People

          • Assignee:
            Jarek Gawor
            Reporter:
            Jarek Gawor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development