Author: ronvoe122
Date: 2008-05-22 14:01:42-0700
New Revision: 10585
Removed:
trunk/src/java/org/tigris/scarab/util/word/MaxConcurrentSearchException.java
trunk/src/test/org/tigris/scarab/util/word/IssueSearchFactoryTest.java
Modified:
trunk/src/conf/classes/ScarabBundle_de.properties
trunk/src/conf/classes/ScarabBundle_en.properties
trunk/src/conf/classes/ScarabBundle_es.properties
trunk/src/conf/classes/ScarabBundle_fr.properties
trunk/src/conf/classes/ScarabBundle_it.properties
trunk/src/conf/classes/ScarabBundle_ja.properties
trunk/src/conf/classes/ScarabBundle_ko.properties
trunk/src/conf/classes/ScarabBundle_nl.properties
trunk/src/conf/classes/ScarabBundle_pl.properties
trunk/src/conf/classes/ScarabBundle_pt_BR.properties
trunk/src/conf/classes/ScarabBundle_ru.properties
trunk/src/conf/classes/ScarabBundle_zh_CN.properties
trunk/src/conf/classes/ScarabBundle_zh_TW.properties
trunk/src/conf/conf/TurbineResources.properties
trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java
trunk/src/java/org/tigris/scarab/actions/ReportIssue.java
trunk/src/java/org/tigris/scarab/om/MITListItem.java
trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java
trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java
trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java
trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java
trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java
trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java
Log:
SCB2544: removed the maximum limit for concurrent IssueSearch-instances in IssueSearchFactory completely.
It doesn't make a lot of sense anymore:
The initial reason for the limit was to prevent IssueSearch from allocating all available DB-connections.
The DB-connection is no more allocated and held over multiple method calls (with the risk of keeping the connection forever, if something goes wrong).
The DB-queries are no more executed by IssueSearch, but by instances of QueryResult which have a different live cycle the IssueSearch-instances.
Scarab is not of much use, if the Issue-search doesn't work. (Even entering an Issue fails, because duplicate-detection relies on the Issue-search.
Modified: trunk/src/conf/classes/ScarabBundle_de.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_de.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_de.properties&p2=trunk/src/conf/classes/ScarabBundle_de.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_de.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_de.properties 2008-05-22 14:01:42-0700
@@ -1405,7 +1405,6 @@
SomeIssueIdsNotValid=Einige TicketIDs in der Originalliste sind nicht gültig: {0}
SomeIssuePKsNotValid=Die Datenbank stimmt nicht mit der angegebenen Ticketliste überein.
ErrorProcessingQuery=Bei der Bearbeitung Ihrer Abfrage ist ein Fehler aufgetreten: {0}
-ResourceLimitationsPreventedSearch=Die aktuelle Last ist zu hoch, um Ihre Abfrage ausführen zu können. Versuchen Sie es später noch einmal.
## NotificationFilterCustomization
ActivityType=Aktivität
@@ -2126,7 +2125,6 @@
ExceptionFailedToDeleteIdentifierList=Liste der Attributnummer konnte nicht gelöscht werden. Die Fehlermeldung ist: {0}
ExceptionEmailFailure=Fehler beim Versenden einer E-Mail. Die Fehlermeldung ist: {0}
ExceptionIncompatibleMITListChanges=Inkompatible Modifikationen an Datenbank feldern.
-ExceptionMaxConcurrentSearch=Die maximale Wartezeit auf Suchinstanzen von {0} msec wurde überschritten. Um die Wartezeit zu vergrößern, verändern Sie bitte den Parameter "scarab.concurrent.search.wait" in custom.properties
ExceptionInstantiation=Eine Instanz der Klasse {0} konnte nicht angelegt werden. Die Fehlermeldung ist: "{1}"
ExceptionIllegalAccess=Unerlaubter Zugriff auf Instanzen der klasse {0}. Die Fehlermeldung ist: "{1}"
ExceptionClassNotFound=Klasse {0} nicht gefunden. Die Fehlermeldung ist: "{1}"
Modified: trunk/src/conf/classes/ScarabBundle_en.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_en.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_en.properties&p2=trunk/src/conf/classes/ScarabBundle_en.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_en.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_en.properties 2008-05-22 14:01:42-0700
@@ -1482,7 +1482,6 @@
SomeIssueIdsNotValid=Some issue IDs in the original list are not valid: {0}
SomeIssuePKsNotValid=Database did not agree with specified issue list.
ErrorProcessingQuery=There was an error processing your query: {0}
-ResourceLimitationsPreventedSearch=The current load on the application, prevented execution of the query. Please try again later.
## NotificationFilterCustomization
ActivityType=Activity type
@@ -2204,7 +2203,6 @@
ExceptionFailedToDeleteIdentifierList= Failed to delete the list of attribute identifiers. The detailed message: {0}
ExceptionEmailFailure = Failed to send an Email. The detailed error was: {0}
ExceptionIncompatibleMITListChanges = The changes are incompatible with the currently selected criteria
-ExceptionMaxConcurrentSearch = The maximum time to wait for search instances of {0} msec has exceeded. You can modify this parameter with the property "scarab.concurrent.search.wait" in custom.properties
ExceptionInstantiation = Could not instantiate class {0}. The detailed message: "{1}"
ExceptionIllegalAccess = Illegal access to instance of class {0}. The detailed message: "{1}"
ExceptionClassNotFound = Class not found {0}. The detailed message: "{1}"
Modified: trunk/src/conf/classes/ScarabBundle_es.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_es.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_es.properties&p2=trunk/src/conf/classes/ScarabBundle_es.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_es.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_es.properties 2008-05-22 14:01:42-0700
@@ -1442,7 +1442,6 @@
SomeIssueIdsNotValid = Algunos IDs en la lista original no son válidos: {0}.
SomeIssuePKsNotValid = La base de datos no coincide con la lista de peticiones especificada.
ErrorProcessingQuery = Error procesando la consulta: {0}
-ResourceLimitationsPreventedSearch = The current load on the application, prevented execution of the query. Please try again later.
## ***********************************************************************
## Misc Java Objects
@@ -2132,7 +2131,6 @@
ExceptionFailedToDeleteIdentifierList = Failed to delete the list of attribute identifiers. The detailed message: {0}
ExceptionEmailFailure = Failed to send an Email. The detailed error was: {0}
ExceptionIncompatibleMITListChanges = The changes are incompatible with the currently selected criteria
-ExceptionMaxConcurrentSearch = The maximum time to wait for search instances of {0} msec has exceeded. You can modify this parameter with the property "scarab.concurrent.search.wait" in custom.properties
ExceptionInstantiation = Could not instanciate class {0}. The detailed message: "{1}"
ExceptionIllegalAccess = Illegal access to instance of class {0}. The detailed message: "{1}"
ExceptionClassNotFound = Class not found {0}. The detailed message: "{1}"
Modified: trunk/src/conf/classes/ScarabBundle_fr.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_fr.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_fr.properties&p2=trunk/src/conf/classes/ScarabBundle_fr.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_fr.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_fr.properties 2008-05-22 14:01:42-0700
@@ -1467,7 +1467,6 @@
SomeIssueIdsNotValid = Certains ID de fiches dans la liste ne sont pas valides: {0}
SomeIssuePKsNotValid = La base de données n'est pas d'accord sur la liste de fiches spécifiée.
ErrorProcessingQuery = Une erreur est survenue en traitant votre requête: {0}
-ResourceLimitationsPreventedSearch = Une surcharge de l'application a temporairement empêché l'exécution de la requête. Réessayez plus tard.
## NotificationFilterCustomization
ActivityType = Type d'activité
@@ -2189,7 +2188,6 @@
ExceptionFailedToDeleteIdentifierList = Erreur lors de la destruction d''une liste d''identifiants d''attributs. Message détaillé: {0}
ExceptionEmailFailure = Erreur d''envoi de courriel. Message détaillé: {0}
ExceptionIncompatibleMITListChanges = Les changements sont incompatibles avec les critères sélectionnés pour l'instant
-ExceptionMaxConcurrentSearch = Le temps maximal d''attente d''une instance de recherche ({0} msec) a été dépassé. Vous pouvez modifier ce paramètre en changeant la valeur de la propriété "scarab.concurrent.search.wait" dans le fichier custom.properties
ExceptionInstantiation = Impossible d''instancier la classe {0}. Message détaillé: "{1}"
ExceptionIllegalAccess = Accès illégal à une instance de la classe {0}. Message détaillé: "{1}"
ExceptionClassNotFound = Impossible de trouver la classe {0}. Message détaillé: "{1}"
Modified: trunk/src/conf/classes/ScarabBundle_it.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_it.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_it.properties&p2=trunk/src/conf/classes/ScarabBundle_it.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_it.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_it.properties 2008-05-22 14:01:42-0700
@@ -1394,7 +1394,6 @@
SomeIssueIdsNotValid=Alcuni ID delle segnalazioni nella lista originale non sono validi: {0}
SomeIssuePKsNotValid=La base dati non è sincronizzata con l'attuale lista di segnalazioni.
ErrorProcessingQuery=Errore nell''elaborazione della ricerca: {0}
-ResourceLimitationsPreventedSearch=L'attuale carico dell'applicazione ha impedito l'esecuzione della ricerca. Riprova più tardi.
## ***********************************************************************
## Misc Java Objects
@@ -2088,7 +2087,6 @@
ExceptionFailedToDeleteIdentifierList= Impossibile cancellare la lista degli idnetificatori di attributo. Messaggio di dettaglio: {0}
ExceptionEmailFailure = Impossibile inviare l''email. Messaggio di dettaglio: {0}
ExceptionIncompatibleMITListChanges = Le modifiche non sono compatibili con i criteri attualmente selezionati
-ExceptionMaxConcurrentSearch = Il tempo massimo di attesa per ricercare istanze ( {0} msec ) è stato superato. Questo parametro è modificabile cambiando il valore della proprietà "scarab.concurrent.search.wait" nel file custom.properties
ExceptionInstantiation = Non è riuscita l''instanziazione della classe {0}. Messaggio di dettaglio: "{1}"
ExceptionIllegalAccess = Accesso illegale ad una istanza della classe {0}. Messaggio di dettaglio: "{1}"
ExceptionClassNotFound = Classe {0} non trovata. Messaggio di dettaglio: "{1}"
Modified: trunk/src/conf/classes/ScarabBundle_ja.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_ja.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_ja.properties&p2=trunk/src/conf/classes/ScarabBundle_ja.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_ja.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_ja.properties 2008-05-22 14:01:42-0700
@@ -1315,7 +1315,6 @@
SomeIssueIdsNotValid=\u5143\u306e\u30ea\u30b9\u30c8\u4e2d\u306e\u5e7e\u3064\u304b\u306e\u6848\u4ef6ID\u306f\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093: {0}
SomeIssuePKsNotValid=\u4e0e\u3048\u3089\u308c\u305f\u6848\u4ef6\u30ea\u30b9\u30c8\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002
ErrorProcessingQuery=\u30af\u30a8\u30ea\u3092\u51e6\u7406\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: {0}
-ResourceLimitationsPreventedSearch=The current load on the application, prevented execution of the query. Please try again later.
## ***********************************************************************
## Misc Java Objects
Modified: trunk/src/conf/classes/ScarabBundle_ko.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_ko.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_ko.properties&p2=trunk/src/conf/classes/ScarabBundle_ko.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_ko.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_ko.properties 2008-05-22 14:01:42-0700
@@ -1327,7 +1327,6 @@
SomeIssueIdsNotValid = Some issue ID's in the original list are not valid: {0}
SomeIssuePKsNotValid = Database did not agree with specified issue list.
ErrorProcessingQuery = There was an error processing your query: {0}
-ResourceLimitationsPreventedSearch = The current load on the application, prevented execution of the query. Please try again later.
## ***********************************************************************
## Misc Java Objects
Modified: trunk/src/conf/classes/ScarabBundle_nl.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_nl.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_nl.properties&p2=trunk/src/conf/classes/ScarabBundle_nl.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_nl.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_nl.properties 2008-05-22 14:01:42-0700
@@ -1279,7 +1279,6 @@
SomeIssueIdsNotValid = Sommige kaart ID's in de originele lijst zijn niet geldig: {0}
SomeIssuePKsNotValid = Database kwam niet overeen met de gespecificeerde kaartlijst.
ErrorProcessingQuery = Er was een fout tijdens het uitvoeren van uw zoekopdracht: {0}
-ResourceLimitationsPreventedSearch = De belasting op de applicatie is op dit moment groot en daarom is de zoekopdracht nu niet uitgevoerd. Probeer later nog een keer.
## ***********************************************************************
## Misc Java Objects
Modified: trunk/src/conf/classes/ScarabBundle_pl.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_pl.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_pl.properties&p2=trunk/src/conf/classes/ScarabBundle_pl.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_pl.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_pl.properties 2008-05-22 14:01:42-0700
@@ -1483,7 +1483,6 @@
SomeIssueIdsNotValid=Some issue IDs in the original list are not valid: {0}
SomeIssuePKsNotValid=Database did not agree with specified issue list.
ErrorProcessingQuery=There was an error processing your query: {0}
-ResourceLimitationsPreventedSearch=The current load on the application, prevented execution of the query. Please try again later.
## NotificationFilterCustomization
ActivityType=Typ aktywno\u015bci
@@ -2205,7 +2204,6 @@
ExceptionFailedToDeleteIdentifierList= Failed to delete the list of attribute identifiers. The detailed message: {0}
ExceptionEmailFailure = Failed to send an Email. The detailed error was: {0}
ExceptionIncompatibleMITListChanges = The changes are incompatible with the currently selected criteria
-ExceptionMaxConcurrentSearch = The maximum time to wait for search instances of {0} msec has exceeded. You can modify this parameter with the property "scarab.concurrent.search.wait" in custom.properties
ExceptionInstantiation = Could not instantiate class {0}. The detailed message: "{1}"
ExceptionIllegalAccess = Illegal access to instance of class {0}. The detailed message: "{1}"
ExceptionClassNotFound = Class not found {0}. The detailed message: "{1}"
Modified: trunk/src/conf/classes/ScarabBundle_pt_BR.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_pt_BR.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_pt_BR.properties&p2=trunk/src/conf/classes/ScarabBundle_pt_BR.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_pt_BR.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_pt_BR.properties 2008-05-22 14:01:42-0700
@@ -1292,7 +1292,6 @@
SomeIssueIdsNotValid=Alguns códitos de item na lista original não são válidos: {0}
SomeIssuePKsNotValid=A base de dados não concorda com a lista de ítens especificada.
ErrorProcessingQuery=Houve um erro ao processando sua consulta: {0}
-ResourceLimitationsPreventedSearch=A carga atual na aplicação, impediu a execução da sua consulta. Por favor teste novamente mais tarde.
## ***********************************************************************
## Misc Java Objects
Modified: trunk/src/conf/classes/ScarabBundle_ru.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_ru.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_ru.properties&p2=trunk/src/conf/classes/ScarabBundle_ru.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_ru.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_ru.properties 2008-05-22 14:01:42-0700
@@ -2791,8 +2791,6 @@
Resort = \u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C
-ResourceLimitationsPreventedSearch = The current load on the application, prevented execution of the query. Please try again later.
-
ResubmitError = You have attempted to re-submit data that has already been submitted. No changes have been saved.
ResultPrefs = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u043E\u0438\u0441\u043A\u0430
Modified: trunk/src/conf/classes/ScarabBundle_zh_CN.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_zh_CN.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_zh_CN.properties&p2=trunk/src/conf/classes/ScarabBundle_zh_CN.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_zh_CN.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_zh_CN.properties 2008-05-22 14:01:42-0700
@@ -1357,7 +1357,6 @@
ErrorProcessingQuery = \u5904\u7406\u67e5\u8be2\u8fc7\u7a0b\u4e2d\u53d1\u751f\u9519\u8bef: {0}
-ResourceLimitationsPreventedSearch = The current load on the application, prevented execution of the query. Please try again later.
## ***********************************************************************
## Misc Java Objects
Modified: trunk/src/conf/classes/ScarabBundle_zh_TW.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_zh_TW.properties?view=diff&rev=10585&p1=trunk/src/conf/classes/ScarabBundle_zh_TW.properties&p2=trunk/src/conf/classes/ScarabBundle_zh_TW.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_zh_TW.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_zh_TW.properties 2008-05-22 14:01:42-0700
@@ -1387,7 +1387,6 @@
SomeIssueIdsNotValid=Some issue IDs in the original list are not valid: {0}
SomeIssuePKsNotValid=Database did not agree with specified issue list.
ErrorProcessingQuery=There was an error processing your query: {0}
-ResourceLimitationsPreventedSearch=The current load on the application, prevented execution of the query. Please try again later.
## ***********************************************************************
## Misc Java Objects
@@ -2077,7 +2076,6 @@
ExceptionFailedToDeleteIdentifierList= Failed to delete the list of attribute identifiers. The detailed message: {0}
ExceptionEmailFailure = Failed to send an Email. The detailed error was: {0}
ExceptionIncompatibleMITListChanges = The changes are incompatible with the currently selected criteria
-ExceptionMaxConcurrentSearch = The maximum time to wait for search instances of {0} msec has exceeded. You can modify this parameter with the property "scarab.concurrent.search.wait" in custom.properties
ExceptionInstantiation = Could not instantiate class {0}. The detailed message: "{1}"
ExceptionIllegalAccess = Illegal access to instance of class {0}. The detailed message: "{1}"
ExceptionClassNotFound = Class not found {0}. The detailed message: "{1}"
Modified: trunk/src/conf/conf/TurbineResources.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/TurbineResources.properties?view=diff&rev=10585&p1=trunk/src/conf/conf/TurbineResources.properties&p2=trunk/src/conf/conf/TurbineResources.properties&r1=10584&r2=10585
==============================================================================
--- trunk/src/conf/conf/TurbineResources.properties (original)
+++ trunk/src/conf/conf/TurbineResources.properties 2008-05-22 14:01:42-0700
@@ -790,21 +790,6 @@
services.ScarabSecurity.action.admin.UpdateSearchIndex=Domain__Edit
services.ScarabSecurity.action.admin.SetInfoMessage=Domain__Edit
-
-# Maximum number of concurrent searches. If not given or value is negative,
-# unlimited concurrent searches are allowed (will then be limited by db
-# connections). A value of 0 will disable searching.
-# This value is not a hard limit. In cases where an exception could lead
-# either to depleting the available number or adding an extra instance,
-# adding an extra search is chosen. This property would generally be set
-# to some fraction of the maximum db connections available.
-scarab.concurrent.search.max=20
-
-# How long to wait (in seconds) for a search object if one is not
-# immediately available. If not given or value is negative, we block till a
-# search can be started. A value of 0 will fail immediately.
-scarab.concurrent.search.wait=30
-
#Templates require issue types
template.entry/Wizard1.vm.noIssueTypesForwardsTo=IssueTypeList.vm
template.entry/Wizard3.vm.noIssueTypesForwardsTo=IssueTypeList.vm
Modified: trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java&p2=trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java (original)
+++ trunk/src/java/org/tigris/scarab/actions/ConfigureReport.java 2008-05-22 14:01:42-0700
@@ -247,14 +247,7 @@
// we are using an IssueSearch object to gather the data to
// create the ReportOptionAttribute objects.
- IssueSearch search = null;
-
- try
- {
- search = scarabR.getNewSearch();
- // Set intake properties
- //Group searchGroup = intake.get("SearchIssue", search.getQueryKey());
- //searchGroup.setProperties(search);
+ IssueSearch search = scarabR.getNewSearch();
// Set attribute values to search on
for (Iterator i = search.getAttributeValuesMap(true).values().iterator(); i.hasNext();)
@@ -275,7 +268,7 @@
{
scarabR.setAlertMessage(L10NKeySet.ChangeOfTypeMessage);
}
-
+
// we are going to delete the old heading data and reconstruct it
// so if there is any group info, we need to get it first
List groups = heading.getReportGroups();
@@ -310,7 +303,7 @@
Integer id = Integer.valueOf(((AttributeValue)j.next())
.getOptionId().toString());
roa.setOptionId(id);
-
+
if (optionGroupMap == null)
{
heading.addReportOptionAttribute(roa);
@@ -336,32 +329,9 @@
{
params.setString("heading", "0");
}
-
+
String msg = getLocalizedHeadingConfirmMessage(report, l10n);
scarabR.setConfirmMessage(msg);
-
- }
- catch(Exception e)
- {
- throw e;
- }
- finally
- {
- if(search != null)
- {
- IssueSearchFactory.INSTANCE.notifyDone();
- }
- }
-
-/*
- //testing
- java.io.FileWriter fw = new java.io.FileWriter("/tmp/Report.xml");
- BeanWriter bw = new BeanWriter(fw);
- bw.writeXmlDeclaration("<?xml version='1.0' encoding='UTF-8' ?>");
- bw.write(report.getReportDefinition());
- bw.flush();
- bw.close();
-*/
}
}
Modified: trunk/src/java/org/tigris/scarab/actions/ReportIssue.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/actions/ReportIssue.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/actions/ReportIssue.java&p2=trunk/src/java/org/tigris/scarab/actions/ReportIssue.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/actions/ReportIssue.java (original)
+++ trunk/src/java/org/tigris/scarab/actions/ReportIssue.java 2008-05-22 14:01:42-0700
@@ -89,7 +89,6 @@
import org.tigris.scarab.util.ScarabConstants;
import org.tigris.scarab.util.word.IssueSearch;
import org.tigris.scarab.util.word.IssueSearchFactory;
-import org.tigris.scarab.util.word.MaxConcurrentSearchException;
import org.tigris.scarab.util.word.QueryResult;
/**
@@ -225,40 +224,26 @@
String template = null;
boolean dupThresholdExceeded = false;
- IssueSearch duplicateSearch = null;
- try
+ IssueSearch duplicateSearch = IssueSearchFactory.INSTANCE.getInstance(issue, (ScarabUser)data.getUser());
+ duplicateSearch.setLocalizationTool(getLocalizationTool(context));
+
+ List possibleDuplicates = duplicateSearch.getQueryResults();
+ dupThresholdExceeded = possibleDuplicates.size() > threshold;
+ if (dupThresholdExceeded)
{
-
- duplicateSearch = IssueSearchFactory.INSTANCE.getInstance(issue, (ScarabUser)data.getUser());
- duplicateSearch.setLocalizationTool(getLocalizationTool(context));
-
- List possibleDuplicates = duplicateSearch.getQueryResults();
- dupThresholdExceeded = possibleDuplicates.size() > threshold;
- if (dupThresholdExceeded)
- {
- List possibleDuplicateIds = new ArrayList(maxResults);
- Iterator resultsIterator = possibleDuplicates.iterator();
+ List possibleDuplicateIds = new ArrayList(maxResults);
+ Iterator resultsIterator = possibleDuplicates.iterator();
- for (int i = 0; resultsIterator.hasNext() && i <= maxResults; i++)
- {
- possibleDuplicateIds.add(((QueryResult)resultsIterator.next()).getUniqueId());
- }
- context.put("issueList", possibleDuplicateIds);
- template = "entry,Wizard2.vm";
- }
- else
+ for (int i = 0; resultsIterator.hasNext() && i <= maxResults; i++)
{
- template = nextTemplate;
+ possibleDuplicateIds.add(((QueryResult)resultsIterator.next()).getUniqueId());
}
+ context.put("issueList", possibleDuplicateIds);
+ template = "entry,Wizard2.vm";
}
- catch (MaxConcurrentSearchException e)
- {
- getScarabRequestTool(context).setInfoMessage(
- L10NKeySet.DupeCheckSkippedForLackOfResources);
- }
- finally
+ else
{
- IssueSearchFactory.INSTANCE.notifyDone();
+ template = nextTemplate;
}
setTarget(data, template);
Modified: trunk/src/java/org/tigris/scarab/om/MITListItem.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/MITListItem.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/om/MITListItem.java&p2=trunk/src/java/org/tigris/scarab/om/MITListItem.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/MITListItem.java (original)
+++ trunk/src/java/org/tigris/scarab/om/MITListItem.java 2008-05-22 14:01:42-0700
@@ -54,7 +54,6 @@
import org.tigris.scarab.util.ScarabException;
import org.tigris.scarab.util.word.IssueSearch;
import org.tigris.scarab.util.word.IssueSearchFactory;
-import org.tigris.scarab.util.word.MaxConcurrentSearchException;
import com.workingdogs.village.DataSetException;
@@ -82,28 +81,19 @@
* @exception Exception if an error occurs
*/
public int getIssueCount(ScarabUser user)
- throws TorqueException, ScarabException
+ throws ScarabException
{
- IssueSearch is = null;
int count = 0;
try
{
- is = IssueSearchFactory.INSTANCE
+ IssueSearch is = IssueSearchFactory.INSTANCE
.getInstance(getModule(), getIssueType(), user);
count = is.getIssueCount();
}
- catch (MaxConcurrentSearchException e)
- {
- count = -1;
- }
catch(Exception e)
{
throw new ScarabException(L10NKeySet.ExceptionGeneral,e);
}
- finally
- {
- IssueSearchFactory.INSTANCE.notifyDone();
- }
return count;
}
Modified: trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java&p2=trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java (original)
+++ trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java 2008-05-22 14:01:42-0700
@@ -137,7 +137,6 @@
import org.tigris.scarab.util.SimpleSkipFiltering;
import org.tigris.scarab.util.word.IssueSearch;
import org.tigris.scarab.util.word.IssueSearchFactory;
-import org.tigris.scarab.util.word.MaxConcurrentSearchException;
import org.tigris.scarab.util.word.QueryResult;
import org.tigris.scarab.workflow.TransitionNode;
import org.tigris.scarab.workflow.Workflow;
@@ -1815,7 +1814,7 @@
&& StringUtils.isNumeric(sortColumn);
}
- public IssueSearch getNewSearch() throws Exception, MaxConcurrentSearchException
+ public IssueSearch getNewSearch() throws Exception
{
ScarabUser user = (ScarabUser)data.getUser();
MITList mitList = user.getCurrentMITList();
@@ -1849,10 +1848,6 @@
setInfoMessage(L10NKeySet.NoMatchingIssues);
}
}
- catch (MaxConcurrentSearchException e)
- {
- setAlertMessage(L10NKeySet.ResourceLimitationsPreventedSearch);
- }
catch (ScarabException e)
{
setAlertMessage(e.getL10nMessage());
@@ -1901,19 +1896,8 @@
private List getSearchResults(String queryString)
throws Exception
{
- IssueSearch search = null;
- List queryResults = null;
-
- try
- {
- search = getPopulatedSearch(queryString);
- queryResults = search.getQueryResults();
- }
- finally
- {
- IssueSearchFactory.INSTANCE.notifyDone();
- }
- return queryResults;
+ IssueSearch search = getPopulatedSearch(queryString);
+ return search.getQueryResults();
}
/**
Modified: trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java&p2=trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java (original)
+++ trunk/src/java/org/tigris/scarab/tools/localization/L10NKeySet.java 2008-05-22 14:01:42-0700
@@ -443,7 +443,6 @@
public static final LocalizationKey SelectIssues = new L10NKey("SelectIssues");
public static final LocalizationKey BadIntegerConversion = new L10NKey("BadIntegerConversion");
public static final LocalizationKey SomeIssuePKsNotValid = new L10NKey("SomeIssuePKsNotValid");
- public static final LocalizationKey ResourceLimitationsPreventedSearch = new L10NKey("ResourceLimitationsPreventedSearch");
public static final LocalizationKey AppConfigurationChangesSaved = new L10NKey("AppConfigurationChangesSaved");
public static final LocalizationKey UserCanNotDeleteSelf = new L10NKey("UserCanNotDeleteSelf");
public static final LocalizationKey UserIsDeleted = new L10NKey("UserIsDeleted");
Modified: trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java&p2=trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java (original)
+++ trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java 2008-05-22 14:01:42-0700
@@ -48,19 +48,14 @@
// JDK classes
-import org.apache.turbine.Turbine;
import org.tigris.scarab.om.Issue;
import org.tigris.scarab.om.IssueType;
import org.tigris.scarab.om.MITList;
import org.tigris.scarab.om.Module;
import org.tigris.scarab.om.ScarabUser;
-import org.tigris.scarab.tools.localization.L10NKeySet;
-import org.tigris.scarab.util.ScarabException;
/**
- * Creates new IssueSearch objects and acts as a regulator on the number
- * of concurrent searches.
- *
+ * Creates new IssueSearch objects
* @author <a href="mailto:[email protected]">John McNally</a>
* @since 0.16.25
* @version $Id$
@@ -68,151 +63,49 @@
public class IssueSearchFactory
{
public static final IssueSearchFactory INSTANCE = new IssueSearchFactory();
-
- private final int maxInstances;
- private final int maxWait;
-
- /**
- * The number of objects currently in use
- */
- private int numActive = 0;
IssueSearchFactory()
{
- maxInstances = getMaxInstances();
- maxWait = getMaxWait();
- }
-
- /**
- * Maximum number of concurrent searches. Given by the
- * scarab.concurrent.search.max property. if not given
- * or value is negative, unlimited concurrent searches are
- * allowed (will then be limited by db connections). A
- * value of 0 will disable searching.
- * Implementation note: this method is package-private to
- * facilitate testing.
- */
- int getMaxInstances()
- {
- // TODO: should be a fraction of the number of connections in the connection pool;
- return Turbine.getConfiguration()
- .getInt("scarab.concurrent.search.max", 4);
- }
-
- /**
- * How long to wait (in seconds) for a search object if one is not
- * immediately available. Given by the
- * scarab.concurrent.search.wait property. if not given
- * or value is negative, we block till an IssueSearch can be created.
- * A value of 0 will fail immediately.
- * Implementation note: this method is package-private to
- * facilitate testing.
- */
- int getMaxWait()
- {
- // TODO: FIXME: Should be avalon component.
- int max = Turbine.getConfiguration()
- .getInt("scarab.concurrent.search.wait", 20);
- max *= 1000;
- return max;
}
/** Create a IssueSearch against issue and user.
- * the caller is expected in a final block to call notifyDone()
- * regardless if a valid IssueSearch was returned or not or whatever exception was thrown.
* @param issue
* @param searcher
* @return
* @throws java.lang.Exception
- * @throws org.tigris.scarab.util.word.MaxConcurrentSearchException
*/
public IssueSearch getInstance(Issue issue, ScarabUser searcher)
- throws Exception, MaxConcurrentSearchException
+ throws Exception
{
- register();
- IssueSearch search = new IssueSearch(issue, searcher);
- return search;
+ return new IssueSearch(issue, searcher);
}
/** Create a IssueSearch against module, issueType, and user.
- * the caller is expected in a final block to call notifyDone()
- * regardless if a valid IssueSearch was returned or not or whatever exception was thrown.
*
* @param module
* @param issueType
* @param searcher
* @return
* @throws java.lang.Exception
- * @throws org.tigris.scarab.util.word.MaxConcurrentSearchException
*/
public IssueSearch
getInstance(Module module, IssueType issueType, ScarabUser searcher)
- throws Exception, MaxConcurrentSearchException
+ throws Exception
{
- register();
- IssueSearch search = new IssueSearch(module, issueType, searcher);
- return search;
+ return new IssueSearch(module, issueType, searcher);
}
/** Create a IssueSearch against mitList and user.
- * the caller is expected in a final block to call notifyDone()
- * regardless if a valid IssueSearch was returned or not or whatever exception was thrown.
*
* @param mitList
* @param searcher
* @return
* @throws java.lang.Exception
- * @throws org.tigris.scarab.util.word.MaxConcurrentSearchException
*/
public IssueSearch getInstance(MITList mitList, ScarabUser searcher)
- throws Exception, MaxConcurrentSearchException
- {
- register();
- IssueSearch search = new IssueSearch(mitList, searcher);
- return search;
- }
-
- synchronized void register()
- throws MaxConcurrentSearchException, InterruptedException
- {
- try
- {
- long starttime = System.currentTimeMillis();
- while (numActive > maxInstances)
- {
- try
- {
- wait(1000);
- }
- catch(InterruptedException e)
- {
- notify();
- throw e;
- }
- if(System.currentTimeMillis() - starttime > maxWait)
- {
- throw new MaxConcurrentSearchException(
- L10NKeySet.ExceptionMaxConcurrentSearch,
- ""+this.getMaxWait()
- );
- }
- }
- }
- finally
- {
- // the caller is expected in a final block to decrement the count via a call to notifyDone()
- // regardless if a valid IssueSearch was returned or not or whatever exception was thrown.
- numActive++;
- }
- }
-
- synchronized public void notifyDone()
+ throws Exception
{
- if (numActive > 0)
- {
- numActive--;
- }
- this.notifyAll();
+ return new IssueSearch(mitList, searcher);
}
}
Removed: trunk/src/java/org/tigris/scarab/util/word/MaxConcurrentSearchException.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/util/word/MaxConcurrentSearchException.java?view=auto&rev=10584
Modified: trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java?view=diff&rev=10585&p1=trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java&p2=trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java (original)
+++ trunk/src/java/org/tigris/scarab/xmlrpc/SimpleHandler.java 2008-05-22 14:01:42-0700
@@ -345,25 +345,17 @@
protected Vector findIssuesWithAttributeValue(final ScarabUser user,
final Attribute attribute, final String value) throws Exception
{
- IssueSearch search = null;
final Vector matchingIssueIds = new Vector();
- try
- {
- search = IssueSearchFactory.INSTANCE.getInstance(
- MITListManager.getAllModulesAllIssueTypesList(user), user);
- search.addAttributeValue(attribute, value);
- final List queryresults = search.getQueryResults();
+ IssueSearch search = IssueSearchFactory.INSTANCE.getInstance(
+ MITListManager.getAllModulesAllIssueTypesList(user), user);
+ search.addAttributeValue(attribute, value);
+ final List queryresults = search.getQueryResults();
- for(Iterator i=queryresults.iterator();i.hasNext();)
- {
- final QueryResult qr = (QueryResult) i.next();
- matchingIssueIds.add(qr.getUniqueId());
- }
- }
- finally
+ for(Iterator i=queryresults.iterator();i.hasNext();)
{
- IssueSearchFactory.INSTANCE.notifyDone();
- }
+ final QueryResult qr = (QueryResult) i.next();
+ matchingIssueIds.add(qr.getUniqueId());
+ }
return matchingIssueIds;
}
Modified: trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java?view=diff&rev=10585&p1=trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java&p2=trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java (original)
+++ trunk/src/test/org/tigris/scarab/util/word/AllIssueSearchTests.java 2008-05-22 14:01:42-0700
@@ -9,7 +9,6 @@
TestSuite suite = new TestSuite(AllIssueSearchTests.class.getName());
suite.addTestSuite(IssueSearchTest.class);
- suite.addTestSuite(IssueSearchFactoryTest.class);
return suite;
}
Removed: trunk/src/test/org/tigris/scarab/util/word/IssueSearchFactoryTest.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/test/org/tigris/scarab/util/word/IssueSearchFactoryTest.java?view=auto&rev=10584
Modified: trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java?view=diff&rev=10585&p1=trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java&p2=trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java&r1=10584&r2=10585
==============================================================================
--- trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java (original)
+++ trunk/src/test/org/tigris/scarab/util/word/IssueSearchTest.java 2008-05-22 14:01:42-0700
@@ -73,7 +73,7 @@
private IssueTypeTestObjectFactory testITs = new IssueTypeTestObjectFactory();
private IssueSearch getSearch()
- throws Exception, MaxConcurrentSearchException
+ throws Exception
{
Module module = testModules.getModule();
IssueType it = testITs.getDefaultIssueType();
@@ -94,7 +94,6 @@
search.addAttributeValue(testAttribs.getPlatformAttribute(), sgi);
List results = search.getQueryResults();
assertTrue("Should be one result.", (results.size() == 1));
- IssueSearchFactory.INSTANCE.notifyDone();
}
public void testWrongOptionAttribute()
@@ -106,7 +105,6 @@
search.addAttributeValue(testAttribs.getPlatformAttribute(), notsgi);
List results = search.getQueryResults();
assertTrue("Should be no result.", (results.size() == 0));
- IssueSearchFactory.INSTANCE.notifyDone();
}
/**
@@ -124,7 +122,6 @@
search.addAttributeValue(testAttribs.getVoteAttribute(), empty);
List results = search.getQueryResults();
assertTrue("Should be ONE result.", (results.size() == 1));
- IssueSearchFactory.INSTANCE.notifyDone();
}
public void testUserWithAny()
@@ -135,7 +132,6 @@
IssueSearch.ANY_KEY);
List results = search.getQueryResults();
assertTrue("Should be one result.", (results.size() == 1));
- IssueSearchFactory.INSTANCE.notifyDone();
}
public void testUserWithCreatedBy()
@@ -146,7 +142,6 @@
IssueSearch.CREATED_BY_KEY);
List results = search.getQueryResults();
assertTrue("Should be one result.", (results.size() == 1));
- IssueSearchFactory.INSTANCE.notifyDone();
}
public void testUserWithAssignedTo()
@@ -157,7 +152,6 @@
testAttribs.getAssignAttribute().getAttributeId().toString());
List results = search.getQueryResults();
assertTrue("Should be no results.", (results.size() == 0));
- IssueSearchFactory.INSTANCE.notifyDone();
}
public void testUserWithAssignedToAndCreatedDate()
@@ -169,7 +163,6 @@
search.setMinCreationDate("2000-01-01");
List results = search.getQueryResults();
assertTrue("Should be no results.", (results.size() == 0));
- IssueSearchFactory.INSTANCE.notifyDone();
}
@@ -184,7 +177,6 @@
IssueSearch.ANY_KEY);
List results = search.getQueryResults();
assertTrue("Should be one result.", (results.size() == 1));
- IssueSearchFactory.INSTANCE.notifyDone();
}
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.