My setup is way beyond too complex. Basically there are multiple persistent units coming from a single bundle and therefore root URL is the same for all of them. I've got only one instance of scanner shared between these persistence units and I'm getting reuse validation issues because root URL point to the same bundle. My scanner class resides outside the classloader of hibernate core so I have to provide it as an instance. Hence my problem is that scanner now sees the same root URL multiple times and a simple workaround would have been to choose different root URL for each of them, but that didn't feel like the proper way.
Here are my two cents on OSGiScanner.
I guess by fixing HHH-8233 you could easily fall back to StandardArchiveDescriptorFactory when scanning persistence units jar file urls. I also see that you're scanning everything and not just *.class. I use mapping files to point to non class resources but currently I see these files are completely neglected.
For me personally jar and mapping files are a must plus I have a custom need for some of the mapping files to point to bundle's data area for (I use relative file protocol as a marker for this behavior). But anyways I'm glad that now I can derive a custom scanner without hacking hibernate.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Thanks a bunch,
My setup is way beyond too complex. Basically there are multiple persistent units coming from a single bundle and therefore root URL is the same for all of them. I've got only one instance of scanner shared between these persistence units and I'm getting reuse validation issues because root URL point to the same bundle. My scanner class resides outside the classloader of hibernate core so I have to provide it as an instance. Hence my problem is that scanner now sees the same root URL multiple times and a simple workaround would have been to choose different root URL for each of them, but that didn't feel like the proper way.
Here are my two cents on OSGiScanner.
I guess by fixing HHH-8233 you could easily fall back to StandardArchiveDescriptorFactory when scanning persistence units jar file urls. I also see that you're scanning everything and not just *.class. I use mapping files to point to non class resources but currently I see these files are completely neglected.
For me personally jar and mapping files are a must plus I have a custom need for some of the mapping files to point to bundle's data area for (I use relative file protocol as a marker for this behavior). But anyways I'm glad that now I can derive a custom scanner without hacking hibernate.