ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taher Alkhateeb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-8337) Refactor and simplify the startup sequence in OFBiz
Date Thu, 01 Dec 2016 07:18:58 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-8337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15711149#comment-15711149

Taher Alkhateeb commented on OFBIZ-8337:

Hi Jacopo,

Sure, I will do some further cleanup and commit. However, now that I have investigated the
code thoroughly, I think it's not very simple to remove the NativeLibClassLoader. The reason
is that the addURL method is exposed as public whereas its parent class URLClassLoader defines
it as protected. The addURL method is necessary for the current functioning of the project
(the <classpath...> entries in components rely on it to add important files to the classpath.

Gradle takes care of external libraries, but I think it should not also specify what each
component wants.

I've been thinking about this for a while, one solution that comes to my mind is maybe to
defer the initialization of the class loader and instead build the classpath object, and only
after the classpath object is fully materialized do we initiate the URLClassLoader with the
classpath passed into the constructor. I need to think about this for a while though.

> Refactor and simplify the startup sequence in OFBiz
> ---------------------------------------------------
>                 Key: OFBIZ-8337
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-8337
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: base, start
>    Affects Versions: Upcoming Release
>            Reporter: Taher Alkhateeb
>            Assignee: Taher Alkhateeb
>            Priority: Minor
>         Attachments: OFBIZ-8337-2.patch, OFBIZ-8337.patch
> The startup sequence in OFBiz is highly complex and requires improvements on multiple
levels including:
> - The entire classpath buildup logic and org.apache.ofbiz.base.start.Classpath needs
to be removed. The original idea of classpath isolation between the components created many
more problems than it solved, and right now the classpath construction is the responsibility
of the build system.
> - The custom classloader needs to be removed as well together with the classpath mentioned
> - The StartupLoader interface should remove the start() method and just have two methods,
load and unload.
> - The startup sequence should have only one StartupLoader, not an array of startup loaders.
This StartupLoader (implemented as ContainerLoader) is the only class responsible for bootstrapping
> - The ContainerLoader needs to be completely refactored, not only to remove the start()
method but also to cleanup the very messy logic currently residing there.

This message was sent by Atlassian JIRA

View raw message