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

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

This (kinda) pre-existed to your changes, in a WC at r1744041 running 
bq. java -jar ofbiz.jar test
I get also
{code}
2016-05-25 14:04:08,996 |0.0.0.0-startStop-2  |ServiceDispatcher             
|I| De-Registering dispatcher: ebay
2016-05-25 14:04:09,001 |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 14:04:09,002 |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 14:04:09,022 |0.0.0.0-startStop-2  |ServiceContainer              
|I| Removing from cache dispatcher: marketing
{code}
Of course if it would be cleaner it would not hurt, but this is only during 
tests and with now 16GB on most machines I guess it's does not have a huge 
impact... So later...

> 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)

Reply via email to