Revision as of 10:09, 5 November 2009 by Admin (Talk | contribs)

Handling of Endorsed Libraries

See issue 172952 for some background. This wiki page expands solution proposed by Tomas Zezula and looks at concrete use cases.

Infrastructure changes

These steps need to be done:

  • (IN1) Add new type of classpath - ClassPath.ENDORSED. Enhance all project types (Web, J2EE and J2SE) to store ClassPath.ENDORSED in project.properties and allow programmatic modifications of this classpath type (via ClassPathModifier).

Implementing this step would allow project types and 3rd party modules to read/write project's ENDORSED classpath. Allowing editing of this classpath in project's UI is discouraged until there is a strong demand for it. Hand editing in project.properties should be sufficient for now. Because most of the classpath related code is now more or less in one module it is quite straightforward change which should take hours but not days to implement.

  • (IN2) Enhance ClassPathSupportFactory.createBootClassPathImplementation to accept endorsed jars. Project types by default call this method with whatever is stored in project.

Even with review it should be simple and straightforward change to implement. A day or two in total.

  • (IN3) Change all build scripts of all project types to prepend ENDORSED classpath to boot classpath.

Again straightforward change. A day for all project types.

Client changes

GlassFish usecase:

  • (GF1) server deployment API introduces "TOOL_ENDORSED" constant and lets server plugins to use it to return server endorsed classpath
  • (GF2) web/j2ee projects uses selected server ENDORSED classpath and passes it to infrastructure described earlier in this document

Web Services use case (I'm not sure I understand them so verify please):

  • (WS1) WS support when enabled in a project can use ClassPathModifier API to read/update projects ENDORSED classpath as necessary

Impact on project sharability:


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo