[jboss-cvs] jboss-portal/cms/src/main/org/jboss/portal/cms/impl/interceptors ...
Julien Viet
julien at jboss.com
Tue Jul 11 16:50:26 EDT 2006
User: julien
Date: 06/07/11 16:50:26
Modified: cms/src/main/org/jboss/portal/cms/impl/interceptors
CacheInterceptor.java
Log:
- make cms cache work
- improve portal object deployment in ha mode
Revision Changes Path
1.7 +11 -9 jboss-portal/cms/src/main/org/jboss/portal/cms/impl/interceptors/CacheInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/cms/src/main/org/jboss/portal/cms/impl/interceptors/CacheInterceptor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- CacheInterceptor.java 26 May 2006 20:12:05 -0000 1.6
+++ CacheInterceptor.java 11 Jul 2006 20:50:26 -0000 1.7
@@ -73,7 +73,8 @@
if (invocation instanceof DeleteCommand)
{
// delete from cache
- String path = (String)invocation.getAttribute("path");
+ DeleteCommand dc = (DeleteCommand)invocation;
+ String path = dc.getPath();
try
{
log.trace(path + " removed from cache");
@@ -85,16 +86,16 @@
}
invocation.invokeNext();
}
- else if ((invocation instanceof UpdateFileCommand)
- || (invocation instanceof DeleteCommand))
+ else if (invocation instanceof UpdateFileCommand)
{
// delete from cache
- File file = (File)invocation.getAttribute("file");
- Content content = (Content)invocation.getAttribute("content");
+ UpdateFileCommand ufc = (UpdateFileCommand)invocation;
try
{
- log.trace(file.getBasePath() + "/" + content.getLocale() + " removed from cache");
- cache.remove(file.getBasePath(), content.getLocale());
+ String path = ufc.getPath();
+ Locale locale = ufc.getLocale();
+ log.trace(path + "/" + locale + " removed from cache");
+ cache.remove(path, locale);
}
catch (CMSCacheException e)
{
@@ -104,8 +105,9 @@
}
else if ((invocation instanceof FileGetCommand))
{
- String path = (String)invocation.getAttribute("path");
- Locale locale = (Locale)invocation.getAttribute("locale");
+ FileGetCommand fgc = (FileGetCommand)invocation;
+ String path = fgc.getPath();
+ Locale locale = fgc.getLocale();
File file = cache.get(path, locale);
if (file != null)
More information about the jboss-cvs-commits
mailing list