[jira] [Commented] (OFBIZ-6783) Refactor the start component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-6783) Refactor the start component

Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-6783:
----------------------------------------

Ha I never used this syntax, only the ant target.
OK running
bq. java -jar ofbiz.jar test -component=minilang -suitename=MinilangTests
with a clean WC at r1744041 (the commit done the 2016-05-16 just before your 1st on start)
I get
{code}
2016-05-25 17:38:24,900 |main                 |ContainerLoader               |I| Stopping container catalina-container-test
2016-05-25 17:38:25,019 |0.0.0.0-startStop-2  |ServiceContainer              |I| Removing from cache dispatcher: ebay
2016-05-25 17:38:25,020 |0.0.0.0-startStop-2  |ServiceDispatcher             |I| De-Registering dispatcher: ebay
2016-05-25 17:38:25,026 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [OFBiz-JobPoller] but has failed to stop it. This is very lik
ely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 org.ofbiz.service.job.JobPoller$JobManagerPoller.run(JobPoller.java:214)
 java.lang.Thread.run(Unknown Source)
2016-05-25 17:38:25,026 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [RetryTimer] but has failed to stop it. This is very likely t
o create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Unknown Source)
 java.util.TimerThread.mainLoop(Unknown Source)
 java.util.TimerThread.run(Unknown Source)
2016-05-25 17:38:25,026 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [ForkJoinPool-1-worker-2] but has failed to stop it. This is
very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source)
 java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
 java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
2016-05-25 17:38:25,026 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [ForkJoinPool-1-worker-3] but has failed to stop it. This is
very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source)
 java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
 java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
2016-05-25 17:38:25,026 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [ForkJoinPool-1-worker-5] but has failed to stop it. This is
very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source)
 java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
 java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
2016-05-25 17:38:25,027 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [ForkJoinPool-1-worker-6] but has failed to stop it. This is
very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source)
 java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
 java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
2016-05-25 17:38:25,027 |0.0.0.0-startStop-2  |WebappClassLoaderBase         |W| The web application [ebay] appears to have started a thread named [ForkJoinPool-1-worker-0] but has failed to stop it. This is
very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source)
 java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
 java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
2016-05-25 17:38:25,031 |0.0.0.0-startStop-2  |ServiceContainer              |I| Removing from cache dispatcher: marketing
2016-05-25 17:38:25,031 |0.0.0.0-startStop-2  |ServiceDispatcher             |I| De-Registering dispatcher: marketing
2016-05-25 17:38:25,046 |0.0.0.0-startStop-2  |ServiceContainer              |I| Removing from cache dispatcher: oagismgr
{code}
So this one is surely not related to your changes.

For the solr issue it's unclear but it does not appear with the test above.  And the last  change in solr component are the 2016-05-07 (r1742714).

This said I don't think those should stop us. They need to be fixed, but not necessarily now... It's always a matter of priorities...

> Refactor the start component
> ----------------------------
>
>                 Key: OFBIZ-6783
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6783
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Upcoming Branch
>            Reporter: Taher Alkhateeb
>            Assignee: Taher Alkhateeb
>              Labels: framework, main, refactoring, start
>         Attachments: OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, OFBIZ-6783.patch, StartCommandUtil.java, error.log, ofbiz.log
>
>
> Looking at the main method and design of Start.java and the start component overall looks ugly. The things I would like to fix so far are:
> - the files are too long
> - some variables are not even needed (loaderArgs?)
> - the level of abstraction is wrong
> - main throws an exception!
> - the arguments processing logic is terrible, need to move it to commons-cli
> It's just so messy and ugly to look at. So for me refactoring starts at Start! Given that this is an important component, I will provide a patch to be reviewed by the community before committing just to be on the safe side.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)