Commit Graph
114 Commits
Author SHA1 Message Date
Jacopo Cappellato 0136f12d3a Removed some obsolete properties set at startup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622468 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 12:40:15 +00:00
Jacopo Cappellato 0a5af77359 Moved the constructor at the top of the class, removed 2 static methods that were used to construct the object and embedded the logic in the constructor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622441 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 10:01:07 +00:00
Jacopo Cappellato 1c904a98d8 The Config class, that was used as an immutable object, is now effectively immutable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622427 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 09:05:32 +00:00
Jacopo Cappellato 8796e166d0 Removed unused field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622412 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 07:44:41 +00:00
Adrian Crum b6c4dd5315 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617938 13f79535-47bb-0310-9956-ffa450edef68
2014-08-14 13:36:33 +00:00
Adrian Crum 4462994828 Fixed a bug in Start.java reported by Justen Walker (https://issues.apache.org/jira/browse/OFBIZ-5710):
The singleton pattern was broken by adding Commons Daemon support code to the class - resulting in multiple instances when using Commons Daemon.

I extracted the Commons Daemon code to a separate class - which delegates to the singleton Start instance. Users of Commons Daemon will need to update their scripts/etc to point to the new class instead of Start.

I also added a comment describing the design of Start.java, so hopefully this will help others maintain the code without breaking it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617936 13f79535-47bb-0310-9956-ffa450edef68
2014-08-14 13:27:39 +00:00
Jacopo Cappellato 80e2f28c1c Removed some code that was checking, in a rather weak way, the Java version at startup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616492 13f79535-47bb-0310-9956-ffa450edef68
2014-08-07 14:17:41 +00:00
Jacopo Cappellato 3cfa3cff3e OFBIZ-5651: fixed broken settings for the appserver execution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605977 13f79535-47bb-0310-9956-ffa450edef68
2014-06-27 07:37:22 +00:00
Adrian Crum 714050ef33 Updated build files to use/require Java 7.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605524 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 17:59:46 +00:00
Jacques Le Roux 606501012e Revert r1589562, it was not the origin of the issue Hans thought he crossed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1590630 13f79535-47bb-0310-9956-ffa450edef68
2014-04-28 13:31:11 +00:00
Hans Bakker 25312fa05c adminport in start.properties was ignored. fixed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589562 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 03:57:06 +00:00
Jacques Le Roux 8860a9459d Fixes a bug introduced with r1574404 (forgot that shutdown and status historicaly have a prefixing dash), thanks to Youseek Khaye who spotted it and sent me a mail (the stop target was no longer working). I tested them only with a portoffset, my bad.
While working on this I spotted another error introduced earlier with r1533839. Now, status and stop work again as before. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1577744 13f79535-47bb-0310-9956-ffa450edef68
2014-03-14 22:20:34 +00:00
Jacques Le Roux 1e99cffcb1 Completes descriptions of ant targets which have portoffset parameter
Completes code in Config.java for start-debug only (adds "start-debug" to pick start.properties when portoffset is used). 
The rest of the changes is only refactoring to have the replacement to pick start.properties only in getInstance()

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1574404 13f79535-47bb-0310-9956-ffa450edef68
2014-03-05 09:46:26 +00:00
Jacques Le Roux ae2d3dedf3 Running OFBiz with start-batch, stopping it then or checking its status was missing, this completes these aspects.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1574201 13f79535-47bb-0310-9956-ffa450edef68
2014-03-04 21:02:13 +00:00
Adrian Crum ba484bafa6 Fixed a C&P error in the startup code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542513 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 13:55:25 +00:00
Jacques Le Roux c386f6ab30 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*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
2013-10-19 22:07:35 +00:00
Jacques Le Roux 0ef1ff543e Reverts revisions: 1525909 + 1526533 + 1526560, OFBIZ-4794 is not yet ready
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526583 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 15:44:40 +00:00
Jacques Le Roux 59f4630664 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
Complete previous work because of INFRA-6790

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526533 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 14:58:47 +00:00
Jacques Le Roux c86a579cf8 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*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
2013-09-24 14:47:30 +00:00
Adam Heath 523ffda8be FIX: Make commons-daemon reflection access work again; this was broken
because the constructor was private, and the init(String[]) method was
removed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481999 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:39 +00:00
Adam Heath 0dde029713 FORMATTING: The empty constructor body is no longer on a single line.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481998 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:32 +00:00
Jacopo Cappellato 27c1c384a4 Moved the appserver component from framework to specialpurpose.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465276 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 17:25:01 +00:00
Jacques Le Roux 87a9e9b312 This prevented to load both web and pos simultaneously (both-containers.xml does not exist anymore).
It needs a compilation to work again.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1451879 13f79535-47bb-0310-9956-ffa450edef68
2013-03-02 12:32:11 +00:00
Scott Gray 04df9cb162 Add a bunch of missing Override annotations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418651 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:40 +00:00
Scott Gray 0af4184d61 Remove a bunch of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418650 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:01 +00:00
Adrian Crum 0828388d85 More work on Start.java - added the capability for client code to query the class for server state.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374720 13f79535-47bb-0310-9956-ffa450edef68
2012-08-19 09:59:31 +00:00
Adrian Crum 9a7cbede73 Some work on Start.java:
1. Removed unused method.
2. Consolidated/separated the Commons Daemon implementation - this just makes it easier to distinguish it from the rest of the code.
3. Changed some public methods to private, and added a private constructor.
4. Made ServerState enum public.

These changes are in preparation for enabling client code to query the class for the server's state.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374711 13f79535-47bb-0310-9956-ffa450edef68
2012-08-19 08:46:21 +00:00
Adrian Crum 3425bca428 Re-organize and format code in Start.java - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374705 13f79535-47bb-0310-9956-ffa450edef68
2012-08-19 08:05:46 +00:00
Adrian Crum 5b24afe6ab Fixed generics in Config.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374704 13f79535-47bb-0310-9956-ffa450edef68
2012-08-19 08:04:43 +00:00
Jacques Le Roux 368c3d43a2 Fixes generic warning
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363690 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:10:30 +00:00
Jacques Le Roux c46b891ca8 Removes dead code, organize imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363689 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:09:38 +00:00
Jacopo Cappellato 6137a3bf47 Minor change to set a consistent naming format for all the threads started by OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362417 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 09:05:33 +00:00
Jacopo Cappellato 78a8738a8f Minor change to use the Runtime class to get the number of processors rather than MxBeans.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361955 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:54:27 +00:00
Jacopo Cappellato 20b343d1f5 Unified all the different variants of *-containers.xml files into one; this has been made possible because now you can declare the container loaders in the startup properties; also moved some container definitions from base/config to the proper component.
It is now very easy to control the way containers are loaded.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360637 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 11:34:41 +00:00
Jacopo Cappellato 068430fb8b Moved a few container definitions from the base/config/*-containers.xml files to their own component's ofbiz-component.xml file; this is a demonstration of the usage of the new ability to define component level containers; this is still experimental and there is room for improvements (and I am working on them and going to discuss a few details in the dev list) but this should already give a good idea of how we can remove redundancy from the various *-containers.xml files, remove dependencies between framework components and make the components self deployable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355466 13f79535-47bb-0310-9956-ffa450edef68
2012-06-29 16:43:51 +00:00
Hans Bakker 32b7ee65bf reverting 1334331: unwanted commit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334333 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 07:52:25 +00:00
Hans Bakker 42341068ec set memory back to 640k and add demo message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334331 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 07:43:19 +00:00
Adam Heath b24617935b FEATURE: Start supporting commons-daemon explicitly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327257 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:58:09 +00:00
Adam Heath ba177f3aca OPTIMIZE: Add a new FAIL Control, and move the processing into a method on the
enum.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327256 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:58:03 +00:00
Adam Heath ecefbd3452 OPTIMIZE: Don't use static Strings to hold the commands sent over the
socket; instead, use an enum.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327255 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:57:57 +00:00
Adam Heath fffea48b81 FIX: Fix race condition in startup code; it's possible for all loaders to be
started, a shutdown command get's issued, stopping is occurring, but
then the server state ends up being set to RUNNING.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327254 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:57:50 +00:00
Adam Heath 39db7dfc5a OPTIMIZE: Remove the 2 boolean variables that encoded the startup/shutdown state,
and instead use a single reference, and an enum.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327253 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:57:44 +00:00
Adam Heath 940ee4480b OPTIMIZE: If the specified instrumentation class is not found, don't
bother printing the thrown exception; this is a standard situation,
where the required jar may not have been downloaded, and the
instrumenter not compiled.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327252 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:57:38 +00:00
Adam Heath f319440097 OPTIMIZE: Remove some debug prints from Start.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327251 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 19:57:28 +00:00
Jacques Le Roux 1689c99809 Finally revert to previous values, in order to avoid possible confusion with values in properties file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325369 13f79535-47bb-0310-9956-ffa450edef68
2012-04-12 16:40:40 +00:00
Jacques Le Roux c4c9542348 Oops, missed this file in r1324989
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324990 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 20:35:52 +00:00
Jacques Le Roux c79283dbfc A patch from Francis ANDRE "unify admin port and key setting: single point of definition in start.properties" https://issues.apache.org/jira/browse/OFBIZ-4793
If someone wants to change the admin password or port, he would have to change currently many files (-- build.xml, various .bat and .sh --). In order to avoid this error-prone pratice, I suggest to centralize the definition of the admin kay and port at 2 single points: the framework/start/src/org/ofbiz/base/start/start.properties and the
framework/start/src/org/ofbiz/base/start/jetty.properties

jleroux: in config.java I also changed 
String adminPortStr = getProp(props, "ofbiz.admin.port", "0");
adminKey = getProp(props, "ofbiz.admin.key", "NA");
to
String adminPortStr = getProp(props, "ofbiz.admin.port", "10523");
adminKey = getProp(props, "ofbiz.admin.key", "so3du5kasd5dn");

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324989 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 20:32:35 +00:00
Jacques Le Roux 6f6f4d8ec9 Reverts r1308078 http://svn.apache.org/viewvc?view=revision&revision=1308078 due to some pressure on this commit http://markmail.org/message/zqguh6ttd2a5jqcb
And even if I'm quite sure it's not harmful, I don't see either a great need for it


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308792 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 09:48:28 +00:00
Jacques Le Roux afde12093c A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-4776
This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.

jleroux: replaced tabs by 4 spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308078 13f79535-47bb-0310-9956-ffa450edef68
2012-04-01 11:27:45 +00:00
Erwan de Ferrieres 31a9eaaaa7 tabs to spaces, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230445 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 09:09:24 +00:00