Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENJPA-2521 Cannot load entities from a different bundle in an OSGi environment #1

Open
wants to merge 11 commits into
base: 2.3.x
Choose a base branch
from

Conversation

artaxerxe
Copy link

Fixed this issue, so that now you can load those entities even in a OSGi context.

@mattrpav
Copy link

This issue appears dated, but the merge has no conflicts. If it makes sense, it'd be great to get it into 2.4.3

jgrassel added a commit to jgrassel/openjpa that referenced this pull request Mar 26, 2019
michsalvv added a commit to michsalvv/openjpa that referenced this pull request Jun 8, 2021
michsalvv added a commit to michsalvv/openjpa that referenced this pull request Jun 8, 2021
@artaxerxe
Copy link
Author

Hi all,

Is there any problem with my pull request? I still am using my version of OpenJPA in karaf because this isn't merged in the branch. Please let me know if I should do something.

Thanks,
Mura Andrei

@rmannibucau
Copy link
Contributor

Hi @artaxerxe , from what I see I think it still needs some work:

  1. fix the formatting issue (imports)
  2. ensure org.osgi.core scope is provided (optionally +optional too) since we don't want org.osgi.core in most environments
  3. likely add a test ensuring it fixes the issue you mentionned (should be failing today and pass with the patch)
  4. wonder if the bundle protocol handling shouldnt be added through a SPI and registered in PersistenceActivator only

wdyt?

@artaxerxe
Copy link
Author

Hi @rmannibucau ,

Of all points which you raised I'm not sure what you mean by 4, but I'll have a closer look and come back afterwards with questions if necessary.

Thanks.

Conflicts:
	openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
	openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/OSGiBundleMetaDataIterator.java
@rmannibucau
Copy link
Contributor

@artaxerxe overall idea is to not do the OSGi handling in "main" code but keep it located in OSGi package if possible (not a huge requirement but would be saner overall for the project). One constraint is to be able to run without OSGi in all env, including security manager/javaagent ones and having an indirection makes it easier to guarantee but otherwise looks ok to me.

@artaxerxe artaxerxe closed this Jun 9, 2021
@artaxerxe artaxerxe reopened this Jun 9, 2021
jgrassel pushed a commit to jgrassel/openjpa that referenced this pull request Aug 30, 2021
EmanueleGiannuzzi added a commit to EmanueleGiannuzzi/openjpa that referenced this pull request Jul 13, 2022
gmarseglia referenced this pull request in gmarseglia/openjpa_isw2 Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants