[jira] [Commented] (DERBY-6945) Re-package Derby as a collection of jigsaw modules
[ https://issues.apache.org/jira/browse/DERBY-6945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571113#comment-16571113 ] Rick Hillegas commented on DERBY-6945: -- Attaching derby-6945-47-aa-runModulesWithLocalizations.diff. This patch makes it possible to run some simple Derby tests using the modulepath. The experiments verified that message localizations work with the modulepath. Tests included: 1) running a simple ij script with the embedded driver, 2) running a simple ij script with the client driver, 3) running sysinfo. The experiments tested the default English locale as well as the German locale de_DE and a nonexistent locale called xx_YY. Some work was required to make localizations work with the modulepath. I abandoned the earlier attempt to make the message provider pattern work. Derby's approach to localization runs counter to the model supported by the message provider pattern. That pattern assumes that all of the localizations for a given component are co-located in a single jar file. That is not how Derby treats messages. In order to minimize the footprint of the engine jar, Derby provides a separate jar file for each supported language, and that jar file contains both localized engine messages as well as localized tools messages. The client component is the only jar file which contains all of its own localizations. In order to support a simple heartbeat case (connect, create a table, insert a row, select the row), I had to make several adjustments to the engine module descriptor. Right now, generated query plans are compiled into the catch-all unnamed module. I had to grant reflective access to several engine packages so that the generated plans would run. I have logged DERBY-7006 to investigate closing this encapsulation hole. I am running tests now. Touches the following files: {noformat} M build.xml Build derbyTesting.jar the same way as the other jars are built, rather than via a zip command. D java/org.apache.derby.client/org/apache/derby/loc/client/clientmessagesProviderImpl.java D java/org.apache.derby.commons/org/apache/derby/loc/client/spi/clientmessagesProvider.java Abandon the message provider pattern for resolving client localizations. M java/org.apache.derby.commons/org/apache/derby/shared/common/info/JVMInfo.java A java/org.apache.derby.commons/org/apache/derby/shared/common/reference/ModuleUtil.java Provide the first bits of module introspection: 1) Add the method JVMInfo.isModuleAware() to report whether the JVM is running with a modulepath or a classpath. 2) Add some module-related utilities, in particular, the ability to look up a module by name. M java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyTesting.jar.lastcontents M java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents M java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyTesting.jar.lastcontents M java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents M java/org.apache.derby.commons/org/apache/derby/shared/common/i18n/MessageService.java M java/org.apache.derby.commons/org/apache/derby/shared/common/i18n/MessageUtil.java Add the ability to look up message localizations when the JVM is running with a modulepath. M java/locales/module-info.template M java/org.apache.derby.client/module-info.java M java/org.apache.derby.commons/module-info.java M java/org.apache.derby.engine/module-info.java M java/org.apache.derby.tests/module-info.java M java/org.apache.derby.tools/module-info.java Adjust module descriptors to support module lookup, message localization, and the running of a simple heartbeat test. M java/org.apache.derby.tools/org/apache/derby/impl/tools/ij/utilMain.java M java/org.apache.derby.tools/org/apache/derby/impl/tools/sysinfo/Main.java Adjust some classes so that ij and sysinfo can run with a modulepath as well as a classpath. M java/org.apache.derby.server/org/apache/derby/drda/server.policy M java/org.apache.derby.server/org/apache/derby/drda/template.policy M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/derbynet/NetworkServerControlApiTest.policy M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.policy M java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy M java/org.apache.derby.t
[jira] [Updated] (DERBY-6945) Re-package Derby as a collection of jigsaw modules
[ https://issues.apache.org/jira/browse/DERBY-6945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Hillegas updated DERBY-6945: - Attachment: derby-6945-47-aa-runModulesWithLocalizations.diff > Re-package Derby as a collection of jigsaw modules > -- > > Key: DERBY-6945 > URL: https://issues.apache.org/jira/browse/DERBY-6945 > Project: Derby > Issue Type: Improvement >Affects Versions: 10.13.1.2 >Reporter: Rick Hillegas >Priority: Major > Attachments: derby-6945-01-aa-remove_derbyPreBuild_dep.diff, > derby-6945-02-ab-newDerbySharedJar.diff, > derby-6945-02-ac-newDerbySharedJar.diff, derby-6945-03-aa-partitionTest.diff, > derby-6945-04-aa-moveRunClass.diff, > derby-6945-05-aa-removeRedundant_Attribute_SQLState.diff, > derby-6945-06-aa-removeOtherSharedDuplicates.diff, > derby-6945-07-aa-net_client_overlap.diff, > derby-6945-08-aa-move_shared_iapi_under_shared.diff, > derby-6945-08-ab-move_shared_iapi_under_shared.diff, > derby-6945-08-ad-move_shared_iapi_under_shared.diff, > derby-6945-09-ab-moveInternalDriver.diff, derby-6945-10-aa-moveDriver42.diff, > derby-6945-11-ab-moveAutoloadedDriver.diff, > derby-6945-12-ab-moveClientDataSourceInterface.diff, > derby-6945-13-aa-create-ClientAutoloadedDriver.diff, > derby-6945-14-aa-moveMoreEmbeddedClassesOutOfPublicAPI.diff, > derby-6945-15-aa-moveMoreClientClassesOutOfPublicAPI.diff, > derby-6945-16-aa-consolidatePublicAPI.diff, > derby-6945-17-aa-resealPackagesIn-derbyshared.diff, > derby-6945-18-aa-resealLocalizationPackage.diff, > derby-6945-19-ad-movePublicAPIintoToolsJar.diff, > derby-6945-20-aa-removeClasslister.diff, > derby-6945-21-aa-simplifyBuildScripts.diff, > derby-6945-21-ab-simplifyBuildScripts.diff, > derby-6945-22-ad-isolateClassesByArtifact.diff, > derby-6945-22-ae-isolateClassesByArtifact.diff, > derby-6945-22-af-isolateClassesByArtifact.diff, > derby-6945-23-aa-upgradeToAnt_1.10.2.diff, > derby-6945-24-aa-fixNativeAuthenticationServiceTest.diff, > derby-6945-25-ab-moduleDescriptors.diff, > derby-6945-26-aa-packagePrivateTests.diff, > derby-6945-27-aa-adjustModulesForTests.diff, > derby-6945-28-aa-testingModuleDescriptor.diff, > derby-6945-29-aa-disable-SimpleApp-test.diff, > derby-6945-30-ab-move-clientmessages-toolsmessages.diff, > derby-6945-31-aa-clientmessages-ResourceBundleProvider.diff, > derby-6945-32-aa-messageLookupCleanup.diff, > derby-6945-33-ab-moveLocalizations.diff, > derby-6945-34-aa-licenseHeaders.diff, > derby-6945-35-aa-removeSpuriousCharacter.diff, > derby-6945-36-aa-moduleDescriptorsForLocaleJars.diff, > derby-6945-38-aa-javadocCleanup.diff, derby-6945-39-aa-javadocCleanup.diff, > derby-6945-40-aa-generatedSource-dirNames.diff, > derby-6945-41-ac-cleanupProductJavadoc.diff, > derby-6945-42-aa-cleanupTestJavadoc.diff, > derby-6945-43-aa-cleanupPublicAPIforJavadoc.diff, > derby-6945-44-aa-moduleAwareJavadoc.diff, derby-6945-45-aa-fixWarnings.diff, > derby-6945-46-aa-jacocoSourceRoots.diff, > derby-6945-47-aa-runModulesWithLocalizations.diff, > derby-6945-XX-moveDataSourceFactories, jdeps.out.tar, weirdAnt.out > > > Once we commit to building with Java 9 (see DERBY-6856), we should consider > re-packaging Derby as a set of jigsaw modules. This would result in a > different set of release artifacts. This might be a good opportunity to > address the Tomcat artifactory issues raised by issue DERBY-6944. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (DERBY-6980) Documentation changes to accompany jigsaw-modularization of derby
[ https://issues.apache.org/jira/browse/DERBY-6980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571079#comment-16571079 ] Rick Hillegas commented on DERBY-6980: -- The shared module must have the following permission in order to read the module path: permission java.util.PropertyPermission "jdk.module.path", "read"; > Documentation changes to accompany jigsaw-modularization of derby > - > > Key: DERBY-6980 > URL: https://issues.apache.org/jira/browse/DERBY-6980 > Project: Derby > Issue Type: Task > Components: Documentation >Affects Versions: 10.15.0.0 >Reporter: Rick Hillegas >Assignee: Rick Hillegas >Priority: Major > > This is a place to collect the documentation changes which must be made as a > result of the work on DERBY-6945. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (DERBY-7006) Investigate putting generated classes under the engine module loader
[ https://issues.apache.org/jira/browse/DERBY-7006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Hillegas updated DERBY-7006: - Urgency: Normal > Investigate putting generated classes under the engine module loader > > > Key: DERBY-7006 > URL: https://issues.apache.org/jira/browse/DERBY-7006 > Project: Derby > Issue Type: Improvement > Components: SQL >Affects Versions: 10.15.0.0 >Reporter: Rick Hillegas >Priority: Major > > Right now, the generated query plans are compiled into the catch-all unnamed > module. This forces us to grant reflective access to several engine packages. > It would be nice to encapsulate the generated classes inside the engine > module loader. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (DERBY-7006) Investigate putting generated classes under the engine module loader
Rick Hillegas created DERBY-7006: Summary: Investigate putting generated classes under the engine module loader Key: DERBY-7006 URL: https://issues.apache.org/jira/browse/DERBY-7006 Project: Derby Issue Type: Improvement Components: SQL Affects Versions: 10.15.0.0 Reporter: Rick Hillegas Right now, the generated query plans are compiled into the catch-all unnamed module. This forces us to grant reflective access to several engine packages. It would be nice to encapsulate the generated classes inside the engine module loader. -- This message was sent by Atlassian JIRA (v7.6.3#76005)