*What's for?*
Finally, OOTB the port offset is interesting in 2 cases:
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
# To simultaneously run the demos without having to change much things, just one parameter (this will need to have the same commited in R13.07... to be discussed...)
Of course, It can be used for other purposes outside of the ASF context...
*How it's done?*
Basically, I just added a portoffset integer parameter to 3 ant targets (of course this JVM param can also be used in a Java call from command line): start, start-pos, start-both,
The portoffset parameter is set to zero by default in ClassLoaderContainer.java.
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.
The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests
To avoid hardcoding locations in services definitions, I also created 2 service-locations: main-http and main-soap
*To summarize:* these changes will be used to run "ant start" with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time. R13.07 could have a similar patch applied since it's not yet released...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533839 13f79535-47bb-0310-9956-ffa450edef68
*What's for?*
OOTB the port offset is interesting in at least 3 cases:
# To simultaneously run tests on the same Buildbot machine. This is related to http://mail-archives.apache.org/mod_mbox/www-builds/201209.mbox/%3C002101cd991b$0a16de50$1e449af0$@16degrees.com.au%3E
# To simultaneously run the demos without having to change much things, just one parameter
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
*How it's done?*
Basically, I just added a portoffset integer parameter to some ant targets (of course this JVM param can also be used in a Java call from command line):
* in trunk and R13.07: start, start-batch, start-debug, start-pos, start-both, run-tests and run-test
* in R12.04 and R11.04: run-tests, run-test. I did not set start targets because anyway it would miss the admin port offset, withouh much changes. So can't be used to demonstrate. We will continue to use the current paches for those.
The portoffset parameter is set to zero by default in ClassLoaderContainer.java.
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.
The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value in R13.07 and trunk.
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests
To avoid hardcoding locations in services definitions, I also had to create some service-locations: main-local-soap and main-remote-soap
*What are the constraints?*
* For demos: the offset should not be applied to trunk because <service-location name="main-remote-soap" location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService"/> is used for tests by trunk *and all releases*. It's useless to apply to trunk anyway, offsetting port in releases is enough.
* I did not take into account the Ideal payment harcoded port values in IdealPaymentServiceTest.java. Weirdly I did not cross error during tests, though it seems there are tests using an harcoded port in url.
*What is the status?*
Locally (on Win XP) I ran many tests combinations with <<ant load-demo run-tests>>.
Applying the portoffset on a sole running test instance has no effects. I have still some fails (no errors) but those are not related to my changes, they appear also without.
But when I run a combination of any releases/trunk but with R11.04, I get a time out error with testSOAPSimpleService, that I can't explain so far.
If I run the trunk alone with the portoffset no errors occur. Same if I run a release with portoffset and only testSOAPSimpleService in trunk (w/ or w/o portoffset)
*To summarize:* these changes will be used to run Buildot tests instances simultaneously . And, for coming releases, to run demos without having to create patches. Simply running ant start with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time.
*What I will to do for now:* commit the patches and test if I cross the same issue on Buildbot. If it's the same (99% chances it will) I will revert and will continue to locally try to find the reason . I believe this issue is unrelated to the changes I implemened. And it's just because it's now possible to simultaneously run tests that it appears.
BTW I just noticed that when you run R11.04 with R12.04, R12.04 takes almost all the CPU (XP is not very, while when running any combinations w/o R11.04 the CPU load is shared.
Also there are far less tests in R11.04, which coul be the reason when I run it with another test run instance there are no issues. Because R11.04 tests finish before the other instance gets to run testSOAPSimpleService.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525909 13f79535-47bb-0310-9956-ffa450edef68
This is related with r1361130, where the birt component was moved from framework to specialpurpose.
The fix is to create the possibility of a loose coupling from applications controllers to specialpurpose controllers. For that an if-present attribute is added to the include element. When used, if the included controller does not exist, instead of an error and a stack trace, a warning is thrown (only in English, for developers) suggesting to checkout the component from trunk. Indeed, in the current case, this situation should only arise in release after 12.04 where the birt component, like all others but the ecommerce component, had been removed. This can be used in other cases, but for now only the component level is covered.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1518777 13f79535-47bb-0310-9956-ffa450edef68
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
registered. In some cases, however, the Date convertor would be used
instead of the more correct Timestamp convertor. This fix implements a
most-specific type algorithm to find the better convertor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497890 13f79535-47bb-0310-9956-ffa450edef68
If in Webtools Log Configuration, I check all debugging levels (ie add verbose to OOTB default), I don't get simple verbose lines in log, same with OFBiz trunk and all releases, but old R4.0 from 2007 where you get tons of lines (including debug lines from 3rd parties libs, this last feature still works in newer code versions).
By simple verbose lines I mean
{code}
Debug.logVerbose()
{code}
or
{code}
if (Debug.verboseOn()) Debug.logVerbose()
{code}
contrary to
{code}
if (Debug.verboseOn()) Debug.logInfo()
{code}
Which are of course shown ,if you force the debugging levels to verbose (I noted this scheme is often used in OFBiz OOTB).
When you set a logger to ALL (aka verbose) for a specific package or class, then also it does not work (no Debug.logVerbose() lines printed in logs)
I tried in webtools log config to add a logger to a class or/and package, set to DEBUG or ALL, and to even to use -DDEBUG=true system property (found in Debug class code), to no avail.
I barely checked the situation is the same from OFBiz R9.04 (included) to trunk.
Let me clarify again:
* Setting, dynamically or not, the verbose level, you get all Debug.log() levels lines in log, including lower levels like DEBUG (not used in OFBiz but in 3rd parties libs), but not the OFBiz Debug.logVerbose() lines
* Adding a logger for a class or package with ALL level does not work. You don't get the verbose lines of this class/package in logs.
With trunk demo, you can easily try both Webtools Log Configurations and any combinations running the getPartyFromEmail service from Webtools (paramater: ofbiztest@example.com) and checking the log: https://demo-trunk.ofbiz.apache.org/webtools/control/LogView.
I believe the previous behaviour (like in R4.0) where, when you set all debugging levels, you get all log lines including Debug.logVerbose() ones, is not wanted. You then get too much lines and it's barely usable (too much information kills the information). What I want: see only Debug.logVerbose() lines for a class or package, I don't want to see all Debug.logVerbose() lines (you never get them at the moment anyway) or if (Debug.verboseOn()) lines (you get them when checking all debugging levels).
I thought this was working, but I must say I never succeeded to get it working. So I thought it was my way of doing it. But now, I'm quite sure it's an incomplete feature, that I even qualify a bug (we need that, even in previous releases)
As I said, putting the whole on Verbose level works but is not enough. You are then facing too much information and it blurs/clutters logs too much
Dynamically setting the log level for a class or package is most useful when willing to debug core features and even custom ones.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1491188 13f79535-47bb-0310-9956-ffa450edef68
1. ResourceLoader instances are now thread-safe, though the static methods that cache DOM objects are not.
2. Code cleanup and better XML validation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489801 13f79535-47bb-0310-9956-ffa450edef68
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68