Hi Paul,

On 10/03/2016 11:23 AM, Paul Bakker wrote:
I have updated the migration demo that Sander and I showed at JavaOne to
the latest Jigsaw prototype (
https://github.com/sandermak/java9-migration-demos). This is a
Spring/Hibernate application. The goal is to migrate the app's code to a
named module, while keeping libraries as automatic modules or on the
classpath.

Compared to the previous prototype I find the result less satisfactory.
Both Spring and Hibernate use reflection on implementation types, which now
require either the use of weak modules or "export private" for
implementation packages.
The result is that pretty much all implementation packages are not
encapsulated any more, which isn't very good.

In the previous prototype "export dynamic" was a nice workaround. While
this is not really encapsulation, it at least prevents developers to create
compile time dependencies.
Without dynamic exports (or something similar in concept) I'm afraid most
applications using existing frameworks are never going to get beyond weak
modules or simply exporting everything.

Paul

Use qualified exports?

Regards, Peter

Reply via email to