[
https://issues.apache.org/jira/browse/DERBY-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506163
]
Stephen Felts commented on DERBY-1945:
--------------------------------------
The bundle, as it stands, has a number of packages that are exported in the
manifest.
For example, org.apache.derby.jdbc is exported. That means that I can
reference any classes in this package in an OSGi environment. If only a subset
of classes in that package should be exposed, there is syntax supported by OSGi
to expose only specific classes (or the other classes should be moved out of
the package). When I reference any of those classes, all of the packages for
which there is an import statement must also be exported. Otherwise, a
ClassNotFound will occur at runtime. It's not worth adding any OSGi
information to the manifest if the jar is not usable as an OSGi bundle.
The two packages that I referenced in the original description were packages
that I needed to add to the manifest exports when running a program in an OSGi
environment that covers most if not all of the JDBC interface.
However, looking at imports from org.apache.derby.jdbc, it would seem that the
following are needed for all of the classes in org.apache.derby.jdbc:
org.apache.derby.iapi.db
org.apache.derby.iapi.error
org.apache.derby.iapi.jdbc
org.apache.derby.iapi.services.context
org.apache.derby.iapi.services.i18n
org.apache.derby.iapi.services.info
org.apache.derby.iapi.services.io
org.apache.derby.iapi.services.monitor
org.apache.derby.iapi.sql
org.apache.derby.iapi.sql.conn
org.apache.derby.iapi.store.access
org.apache.derby.iapi.store.access.xa
org.apache.derby.impl.jdbc
Working with OSGi gives one a new vision on code isolation, modularity, etc.
> Need changes to manifest for OSGi environment
> ---------------------------------------------
>
> Key: DERBY-1945
> URL: https://issues.apache.org/jira/browse/DERBY-1945
> Project: Derby
> Issue Type: Bug
> Components: Miscellaneous
> Affects Versions: 10.1.3.1
> Reporter: Stephen Felts
> Priority: Minor
>
> When running with Derby in an OSGi environment, there are a couple of changes
> that are needed in the manifest.
> 1. The manifest does not have a Bundle Symbolic Name. This causes some tools
> not to recognize it as an OSGi bundle and some things don't work nicely
> without the symbolic name.
> Add Bundle-SymbolicName: derby to the manifest.
> 2. I'm working with a product that creates dynamic proxies for all of the
> interfaces like Connection, Statement, etc.
> As part of doing that, it needs access to all classes that are referenced in
> those interface classes.
> There are several classes that are referenced in packages that are not
> exported. The following exports needed to be added to the manifest:
> org.apache.derby.iapi.jdbc
> org.apache.derby.impl.jdbc
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.