Jacopo Cappellato
7a45106e87
Some minor cleanups
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364998 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 12:10:09 +00:00
Jacopo Cappellato
fdacdb49c4
Refactored all JMS service related code to not depend on the ServiceDispatcher.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364990 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 11:47:12 +00:00
Adrian Crum
bdc878b98e
Now that client code no longer references the GenericDispatcher class, we can hide it in the factory.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364982 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 11:30:12 +00:00
Jacopo Cappellato
bf7606987c
changed some comments/docs to refer to LocalDispatcher instead of ServiceDispatcher
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364980 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 11:25:08 +00:00
Adrian Crum
c1c4af837a
Code cleanups/fixups and JavaDocs for the new service component classes.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364972 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 10:46:08 +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
David E. Jones
3ec005ae79
Changed so that cus-obj element value is not in a CDATA block; it is already hex encoded so does not need to be in a CDATA block, and in entity exports of the RuntimeData entity it ends up being causing a nested CDATA block, which is not allowed
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364822 13f79535-47bb-0310-9956-ffa450edef68
2012-07-23 22:10:29 +00:00
Jacopo Cappellato
2bff493b7a
Removed a few useless/incorrect references to the ServiceDispatcher class.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364615 13f79535-47bb-0310-9956-ffa450edef68
2012-07-23 12:51:12 +00:00
Jacopo Cappellato
7dcbf47605
Refactored DispatchContext class to be thread safe thru immutability; resorted its methods to improve the readability; added some comments to better describe it.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364564 13f79535-47bb-0310-9956-ffa450edef68
2012-07-23 10:15:13 +00:00
Jacopo Cappellato
788647f571
Further cleanups to the DispatchContext class:
...
* service definitions are created automatically by the setDispatcher method in order to guarantee the validity of the object status
* removed get/setAttributes (and supporting field) that were an old and not used feature
* made the "name" field final (small step in the direction of improving the thread safety of the class, there is still some work to do here)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364512 13f79535-47bb-0310-9956-ffa450edef68
2012-07-23 06:35:03 +00:00
Jacopo Cappellato
85ee9e142b
Small change to javadoc: it is not a good practice to refer to a specific implementation class in an interface method description
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364511 13f79535-47bb-0310-9956-ffa450edef68
2012-07-23 06:30:11 +00:00
Jacopo Cappellato
bf8f4a1308
Removed invalid references to non existing resources.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364247 13f79535-47bb-0310-9956-ffa450edef68
2012-07-22 09:54:02 +00:00
Jacopo Cappellato
e3ad85e49f
First pass of a rather relevant cleanup of service related code:
...
* removed the support for serviceReaderUrls for local services specified in the WEB-INF folder; this feature was not used in years and OFBiz has better mechanisms to define services in components;
* as a consequence of the previous point, a lot of code has been cleaned in the DispatchContext class; in this refactoring, I have fixed some non thread safe code (but this is only a first step and this class needs to be enhanced under this aspect)
* greatly simplified the static instance creator and constructors of ServiceDispatcher and GenericDispatcher to reflect the changes in DispatchContext but also removed old unused code, simplified code for readability, added some comments to better document it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364222 13f79535-47bb-0310-9956-ffa450edef68
2012-07-22 07:33:48 +00:00
Jacques Le Roux
e3d7c51870
A patch from Leon for "IndexOutOfBoundsException thrown by ServerHitBin.countHit" https://issues.apache.org/jira/browse/OFBIZ-4969
...
This exception thrown out when initiated a "json" request.
229156224 [http-bio-0.0.0.0-443-exec-6138] ERROR org.ofbiz.webapp.control.ControlServlet -
---- runtime exception report --------------------------------------------------
Error in request handler:
Exception: java.lang.IndexOutOfBoundsException
Message: index: 0
---- stack trace ---------------------------------------------------------------
java.lang.IndexOutOfBoundsException: index: 0
javolution.util.FastList.add(FastList.java:228)
org.ofbiz.webapp.stats.ServerHitBin.countHit(ServerHitBin.java:210)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364046 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 08:43:19 +00:00
Jacopo Cappellato
519465c113
Made constructor private according to the design of this class (instances are created using the static getModelReader that also takes care of managing the cache).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364045 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 08:39:11 +00:00
Jacopo Cappellato
6d0ba853f5
removed unused field
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364044 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 08:34:17 +00:00
Jacopo Cappellato
0ab73e004f
Fixed a comment.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363701 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:58:57 +00:00
Jacopo Cappellato
bfbf80afdb
Small enhancements to log messages
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363699 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:58:08 +00:00
Jacopo Cappellato
7d473126d3
removed unused imports.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363698 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:57:13 +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
59aed51931
Removed some Geronimo/RMI specific code that was causing issues during system shutdown (several attempts to shutdown the RMIContainer); the code had also some tweaks that made the classes less readable; the static containerMap in ContainerLoader was breaking thread safety because the put operations were not atomic with the related add operations of the loadedContainers list.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363656 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 05:41:27 +00:00
Jacopo Cappellato
0b2643c740
Small improvement: better log messages during system shutdown.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363655 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 05:33:35 +00:00
Adrian Crum
73f645bb43
Revert some local modifications that were unintentionally committed in rev 1360283.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362889 13f79535-47bb-0310-9956-ffa450edef68
2012-07-18 11:34:41 +00:00
Adrian Crum
3df18870cc
Some trivial changes in the entity config classes - mostly JavaDocs, remove unnecessary calls to UtilValidate. No functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362790 13f79535-47bb-0310-9956-ffa450edef68
2012-07-18 07:15:45 +00:00
Adrian Crum
ca716388f8
Added a new attribute to the entity definition - "redefinition" - which will suppress "Entity is defined more than once" warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362772 13f79535-47bb-0310-9956-ffa450edef68
2012-07-18 05:42:24 +00:00
Jacopo Cappellato
32165e83a7
Trivial cleanup: removed an unnecessary private field.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362492 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 13:41:27 +00:00
Jacopo Cappellato
2176d521e2
Removed an unnecessary synchronized block (because it was using as a lock the "this" instance and it was already inside of a synchronized method).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362485 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 13:32:16 +00:00
Jacopo Cappellato
eed72271fb
Changes to fix some thread unsafe code in the JobManager constructors.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362469 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 12:28:24 +00:00
Adrian Crum
32697a7440
Fixed a bug in Mini-language <set> element validation.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362445 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 11:09:13 +00:00
Jacopo Cappellato
8693969ac4
Refactored the very old code in the org.ofbiz.service.job package to leverage the Executor framework of java.util.concurrent rather than relying on ad-hoc synchronization and thread management: the new code is simpler, smaller and it is now easier to review and change the execution policy; two attributes of service-config.xsd have been deprecated as they are not used in the new version ("jobs" and "wait-millis").
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362422 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 09:20:42 +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
Adrian Crum
60c0ab03d6
Bug fix in ServiceDispatcher.java: restore GenericDelegator state before throwing exception. https://issues.apache.org/jira/browse/OFBIZ-4967
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361958 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:58:58 +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
16ce8dcb0f
Removed no more used folder/image
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361951 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:31:06 +00:00
Jacques Le Roux
188353ef90
Tiny improvement in doc
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361946 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:16:57 +00:00
Adrian Crum
7c5c1aa4a8
Fixed semaphore handling issues in ServiceDispatcher.java. https://issues.apache.org/jira/browse/OFBIZ-4967
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361944 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:05:14 +00:00
Adrian Crum
b6fb21c822
Removed ugly checkDebug method from ServiceDispatcher.java. https://issues.apache.org/jira/browse/OFBIZ-4967
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361931 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 08:12:16 +00:00
Adrian Crum
fe73aed662
Small cleanup in properties schema.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361922 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 07:16:35 +00:00
Adrian Crum
115e96c2f6
New feature - performance metrics. Web application integration.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361727 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:11:44 +00:00
Adrian Crum
43a9cbef12
New feature - performance metrics. Service engine integration.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361725 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:10:50 +00:00
Adrian Crum
cfc9f619c3
New feature - performance metrics. Webtools UI.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361724 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:09:26 +00:00
Adrian Crum
2a0058a04b
New feature - performance metrics. Basic code and services.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361722 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:07:59 +00:00
Adrian Crum
7cfc77c5fd
Removed webtools servlet context parameters that were pointing to non-existent files.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361476 13f79535-47bb-0310-9956-ffa450edef68
2012-07-14 06:55:14 +00:00
Jacopo Cappellato
3aa85842f2
Moved the "birt" component out of framework to specialpurpose; moved all the birt reports from the applications to the birt component itself, where the application webapps are overriden to inject the reports; the end result is the same but since all these birt reports are simply a proof of concepts that cannot be used in production (for example they use hardcoded userlogin for authentication) the birt component should be probably disabled by default (but this will be discussed in the dev list).
...
Now it will be very easy to extract the birt component (for OFBiz Extras) or to disable it when deploying to production or when interested in sparing some hardware resources. I did some cursory tests but since the work has been challenging and rather complex I would appreciate testing help and also reviews to finds chunks of code that I could have missed and that could be moved out as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361130 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 09:48:32 +00:00
Adrian Crum
b8b8a5fa49
Fixed booleanExpr type in Mini-language schema. Reported by Olivier on the dev mailing list.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361073 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 07:56:04 +00:00
Jacques Le Roux
870bf35ef6
Rhaaa, I had a svn changelist for OFBIZ-3913 pending and did not notice those changes for
...
r1356471 Housekeeping of jar files" https://issues.apache.org/jira/browse/OFBIZ-4833
Moves Minerva and XAPool to Attic
Keeping changelists with no changes in it is a bad things, I should not forget that :/
Fortunately not biggie at all
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360902 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 20:04:41 +00:00
Jacopo Cappellato
d743e3853b
Replaced usage of java.util.Timer with the more modern and reliable ScheduledThreadPool executor.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360691 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 14:16:43 +00:00
Jacopo Cappellato
42db3b8ca8
Removed "loader" element and all supporting code that I had recently introduced and that it is no more needed now that I have completed (in rev. 1360637) the support to set loader profiles in the startup properties.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360681 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 13:50:25 +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