The Enterprise OSGi spec defines a manifest header, "Meta-Persistence", which marks an OSGi bundle as Persistence Bundle. Using this header, a user can also specify additional persistence.xml files to be applied:
So AFAICS also with the declarative approach some OSGi-specific code would be required which interprets this header (using a BundleTracker) and registers an associated entity manager factory service etc. But as you say the dependency to the required APIs could be optional/provided to not pull in any OSGi dependencies for non-OSGi environments.
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
May also need to scan for persistence.xml files: