Scarab commit: svn commit: r10327 - trunk/src: conf/classes conf/conf java/org/tigris/scarab/om java/org/tigris/scarab/util/word

[email protected]
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: ronvoe122
Date: 2006-11-05 11:55:10-0800
New Revision: 10327

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_pl.properties
   trunk/src/conf/classes/ScarabBundle_zh_TW.properties
   trunk/src/conf/conf/componentConfiguration.xml
   trunk/src/conf/conf/componentRoles.xml
   trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java
   trunk/src/java/org/tigris/scarab/om/ROptionOption.java
   trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java

Log:
Removed all references to the GlobalCache of Turbine and disabled the GlobalCache service. If required, it should be JCS used instead.


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=10327&p1=trunk/src/conf/classes/ScarabBundle_de.properties&p2=trunk/src/conf/classes/ScarabBundle_de.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_de.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_de.properties	2006-11-05 11:55:10-0800
@@ -2123,7 +2123,6 @@
 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}"
-ExceptionLookupGlobalCache=Problem beim Laden des GlobalCacheService Service: Die Fehlermeldung ist: "{0}"
 ExceptionScarabCacheService=init: Fehler beim Zugriff auf den internen Cache. Die Fehlermeldung ist: "{0}"
 ExceptionComponentLocator=Internes Konfigurationsproblem: Der Service "{0}" wurde 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=10327&p1=trunk/src/conf/classes/ScarabBundle_en.properties&p2=trunk/src/conf/classes/ScarabBundle_en.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_en.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_en.properties	2006-11-05 11:55:10-0800
@@ -2201,7 +2201,6 @@
 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}"
-ExceptionLookupGlobalCache           = Problem looking up GlobalCacheService service: Detail message: "{0}"
 ExceptionScarabCacheService          = init: Failed to get a Pool object. Detail message: "{0}"
 ExceptionComponentLocator            = internal configuration Problem: can''t look up service for class "{0}". Detail message: "{1}"
 ExceptionDatabaseGenericError        = Database access generic problem. Notify the administrator.

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=10327&p1=trunk/src/conf/classes/ScarabBundle_es.properties&p2=trunk/src/conf/classes/ScarabBundle_es.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_es.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_es.properties	2006-11-05 11:55:10-0800
@@ -2137,7 +2137,6 @@
 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}"
-ExceptionLookupGlobalCache = Problem looking up GlobalCacheService service: Detail message: "{0}"
 ExceptionScarabCacheService = init: Failed to get a Pool object. Detail message: "{0}"
 ExceptionComponentLocator = internal configuration Problem: can't look up service for class "{0}". Detail message: "{1}"
 ExceptionDatabaseGenericError = Problema general de acceso a la base de datos. Consulta con el administrador.

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=10327&p1=trunk/src/conf/classes/ScarabBundle_fr.properties&p2=trunk/src/conf/classes/ScarabBundle_fr.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_fr.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_fr.properties	2006-11-05 11:55:10-0800
@@ -2194,7 +2194,6 @@
 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}"
-ExceptionLookupGlobalCache           = Problème lors de la recherche du service GlobalCacheService. Message détaillé: "{0}"
 ExceptionScarabCacheService          = init: erreur dans l'obtention d'un objet Pool. Message détaillé: "{0}"
 ExceptionComponentLocator            = Problème interne de configuration: impossible de trouver le service pour la classe "{0}". Message détaillé: "{1}"
 ExceptionDatabaseGenericError        = Problème générique d'accès à la base de données. Contactez l'administrateur.

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=10327&p1=trunk/src/conf/classes/ScarabBundle_it.properties&p2=trunk/src/conf/classes/ScarabBundle_it.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_it.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_it.properties	2006-11-05 11:55:10-0800
@@ -2093,7 +2093,6 @@
 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}"
-ExceptionLookupGlobalCache           = Problema nella ricerca del servizio GlobalCacheService. Messaggio di dettaglio: "{0}"
 ExceptionScarabCacheService          = init: recupero dell''oggetto Pool fallito. Messaggio di dettaglio: "{0}"
 ExceptionComponentLocator            = problema interno di configurazione: impossibile ricerca servizio per la classe "{0}". Messaggio di dettaglio: "{1}"
 ExceptionDatabaseGenericError        = Problema generico di accesso al database. Avvertire l'amministratore di sistema.

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=10327&p1=trunk/src/conf/classes/ScarabBundle_pl.properties&p2=trunk/src/conf/classes/ScarabBundle_pl.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_pl.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_pl.properties	2006-11-05 11:55:10-0800
@@ -2205,7 +2205,6 @@
 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}"
-ExceptionLookupGlobalCache           = Problem looking up GlobalCacheService service: Detail message: "{0}"
 ExceptionScarabCacheService          = init: Failed to get a Pool object. Detail message: "{0}"
 ExceptionComponentLocator            = internal configuration Problem: can''t look up service for class "{0}". Detail message: "{1}"
 ExceptionDatabaseGenericError        = Database access generic problem. Notify the administrator.

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=10327&p1=trunk/src/conf/classes/ScarabBundle_zh_TW.properties&p2=trunk/src/conf/classes/ScarabBundle_zh_TW.properties&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_zh_TW.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_zh_TW.properties	2006-11-05 11:55:10-0800
@@ -2083,7 +2083,6 @@
 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}"
-ExceptionLookupGlobalCache           = Problem looking up GlobalCacheService service: Detail message: "{0}"
 ExceptionScarabCacheService          = init: Failed to get a Pool object. Detail message: "{0}"
 ExceptionComponentLocator            = internal configuration Problem: can't look up service for class "{0}". Detail message: "{1}"
 ExceptionDatabaseGenericError        = Database access generic problem. Notify the administrator.

Modified: trunk/src/conf/conf/componentConfiguration.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/componentConfiguration.xml?view=diff&rev=10327&p1=trunk/src/conf/conf/componentConfiguration.xml&p2=trunk/src/conf/conf/componentConfiguration.xml&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/conf/componentConfiguration.xml	(original)
+++ trunk/src/conf/conf/componentConfiguration.xml	2006-11-05 11:55:10-0800
@@ -11,7 +11,6 @@
     <upload repository="WEB-INF" sizeMax="157286400"
         sizeThreshold="8192" />
     <parser />
-    <cache cacheInitialSize="20" cacheCheckFrequency="5" />
 
     <localization>
         <bundles>

Modified: trunk/src/conf/conf/componentRoles.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/componentRoles.xml?view=diff&rev=10327&p1=trunk/src/conf/conf/componentRoles.xml&p2=trunk/src/conf/conf/componentRoles.xml&r1=10326&r2=10327
==============================================================================
--- trunk/src/conf/conf/componentRoles.xml	(original)
+++ trunk/src/conf/conf/componentRoles.xml	2006-11-05 11:55:10-0800
@@ -44,10 +44,6 @@
         shorthand="parser"
         default-class="org.apache.fulcrum.parser.DefaultParameterParser"/>    
     <role
-        name="org.apache.fulcrum.cache.GlobalCacheService"
-        shorthand="cache"
-        default-class="org.apache.fulcrum.cache.DefaultGlobalCacheService"/>    
-    <role
         name="org.apache.fulcrum.localization.LocalizationService"
         shorthand="localization"
         default-class="org.apache.fulcrum.localization.DefaultLocalizationService"/>        
@@ -77,4 +73,4 @@
         name="org.apache.fulcrum.xmlrpc.XmlRpcServerComponent"
         shorthand="XmlRpcComponent"
         default-class="org.apache.fulcrum.xmlrpc.DefaultXmlRpcServerComponent"/>     
-</role-list>
\ No newline at end of file
+</role-list>

Modified: trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java?view=diff&rev=10327&p1=trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java&p2=trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java&r1=10326&r2=10327
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java	(original)
+++ trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java	2006-11-05 11:55:10-0800
@@ -49,16 +49,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.fulcrum.cache.CachedObject;
-import org.apache.fulcrum.cache.GlobalCacheService;
-import org.apache.fulcrum.cache.ObjectExpiredException;
 import org.apache.fulcrum.intake.Retrievable;
 import org.apache.torque.TorqueException;
-import org.tigris.scarab.services.ServiceManager;
 import org.tigris.scarab.tools.localization.L10NKey;
-import org.tigris.scarab.tools.localization.L10NKeySet;
 import org.tigris.scarab.util.ScarabException;
-import org.tigris.scarab.util.ScarabRuntimeException;
 
 /** 
   * This class is used by Intake on the GlobalAttributeEdit page
@@ -70,8 +64,6 @@
 public class ParentChildAttributeOption 
     implements Retrievable, java.io.Serializable
 {
-    /** the name of this class */
-    private static final String CLASS_NAME = "ParentChildAttributeOption";
 
     private Integer attributeId = null;
     private Integer optionId = null;
@@ -92,20 +84,6 @@
     }
 
     /**
-     * Creates a key for use in caching AttributeOptions
-     */
-    static String getCacheKey(Integer option1, Integer option2)
-    {
-         String keyStringA = option1.toString();
-         String keyStringB = option2.toString();
-         String output = new StringBuffer(CLASS_NAME.length() + 
-                                keyStringA.length() + keyStringB.length())
-                                .append(CLASS_NAME).append(keyStringA)
-                                .append(keyStringB).toString();
-         return output;
-    }
-
-    /**
      * Gets an instance of a new ParentChildAttributeOption
      */
     public static ParentChildAttributeOption getInstance()
@@ -119,22 +97,9 @@
     public static ParentChildAttributeOption getInstance(
                                 Integer parent, Integer child)
     {
-        GlobalCacheService tgcs =getGlobalCacheService();
-
-        String key = getCacheKey(parent, child);
-        ParentChildAttributeOption pcao = null;
-        try
-        {
-            pcao = (ParentChildAttributeOption)tgcs.getObject(key)
-                        .getContents();
-        }
-        catch (ObjectExpiredException oee)
-        {
-            pcao = getInstance();
-            pcao.setParentId(parent);
-            pcao.setOptionId(child);
-            tgcs.addObject(key, new CachedObject(pcao));
-        }
+    	ParentChildAttributeOption pcao = getInstance();
+        pcao.setParentId(parent);
+        pcao.setOptionId(child);
         return pcao;
     }
 
@@ -156,7 +121,6 @@
      * is used with Intake
      */
     public void setQueryKey(String key)
-        throws TorqueException
     {
         int index = key.indexOf(":");
         String a = key.substring(0,index);
@@ -297,17 +261,6 @@
         this.weight = weight;
     }
 
-    /**
-     * Removes the object from the cache
-     */
-    public static void doRemoveFromCache(Integer parent, Integer child)
-    {
-        GlobalCacheService tgcs =getGlobalCacheService();
-
-        String key = getCacheKey(parent, child);
-        tgcs.removeObject(key);
-    }
-
     public String toString()
     {
         return getParentId() + ":" + getOptionId() + " -> " + getName();
@@ -380,20 +333,4 @@
         roo.setRelationshipId(OptionRelationship.PARENT_CHILD);
         roo.save();
     }
-    
-    /**
-     * Gets the <code>GlobalCacheService</code> implementation.
-     *
-     * @return the GlobalCacheService implementation.
-     */
-    protected static final GlobalCacheService getGlobalCacheService()
-    {
-        try{
-            ServiceManager sm = ServiceManager.getInstance();
-            return (GlobalCacheService) sm.lookup(GlobalCacheService.class);
-        } 
-        catch (Exception e) {
-            throw new ScarabRuntimeException(L10NKeySet.ExceptionLookupGlobalCache, e);
-        }
-    }    
 }

Modified: trunk/src/java/org/tigris/scarab/om/ROptionOption.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/ROptionOption.java?view=diff&rev=10327&p1=trunk/src/java/org/tigris/scarab/om/ROptionOption.java&p2=trunk/src/java/org/tigris/scarab/om/ROptionOption.java&r1=10326&r2=10327
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/ROptionOption.java	(original)
+++ trunk/src/java/org/tigris/scarab/om/ROptionOption.java	2006-11-05 11:55:10-0800
@@ -47,16 +47,11 @@
  */ 
 
 // Turbine classes
-import org.apache.fulcrum.cache.CachedObject;
-import org.apache.fulcrum.cache.GlobalCacheService;
-import org.apache.fulcrum.cache.ObjectExpiredException;
 import org.apache.torque.TorqueException;
 import org.apache.torque.om.Persistent;
 import org.apache.torque.util.Criteria;
-import org.tigris.scarab.services.ServiceManager;
 import org.tigris.scarab.tools.localization.L10NKeySet;
 import org.tigris.scarab.util.ScarabException;
-import org.tigris.scarab.util.ScarabRuntimeException;
 
 /** 
   * This class represents the SCARAB_R_OPTION_OPTION table.
@@ -70,9 +65,6 @@
 {
     private int level;
 
-    /** the name of this class */
-    private static final String CLASS_NAME = "ROptionOption";
-
     /**
      * Must call getInstance()
      */
@@ -81,17 +73,6 @@
     }
 
     /**
-     * Creates a key for use in caching AttributeOptions
-     */
-    static String getCacheKey(Integer option1, Integer option2)
-    {
-         String keyStringA = option1.toString();
-         String keyStringB = option2.toString();
-         return new StringBuffer(CLASS_NAME.length() + keyStringA.length() + keyStringB.length())
-             .append(CLASS_NAME).append(keyStringA).append(keyStringB).toString();
-    }
-
-    /**
      * Gets an instance of a new ROptionOption
      */
     public static ROptionOption getInstance()
@@ -104,32 +85,21 @@
      * Gets an instance of a new ROptionOption
      */
     public static ROptionOption getInstance(final Integer parent, final Integer child)
-        throws TorqueException, ScarabException
+        throws ScarabException
     {
-        final GlobalCacheService tgcs = getGlobalCacheService();
-
-        final String key = getCacheKey(parent, child);
-        ROptionOption option = null;
-        try
+    	ROptionOption option = null;
+    	try
         {
-            option = (ROptionOption)tgcs.getObject(key).getContents();
+    	    final Criteria crit = new Criteria();
+            crit.add (ROptionOptionPeer.OPTION1_ID, parent);
+            crit.add (ROptionOptionPeer.OPTION2_ID, child);
+            option = (ROptionOption) (ROptionOptionPeer.doSelect(crit)).get(0);
         }
-        catch (ObjectExpiredException oee)
+        catch (Exception e)
         {
-            try
-            {
-                final Criteria crit = new Criteria();
-                crit.add (ROptionOptionPeer.OPTION1_ID, parent);
-                crit.add (ROptionOptionPeer.OPTION2_ID, child);
-                option = (ROptionOption) (ROptionOptionPeer.doSelect(crit)).get(0);
-            }
-            catch (Exception e)
-            {
-                throw new ScarabException(L10NKeySet.ExceptionOptionNotFound,
-                                          parent.toString(),
-                                          child.toString());
-            }
-            tgcs.addObject(key, new CachedObject(option));
+            throw new ScarabException(L10NKeySet.ExceptionOptionNotFound,
+                                      parent.toString(),
+                                      child.toString());
         }
         return option;
     }
@@ -149,11 +119,6 @@
         crit.add (ROptionOptionPeer.OPTION2_ID, roo.getOption2Id());
 
         ROptionOptionPeer.doDelete(crit);
-
-        GlobalCacheService tgcs = getGlobalCacheService();
-
-        String key = getCacheKey(roo.getOption1Id(), roo.getOption2Id());
-        tgcs.removeObject(key);
     }
 
     /**
@@ -235,22 +200,6 @@
         return "Parent: " + getOption1Id() + " Child: " + 
                 getOption2Id() + " : Order: " + getPreferredOrder();
     }
-    
-    /**
-     * Gets the <code>GlobalCacheService</code> implementation.
-     *
-     * @return the GlobalCacheService implementation.
-     */
-    protected static final GlobalCacheService getGlobalCacheService()
-    {
-        try{
-            ServiceManager sm = ServiceManager.getInstance();
-            return (GlobalCacheService) sm.lookup(GlobalCacheService.class);
-        } 
-        catch (Exception e) {
-            throw new ScarabRuntimeException(L10NKeySet.ExceptionLookupGlobalCache, e);
-        }
-    }        
 }
 
 

Modified: trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java?view=diff&rev=10327&p1=trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java&p2=trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java&r1=10326&r2=10327
==============================================================================
--- trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java	(original)
+++ trunk/src/java/org/tigris/scarab/util/word/SearchFactory.java	2006-11-05 11:55:10-0800
@@ -46,7 +46,6 @@
  * individuals on behalf of Collab.Net.
  */
 
-import org.apache.fulcrum.cache.GlobalCacheService;
 import org.apache.turbine.services.yaaficomponent.YaafiComponentService;
 import org.tigris.scarab.services.ServiceManager;
 import org.tigris.scarab.tools.localization.L10NKeySet;
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.