Commit Graph
191 Commits
Author SHA1 Message Date
Taher A. Alkhateeb 7d2d6216ca Improved: Refactor and simplify the startup sequence in OFBiz
(OFBIZ-8337)

Continuing the refactoring work on the startup sequence, this commit
specifically focuses on the ComponentContainer and how it loads
components into the system. The following changes are made:

- simplify and cleanup the ofbiz-containers.xml to have only one entry
- substantially simplify the ComponentLoaderConfig class and remove unnecessary defined state
- delete the JustLoadComponentsContainer (used to exist for the server command --testlist which no longer exists)
- fully refactor the ComponentContainer class and breakup the messy logic into chunks of private methods. The methods are also properly documented.
- remove an old reference to the testlist container which no longer exists



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1772256 13f79535-47bb-0310-9956-ffa450edef68
2016-12-01 19:29:23 +00:00
Taher A. Alkhateeb d44020f0d6 Improved: Refactor and simplify the startup sequence in OFBiz
(OFBIZ-8337)

This is a major refactoring exercise to simplify the startup sequence in
OFBiz. There are no functional changes, however, both the logic and the
API signatures of the core classes in OFBiz are changed to help simplify
the startup sequence. The changes insofar are summarized as:

- Rename ContainerConfig.Container to ContainerConfig.Configuration, the old
  nameing was very confusing as it confuses it with actual containers
- Change the signature of ContainerLoader and Container to accept
  List<StartupCommand> instead of String[]. And also migrate the adapter for
  converting these args into a standalone class called
  StartupCommandsToArgsAdapter
- Remove the LockedBy annotation as it is not used
- Substantially simplify the ContainerLoader load and unload logic and delete
  the start logic (merge it with load). The interface StartupLoader was updated
  accordingly
- Remove old logic to load containers in hot-deploy components
- Remove printThreadDump output from ContainerLoader which used to exist for
  debugging purposes and is no longer necessary
- Cleanup the AdminServer startup logic
- Change the StartupControlPanel logic to use only one StartupLoader instead
  of a list. The only implementation is ContainerLoader
- Remove the synchronized blocks in StartupControlPanel due to having only one
  loader
- Update the startup .properties files to reflect the changes in the startup
  logic
- Update the TestRunContainer to use List<StartupCommand> in its logic

We expect more commits (specifically to the containers) to complete this
refactoring initiative



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765127 13f79535-47bb-0310-9956-ffa450edef68
2016-10-16 09:07:08 +00:00
Jacques Le Roux ef7996c983 Fixes "Remove warnings regarding missing component lib folders" - https://issues.apache.org/jira/browse/OFBIZ-7776 - by cleaning/clearing the references to non existent/empty dirs.
Notes: 
* Also removes empty framework/base/lib/scripting and useless applications\content\lib\uno\README (miss doc in wiki)
* When jpim-0.1.jar will be (hopefully) replaced we can drop lib ref in framework/base/ofbiz-component.xml
* I wonder if we should let the geronimo component alone with only 2 classes, could we not put that in entity or entityext?
 
    



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755306 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 12:27:21 +00:00
Taher A. Alkhateeb 59fa9f46cd Remove the testlist OFBiz server command - OFBIZ-7924
Apply the following:
- remove the testlist command from options available in OFBiz server
- Delete the TestListContainer.java which implement the behavior
- Update the Config file to ignore properties related to that command
- Delete the properties file related to the command.

This has reference to the above JIRA and the below discussion
thread in which the community agreed to remove the testlist
server command from OFBiz. This command is an old and deprecated
command that used to create an ant script which iterates over all
test suites and execute them consecutively. It is both not-needed
and also deprecated given its dependence on Ant.

The discussion thread:
http://ofbiz.markmail.org/message/r64igaf6ihvpolaa


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1754507 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 12:42:55 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb b37ef2d280 Migrate ALL java files from /src to /src/main/java - OFBIZ-7790
This is the first of two steps in the above mentioned JIRA. This
first step changes the java source directory for every component
from /src to /src/main/java. The next step will be adding unit
tests to every component in /src/test/java

Thank you to Deepak Dixit for tips on how to use the SVN commands
to make the appropriate file moving.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00
Taher A. Alkhateeb 4d2b415a91 Another major patch for OFBIZ-7534 replacing Ant with Gradle
This is the first patch that takes OFBiz to the point of no return
in terms of switching from Ant to Gradle build system. Specifically
this patch applies the following items:

- Delete all old Ant and Maven build scripts
- Delete 169 Jar libraries and replace them with remote ones in the
  gradle build script
- update the gradle build scripts for the dependencies and other minor
  changes needed for the script work correctly

All tests pass with the command ./gradlew cleanAll loadDefault testIntegration

Again, thank you for everyone who contributed valueble time and effort in this
process.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752033 13f79535-47bb-0310-9956-ffa450edef68
2016-07-09 18:10:19 +00:00
Christian Geisert 7156d8fbe2 OFBIZ-6936 Fix broken 'run-test-list' target
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735244 13f79535-47bb-0310-9956-ffa450edef68
2016-03-16 15:38:04 +00:00
Jacques Le Roux b3f2a59616 No functional changes: arranges imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1718153 13f79535-47bb-0310-9956-ffa450edef68
2015-12-06 09:06:48 +00:00
Jacques Le Roux 58cbed1366 Updates Spring Framework to 4.2.3, rename org.springframework.*-3.1.0.M2.jar to spring-*-4.2.3.jar as it's the name used by Spring. OFBIZ-6754
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1718109 13f79535-47bb-0310-9956-ffa450edef68
2015-12-05 17:39:44 +00:00
Hans Bakker 582f8e6eb0 Selenium web driver integration using XML files: https://issues.apache.org/jira/browse/OFBIZ-6618
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709516 13f79535-47bb-0310-9956-ffa450edef68
2015-10-20 06:34:32 +00:00
Jacques Le Roux 067df90ae1 After r1695126, I found that most of the Java files have svn:eol-style=native. So only 116 Java files were missing svn:eol-style=native. I guess those have been added by committers who are not using the OFBiz svn config file on their machines. So rather than removing svn:eol-style=native, this commits add the property to the files which miss it. Here 116+89=205 files have their svn:eol-style property changed to native.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695129 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:33:23 +00:00
Jacques Le Roux dca48b0893 Reverts r1044202. No functional change.
This reverts svn:eol-style=native on Java files which were forced by r1044202n, 89 Java files are concerned. This commit hopefully makes things more consistent. 
It's indeed hard to see the impact of this change before it's committed. I'll check once done, I already found 116 Java files w/o svn:eol-style=native but there are 1231 Java files at all, so not sure how most are set...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695126 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:15:37 +00:00
Adrian Crum f315f0d5be Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00
Jacques Le Roux 2739265d35 A slightly modified patch from Divesh Dutta for "The <delete> action in <entity-engine-xml> definitions throw an error in tests" https://issues.apache.org/jira/browse/OFBIZ-5906
Data loading for xml data was working fine when <delete>,<create>, <create-update> tag were used . But these tags were not working when data was loaded at the time of running J-unit tests. So after researched that how data loading was working fine for simple data load. So I used the same way than in EntityDataLoader.java to parse the XML file. 

jleroux: I simply removed the old code Divesh commented out in his patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648668 13f79535-47bb-0310-9956-ffa450edef68
2014-12-31 10:01:56 +00:00
Adrian Crum df526ee5cf Remove Javolution from the testtools component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635907 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:31:51 +00:00
Jacopo Cappellato d4d1d92fff Conversion from FastList to ArrayList
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622407 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 06:25:05 +00:00
Adam Heath c44853b234 Remove the empty dir, which then re-broke compilation of testtools.
This reverts all of the recent built-system breakage.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605213 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 22:51:31 +00:00
Adrian Crum b934663b22 Fix broken build.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605160 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 19:16:18 +00:00
Jacopo Cappellato f537b94481 Minor change to avoid adding to the logs the empty error/failure lists (in case of no errors/failures).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1579240 13f79535-47bb-0310-9956-ffa450edef68
2014-03-19 14:34:03 +00:00
Jacopo Cappellato 0fcd1d38b1 Removed unnecessary jar.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1570622 13f79535-47bb-0310-9956-ffa450edef68
2014-02-21 16:29:53 +00:00
Adrian Crum 3183961741 ComponentConfig.java refactor - thread-safety for the ComponentConfig inner classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534264 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 16:17:26 +00:00
Erwan de Ferrieres c40c76c80c using for each in testtools
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1369430 13f79535-47bb-0310-9956-ffa450edef68
2012-08-04 20:34:25 +00:00
Erwan de Ferrieres a41366e95f as suggested by Adrian, replacing @see by @Override in commit 1367751
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1369357 13f79535-47bb-0310-9956-ffa450edef68
2012-08-04 16:15:36 +00:00
Erwan de Ferrieres 6f363f4480 updating javadoc for Container#init
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1367751 13f79535-47bb-0310-9956-ffa450edef68
2012-07-31 20:25:26 +00:00
Jacopo Cappellato 955ae9eee1 A rather important refactoring of service related code:
* new factory interface for LocalDispatcher objects
* new factory implementation of GenericDispatcher
* new ServiceContainer container that initializes the factory (based on a configuration parameter)
* moved the getLocalDispatcher method out of GenericDispatcher and refactored (in a thread safe way) into ServiceContainer/GenericDispatcherFactory
* ServiceContainer also maintains the cache of LocalDispatchers that was managed by GenericDispatcher
* added code to ServiceContainer to deregister LocalDispatchers at shutdown: this finally fix the current code that was broken because the thread pool maintained by the JobPoller was never closed because of an issue with LocalDispatchers not being deregistered when not started by the ContextFilter
* change all code to call the ServiceContainer rather than GenericContainer to get a LocalDispatcher: now the implementation is no more directly referenced by calling code


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364952 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 09:16:26 +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 b835d4f17d Forgot to commit these mods; they should have been part of rev. 1355854
Thanks to Adrian Crum for the report (build was failing)




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355923 13f79535-47bb-0310-9956-ffa450edef68
2012-07-01 15:07:21 +00:00
Jacopo Cappellato c386b7fc9a Added new "name" argument to the "init" method of the Component interface: now the name of the container (set by the xml attribute container.name) is passed to the init method and it is used to retrieve the container's configuration; before of this the container's name was hardcoded preventing the ability to define (and load) two containers (with different settings) of the same type.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355652 13f79535-47bb-0310-9956-ffa450edef68
2012-06-30 06:32:00 +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
Jacopo Cappellato 6ba24ed4bc As discussed in the dev list a few months ago, this commits removes Seleniumxml from the trunk.
Seleniumxml was a subcomponent of the framework/testtools intended to facilitate the usage of Selenium tests in OFBiz.
However it was never upgraded to the new version of Selenium and it has not been widely adopted by the community; the OFBiz community agreed to remove components/tools like this from the core distribution if they are optional/very specific or not well maintained or if there is (as in the case of Selenium) a valid external alternative to perform the same actions.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1354380 13f79535-47bb-0310-9956-ffa450edef68
2012-06-27 09:19:20 +00:00
Jacques Le Roux baa73733d2 Where it shows that maintaining help is not that easy. Unlike Javadoc you don't have under eyes when changing things
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343030 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 10:41:13 +00:00
Jacques Le Roux 3369dca046 Replaces title="${uiLabelMap.CommonEmptyHeader}" by title=" " where it's known to not be a problem. Here with links styled by widget-style="buttontext"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340373 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 08:45:18 +00:00
Ashish Vijaywargiya e0971b304c Applied similar fix as we did on trunk r1300463.
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)

Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-09 05:28:17 +00:00
Scott Gray 37dcad0e67 Removing Jython tests as an option since it was never actually implemented, if we add script support now it'll likely be using Adrian's recent work and won't require a specific implementation for each script engine
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1331751 13f79535-47bb-0310-9956-ffa450edef68
2012-04-28 11:30:14 +00:00
Adrian Crum d66f311eb7 Updated all Mini-language xml files to use the new schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328827 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 09:18:24 +00:00
Jacques Le Roux 5b43cd8035 Updates log4j from log4j-1.2.15.jar to log4j-1.2.16.jar.
BTW this remind me Jacopo's question (on user ML) about Selenium in OFBiz usage...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293808 13f79535-47bb-0310-9956-ffa450edef68
2012-02-26 11:23:13 +00:00
Hans Bakker 380d3638c4 revert 1229478 : test result files are empty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1229799 13f79535-47bb-0310-9956-ffa450edef68
2012-01-10 23:29:24 +00:00
Hans Bakker f207e9cd22 make test-results location configurable in a propoerties file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1229478 13f79535-47bb-0310-9956-ffa450edef68
2012-01-10 07:13:31 +00:00
Erwan de Ferrieres 858f807812 Moving from System.out.println to Debug.logInfo in RemoteRequest.java
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202872 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 20:18:04 +00:00
Erwan de Ferrieres e8160c3c00 moving from while and iterators to for each in RemoteRequest.java
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202870 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 20:07:36 +00:00
Erwan de Ferrieres cd830d3869 removing unused variable and useless return in RemoteRequest
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202858 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 19:47:28 +00:00
Erwan de Ferrieres c93edc15e6 Removing useless commented code in RemoteRequest.java
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202856 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 19:40:37 +00:00
Erwan de Ferrieres 347707f69c Removing unused and not related to OFBiz trunk method : RemoteRequest#login
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202851 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 19:36:04 +00:00
Erwan de Ferrieres 82a2025c35 Correcting deprecated methods since migration to http-core 4.1.1
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202849 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 19:30:34 +00:00
Jacques Le Roux 2b712efb98 No functional changes, simple code refactoring around UtilValidate.is(Not)Empty()
Changes implementation of UtilValidate.isEmpty() for Collection and Map by using isEmpty() instead of c.size() == 0). It's more clear and as efficient. Removes also useless parentheses there.

Makes use of UtilValidate.is(Not)Empty() everywhere it makes senses. This for 2 reasons:
* Make the code more readable by replacing the (!)null/isEmpty pattern.
* Avoid possible NPEs when only isEmpty() was used (after Entity.find... for instance). I found a lot of cases (242 today) where isEmpty() could perhaps be replaced in Framework. But I guess no NPE checks were missing there and anyway it was too much for me to check them all... So I only did the relevant changes in Applications...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169478 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 17:06:11 +00:00
Hans Bakker 2a61998b2d junit tests to test the change in r1163083 to have invoicing per order/or shipment. Also added spring jar files to be able to test ofbiz events.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1163084 13f79535-47bb-0310-9956-ffa450edef68
2011-08-30 04:25:28 +00:00
Hans Bakker 0a59303a34 remove the rest of the website definitions from seed data, the ones that are left are in the demo data
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1158099 13f79535-47bb-0310-9956-ffa450edef68
2011-08-16 03:43:06 +00:00
Marco Risaliti a57455cac4 Removed some javadoc warning (wrong param/return) into testtools component no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126734 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 20:44:02 +00:00
Marco Risaliti 2d629008ec Replace tab by 4 spaces introduced by me on the previous commit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126636 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 18:27:08 +00:00