exo-jcr SVN: r5637 - in kernel/branches/2.4.x/exo.kernel.component.common/src: main/java/org/exoplatform/services/mail/impl and 1 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-02-15 04:40:04 -0500 (Wed, 15 Feb 2012)
New Revision: 5637
Modified:
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java
kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java
Log:
EXOJCR-1733: small fixes
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java 2012-02-15 08:09:48 UTC (rev 5636)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java 2012-02-15 09:40:04 UTC (rev 5637)
@@ -87,7 +87,7 @@
* @param body - {@link String} contents of mail message
* @return {@link Future} object to watch the result of asynchronous calculation
*/
- public Future<Boolean> sendMessageAsynch(String from, String to, String subject, String body);
+ public Future<Boolean> sendMessageInFuture(String from, String to, String subject, String body);
/**
* Asynchronous variant of {@link MailService#sendMessage(Message)}.
@@ -99,7 +99,7 @@
* @param message - {@link Message} provides mail message related data (e.g. subject, content etc.)
* @return {@link Future} object to watch the result of asynchronous calculation
*/
- public Future<Boolean> sendMessageAsynch(Message message);
+ public Future<Boolean> sendMessageInFuture(Message message);
/**
* Asynchronous variant of {@link MailService#sendMessage(MimeMessage)}.
@@ -111,5 +111,5 @@
* @param message - {@link MimeMessage} provides mail message related data (e.g. subject, content etc.)
* @return {@link Future} object to watch the result of asynchronous calculation
*/
- public Future<Boolean> sendMessageAsynch(MimeMessage message);
+ public Future<Boolean> sendMessageInFuture(MimeMessage message);
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java 2012-02-15 09:40:04 UTC (rev 5637)
@@ -21,6 +21,7 @@
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
import org.exoplatform.commons.utils.SecurityHelper;
import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.mail.Attachment;
import org.exoplatform.services.mail.MailService;
@@ -35,7 +36,6 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
import java.util.concurrent.ThreadFactory;
import javax.activation.DataHandler;
@@ -83,7 +83,7 @@
*/
private static volatile int mailServiceThreadCounter = 0;
- public MailServiceImpl(InitParams params) throws Exception
+ public MailServiceImpl(InitParams params, final ExoContainerContext ctx) throws Exception
{
props_ = new Properties(PrivilegedSystemHelper.getProperties());
props_.putAll(params.getPropertiesParam("config").getProperties());
@@ -118,7 +118,7 @@
{
public Thread newThread(Runnable arg0)
{
- return new Thread(arg0, "MailServiceThread-" + mailServiceThreadCounter++);
+ return new Thread(arg0, ctx.getName() + "-MailServiceThread-" + mailServiceThreadCounter++);
}
});
}
@@ -255,10 +255,10 @@
* {@inheritDoc}
*/
@Override
- public Future<Boolean> sendMessageAsynch(final String from, final String to, final String subject,
+ public Future<Boolean> sendMessageInFuture(final String from, final String to, final String subject,
final String body)
{
- FutureTask<Boolean> ft = new FutureTask<Boolean>(new Callable<Boolean>()
+ return executorService.submit(new Callable<Boolean>()
{
@Override
public Boolean call() throws Exception
@@ -267,18 +267,15 @@
return true;
}
});
-
- executorService.execute(ft);
- return ft;
}
/**
* {@inheritDoc}
*/
@Override
- public Future<Boolean> sendMessageAsynch(final Message message)
+ public Future<Boolean> sendMessageInFuture(final Message message)
{
- FutureTask<Boolean> ft = new FutureTask<Boolean>(new Callable<Boolean>()
+ return executorService.submit(new Callable<Boolean>()
{
@Override
public Boolean call() throws Exception
@@ -287,18 +284,15 @@
return true;
}
});
-
- executorService.execute(ft);
- return ft;
}
/**
* {@inheritDoc}
*/
@Override
- public Future<Boolean> sendMessageAsynch(final MimeMessage message)
+ public Future<Boolean> sendMessageInFuture(final MimeMessage message)
{
- FutureTask<Boolean> ft = new FutureTask<Boolean>(new Callable<Boolean>()
+ return executorService.submit(new Callable<Boolean>()
{
@Override
public Boolean call() throws Exception
@@ -307,9 +301,6 @@
return true;
}
});
-
- executorService.execute(ft);
- return ft;
}
protected String[] getArrs(String toArray)
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java 2012-02-15 08:09:48 UTC (rev 5636)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java 2012-02-15 09:40:04 UTC (rev 5637)
@@ -209,7 +209,7 @@
}
Future<Boolean> future =
- service.sendMessageAsynch("!@#$%^&*()", generateRandomEmailSender(), MAIL_SUBJECT, MAIL_CONTENTS);
+ service.sendMessageInFuture("!@#$%^&*()", generateRandomEmailSender(), MAIL_SUBJECT, MAIL_CONTENTS);
try
{
@@ -246,7 +246,7 @@
{
assertFalse(isEmailMessageSent(MAIL_SUBJECT + i));
futures[i] =
- service.sendMessageAsynch(generateRandomEmailSender(), generateRandomEmailRecipient(), MAIL_SUBJECT + i,
+ service.sendMessageInFuture(generateRandomEmailSender(), generateRandomEmailRecipient(), MAIL_SUBJECT + i,
MAIL_CONTENTS + i);
}
@@ -287,7 +287,7 @@
message.setContent(MAIL_CONTENTS, TEXT_PLAIN);
message.setFlags(flags, true);
- Future<Boolean> future = service.sendMessageAsynch(message);
+ Future<Boolean> future = service.sendMessageInFuture(message);
try
{
@@ -334,7 +334,7 @@
message.setContent(MAIL_CONTENTS + i, TEXT_PLAIN);
message.setFlags(flags, true);
- futures[i] = service.sendMessageAsynch(message);
+ futures[i] = service.sendMessageInFuture(message);
}
for (int i = 0; i < THREAD_NUMBER; i++)
@@ -373,7 +373,7 @@
message.setMimeType(TEXT_HTML);
message.addAttachment(attachment);
- Future<Boolean> future = service.sendMessageAsynch(message);
+ Future<Boolean> future = service.sendMessageInFuture(message);
try
{
@@ -426,7 +426,7 @@
message.setMimeType(TEXT_HTML);
message.addAttachment(attachment);
- futures[i] = service.sendMessageAsynch(message);
+ futures[i] = service.sendMessageInFuture(message);
assertFalse(futures[i].isDone());
}
12 years, 4 months
exo-jcr SVN: r5636 - in jcr/trunk: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl and 52 other directories.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-15 03:09:48 -0500 (Wed, 15 Feb 2012)
New Revision: 5636
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java
jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java
jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java
jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -42,7 +42,7 @@
private static final long serialVersionUID = 7967457831325761318L;
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemState");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemState");
public static final int ADDED = 1;
@@ -162,8 +162,8 @@
this.internallyCreated = isInternalCreated;
this.isPersisted = isPersisted;
- if (log.isDebugEnabled())
- log.debug(nameFromValue(state) + " " + data.getQPath().getAsString() + ", " + data.getIdentifier());
+ if (LOG.isDebugEnabled())
+ LOG.debug(nameFromValue(state) + " " + data.getQPath().getAsString() + ", " + data.getIdentifier());
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -33,7 +33,7 @@
public class Constants
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.Constants");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.Constants");
/**
* Default namespace prefix (empty uri).
@@ -712,7 +712,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse JCR_SYSTEM_URI for constant JCR_SYSTEM (" + JCR_SYSTEM_URI + "): " + e, e);
+ LOG.error("ERROR: Can't parse JCR_SYSTEM_URI for constant JCR_SYSTEM (" + JCR_SYSTEM_URI + "): " + e, e);
}
try
@@ -721,7 +721,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse JCR_VERSION_STORAGE_URI for constant JCR_VERSION_STORAGE_PATH ("
+ LOG.error("ERROR: Can't parse JCR_VERSION_STORAGE_URI for constant JCR_VERSION_STORAGE_PATH ("
+ JCR_VERSION_STORAGE_URI + "): " + e, e);
}
@@ -731,7 +731,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse JCR_NODETYPES_URI for constant JCR_NODETYPES_PATH ("
+ LOG.error("ERROR: Can't parse JCR_NODETYPES_URI for constant JCR_NODETYPES_PATH ("
+ JCR_NODETYPES_URI + "): " + e, e);
}
@@ -742,7 +742,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse EXO_NAMESPACES_URI for constant EXO_NAMESPACES (" + nsUri + "): " + e, e);
+ LOG.error("ERROR: Can't parse EXO_NAMESPACES_URI for constant EXO_NAMESPACES (" + nsUri + "): " + e, e);
}
try
@@ -751,7 +751,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse ROOT_URI " + e, e);
+ LOG.error("ERROR: Can't parse ROOT_URI " + e, e);
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -50,7 +50,7 @@
public class WorkspaceContainer extends ExoContainer
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContainer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContainer");
private final String name;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -53,7 +53,7 @@
public class JDBCConfigurationPersister implements ConfigurationPersister
{
- protected static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JDBCConfigurationPersister");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JDBCConfigurationPersister");
public final static String PARAM_SOURCE_NAME = "source-name";
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -45,7 +45,7 @@
public final static String PARENT_RELPATH = "..";
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.JCRPath");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JCRPath");
public static JCRPath createJCRPath()
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -181,7 +181,7 @@
{
if (size <= 0)
{
- log.warn("Wrong relative path. Can't move up in path hierarhy.");
+ LOG.warn("Wrong relative path. Can't move up in path hierarhy.");
return 0;
}
return size - 1;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -42,7 +42,7 @@
/**
* The logger instance for this class.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionReference");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionReference");
//
private static final int INITIAL_DELAY = 10;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -89,7 +89,7 @@
public static final String RESTORE_PATH_PARAMETER = "restore-path";
- protected static final Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceInitializer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceInitializer");
protected final String workspaceName;
@@ -535,7 +535,7 @@
final NodeData root = (NodeData)dataManager.getItemData(Constants.ROOT_UUID);
- log.info("Workspace [" + workspaceName + "] restored from storage " + restorePath + " in "
+ LOG.info("Workspace [" + workspaceName + "] restored from storage " + restorePath + " in "
+ (System.currentTimeMillis() - start) * 1d / 1000 + "sec");
return root;
@@ -675,7 +675,7 @@
true));
}
else
- log.warn("Node skipped name=" + svName + " id=" + exoId + ". Context node "
+ LOG.warn("Node skipped name=" + svName + " id=" + exoId + ". Context node "
+ (parents.size() > 0 ? parents.peek().getQPath().getAsString() : "/"));
}
@@ -709,12 +709,12 @@
("true".equals(exoMultivalued) ? true : false));
}
else
- log.warn("Property can'b be first name=" + svName + " type=" + svType + " id=" + exoId
+ LOG.warn("Property can'b be first name=" + svName + " type=" + svType + " id=" + exoId
+ ". Node should be prior. Context node "
+ (parents.size() > 0 ? parents.peek().getQPath().getAsString() : "/"));
}
else
- log.warn("Property skipped name=" + svName + " type=" + svType + " id=" + exoId
+ LOG.warn("Property skipped name=" + svName + " type=" + svType + " id=" + exoId
+ ". Context node "
+ (parents.size() > 0 ? parents.peek().getQPath().getAsString() : "/"));
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -35,7 +35,7 @@
*/
public class CacheLockImpl extends LockImpl
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.CacheLockImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CacheLockImpl");
private boolean live;
@@ -117,7 +117,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return null;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -51,7 +51,7 @@
/**
* Logger
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.CacheableSessionLockManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CacheableSessionLockManager");
/**
* Session identifier.
@@ -242,19 +242,19 @@
}
catch (UnsupportedRepositoryOperationException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
catch (LockException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
catch (AccessDeniedException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -39,7 +39,7 @@
*/
public class InmemoryNodeTypeRepository extends AbstractNodeTypeRepository
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.InmemoryNodeTypeRepository");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.InmemoryNodeTypeRepository");
private final ItemDefinitionDataHolder defsHolder;
@@ -104,7 +104,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return hierarchy.getAllNodeTypes();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -61,7 +61,7 @@
public class ItemAutocreator
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemAutocreator");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemAutocreator");
private final NodeTypeDataManager nodeTypeDataManager;
@@ -132,9 +132,9 @@
}
else
{
- if (this.log.isDebugEnabled())
+ if (this.LOG.isDebugEnabled())
{
- this.log.debug("Skipping existed node " + ndef.getName() + " in " + parent.getQPath().getAsString()
+ this.LOG.debug("Skipping existed node " + ndef.getName() + " in " + parent.getQPath().getAsString()
+ " during the automatic creation of items for " + typeName.getAsString()
+ " nodetype or mixin type");
}
@@ -180,9 +180,9 @@
}
else
{
- if (this.log.isDebugEnabled())
+ if (this.LOG.isDebugEnabled())
{
- this.log.debug("Skipping existed property " + pdef.getName() + " in "
+ this.LOG.debug("Skipping existed property " + pdef.getName() + " in "
+ parent.getQPath().getAsString() + " during the automatic creation of items for "
+ typeName.getAsString() + " nodetype or mixin type");
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -41,7 +41,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.VolatileNodeTypeDataManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.VolatileNodeTypeDataManager");
public VolatileNodeTypeDataManager(final NodeTypeDataManagerImpl nodeTypeDataManagerImpl) throws RepositoryException
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -65,7 +65,7 @@
public class JCRNodeTypeDataPersister implements NodeTypeDataPersister
{
- protected final Log log = ExoLogger.getLogger("exo.jcr.component.core.JCRNodeTypeDataPersister");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JCRNodeTypeDataPersister");
private final DataManager dataManager;
@@ -120,7 +120,7 @@
{
if (!started)
{
- log.warn("Unable save nodetype " + nodeType.getName().getAsString()
+ LOG.warn("Unable save nodetype " + nodeType.getName().getAsString()
+ " in to the storage. Storage not initialized");
return;
}
@@ -152,7 +152,7 @@
TransientNodeData jcrNodetypes;
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
}
@@ -214,9 +214,9 @@
changesLog.add(ItemState.createAddedState(jcrNodetypes)).add(ItemState.createAddedState(primaryType));
}
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("/jcr:system/jcr:nodetypes is created, creation time: " + (System.currentTimeMillis() - start)
+ LOG.debug("/jcr:system/jcr:nodetypes is created, creation time: " + (System.currentTimeMillis() - start)
+ " ms");
}
@@ -233,7 +233,7 @@
{
if (nodeTypeStorageRoot == null)
{
- log.warn(" Storage not initialized");
+ LOG.warn(" Storage not initialized");
return false;
}
try
@@ -243,7 +243,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return false;
@@ -335,7 +335,7 @@
{
if (nodeTypeStorageRoot == null)
{
- log.warn(" Storage not initialized");
+ LOG.warn(" Storage not initialized");
return null;
}
//Searching nodeType root
@@ -431,8 +431,8 @@
{
if (this.nodeTypeStorageRoot == null)
{
- if (log.isDebugEnabled())
- log.debug(" Storage not initialized");
+ if (LOG.isDebugEnabled())
+ LOG.debug(" Storage not initialized");
return false;
}
return true;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -49,7 +49,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.NodeTypeConverter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.NodeTypeConverter");
private final LocationFactory locationFactory;
@@ -76,7 +76,7 @@
{
// skip this node, so it's not necessary at this runtime
// + "' -- it's not necessary at this runtime";
- log.warn("Node type " + ntvalue.getName() + " is not register due to DISABLE control policy");
+ LOG.warn("Node type " + ntvalue.getName() + " is not register due to DISABLE control policy");
break;
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -57,7 +57,7 @@
public final int SKIP_EVENT = Integer.MIN_VALUE;
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.ActionLauncher");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ActionLauncher");
private final ObservationManagerRegistry observationRegistry;
@@ -129,7 +129,7 @@
}
catch (RepositoryException e)
{
- log.error("Can not fire ActionLauncher.onSaveItems() for " + item.getQPath().getAsString()
+ LOG.error("Can not fire ActionLauncher.onSaveItems() for " + item.getQPath().getAsString()
+ " reason: " + e.getMessage());
}
}
@@ -228,7 +228,7 @@
if (node == null)
{
- log.warn("Item's " + item.getQPath().getAsString() + " associated parent (" + item.getParentIdentifier()
+ LOG.warn("Item's " + item.getQPath().getAsString() + " associated parent (" + item.getParentIdentifier()
+ ") can't be found nor in workspace nor in current changes. Nodetype filter is rejected.");
return false;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -43,7 +43,7 @@
public class ObservationManagerRegistry
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.ObservationManagerRegistry");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ObservationManagerRegistry");
protected Map<EventListener, ListenerCriteria> listenersMap;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -39,7 +39,7 @@
/**
* Logger instance for this class
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.DefaultChangesFilter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.DefaultChangesFilter");
/**
* @param searchManager
@@ -89,11 +89,11 @@
}
catch (RepositoryException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
}
catch (IOException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
logErrorChanges(handler, removedNodes, addedNodes);
}
@@ -103,17 +103,17 @@
}
catch (RepositoryException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
}
catch (IOException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
logErrorChanges(parentHandler, parentRemovedNodes, parentAddedNodes);
}
}
protected Log getLogger()
{
- return log;
+ return LOG;
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -43,7 +43,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.RepositoryIndexSearcherHolder");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.RepositoryIndexSearcherHolder");
/**
* @param indexSearchers
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -56,7 +56,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.SystemSearchManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SystemSearchManager");
/**
* Is started flag.
@@ -103,14 +103,14 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
handler = null;
//freeBuffers();
throw new RuntimeException(e);
}
catch (RepositoryConfigurationException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
handler = null;
//freeBuffers();
throw new RuntimeException(e);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -42,7 +42,7 @@
*/
public class IndexerCacheLoader extends AbstractWriteOnlyCacheLoader
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.IndexerCacheLoader");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.IndexerCacheLoader");
/**
* A map of all the indexers that has been registered
@@ -74,9 +74,9 @@
{
indexers.put(Fqn.fromElements(searchManager.getWsId()), new Indexer(searchManager, parentSearchManager, handler,
parentHandler));
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
+ LOG.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
}
}
@@ -87,9 +87,9 @@
{
if (key.equals(JBossCacheIndexChangesFilter.LISTWRAPPER) && value instanceof ChangesFilterListsWrapper)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.info("Received list wrapper, start indexing...");
+ LOG.info("Received list wrapper, start indexing...");
}
// updating index
ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)value;
@@ -98,10 +98,10 @@
Indexer indexer = indexers.get(name.getParent());
if (indexer == null)
{
- log.warn("No indexer could be found for the fqn " + name.getParent());
- if (log.isDebugEnabled())
+ LOG.warn("No indexer could be found for the fqn " + name.getParent());
+ if (LOG.isDebugEnabled())
{
- log.debug("The current content of the map of indexers is " + indexers);
+ LOG.debug("The current content of the map of indexers is " + indexers);
}
}
else if (wrapper.withChanges())
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -39,7 +39,7 @@
*/
public class IndexerSingletonStoreCacheLoader extends SingletonStoreCacheLoader
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.IndexerSingletonStoreCacheLoader");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.IndexerSingletonStoreCacheLoader");
/**
* @see org.jboss.cache.loader.SingletonStoreCacheLoader#activeStatusChanged(boolean)
@@ -63,7 +63,7 @@
}
catch (PushStateException e)
{
- log.error("Failed to initiate PushState.", e);
+ LOG.error("Failed to initiate PushState.", e);
}
}
}, "JCR Indexer ActiveStatusChanged-handler").start();
@@ -76,11 +76,11 @@
{
public Object call() throws Exception
{
- final boolean debugEnabled = log.isDebugEnabled();
+ final boolean debugEnabled = LOG.isDebugEnabled();
if (debugEnabled)
{
- log.debug("start pushing in-memory state to cache cacheLoader collection");
+ LOG.debug("start pushing in-memory state to cache cacheLoader collection");
}
// merging all lists stored in memory
@@ -139,7 +139,7 @@
}
if (debugEnabled)
{
- log.debug("in-memory state passed to cache cacheLoader successfully");
+ LOG.debug("in-memory state passed to cache cacheLoader successfully");
}
return null;
}
@@ -169,7 +169,7 @@
// if newActiveState is true IndexerCacheLoader is coordinator with write enabled;
((IndexerCacheLoader)getCacheLoader()).setMode(writeEnabled ? IndexerIoMode.READ_WRITE
: IndexerIoMode.READ_ONLY);
- log.info("Set indexer io mode to:" + (writeEnabled ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
+ LOG.info("Set indexer io mode to:" + (writeEnabled ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
}
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -19,9 +19,9 @@
package org.exoplatform.services.jcr.impl.core.query.lucene;
import org.apache.lucene.index.Term;
+import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
-import org.apache.lucene.search.BooleanClause.Occur;
import org.exoplatform.services.jcr.core.NamespaceAccessor;
import org.exoplatform.services.jcr.core.nodetype.NodeTypeDataManager;
import org.exoplatform.services.jcr.datamodel.InternalQName;
@@ -51,7 +51,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.LuceneVirtualTableResolver");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.LuceneVirtualTableResolver");
private final String mixinTypesField;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -44,7 +44,7 @@
/**
* Logger instance for this class
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.SimpleExcerptProvider");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SimpleExcerptProvider");
/**
* The item state manager.
@@ -88,7 +88,7 @@
catch (RepositoryException e)
{
// ignore
- log.warn(e.getLocalizedMessage());
+ LOG.warn(e.getLocalizedMessage());
}
if (text.length() > maxFragmentSize)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -49,7 +49,7 @@
public abstract class BaseValue implements ExtendedValue, ReadableBinaryValue
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.BaseValue");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.BaseValue");
protected final int type;
@@ -352,7 +352,7 @@
}
catch (IOException e)
{
- log.error("Read error", e);
+ LOG.error("Read error", e);
return false;
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -46,7 +46,7 @@
public class ItemDataCopyIgnoredVisitor extends DefaultItemDataCopyVisitor
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyIgnoredVisitor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyIgnoredVisitor");
protected final SessionChangesLog restoredChanges;
@@ -88,8 +88,8 @@
{
// the node can be stored as IGNOREd in restore set, check an action
- if (log.isDebugEnabled())
- log.debug("A property " + property.getQPath().getAsString() + " is IGNOREd");
+ if (LOG.isDebugEnabled())
+ LOG.debug("A property " + property.getQPath().getAsString() + " is IGNOREd");
// set context current parent to existed in restore set
parents.push((NodeData)contextState.getData());
@@ -101,9 +101,9 @@
else
{
// copy as IGNOREd parent child, i.e. OnParentVersionAction is any
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("A property " + property.getQPath().getAsString() + " is IGNOREd node descendant");
+ LOG.debug("A property " + property.getQPath().getAsString() + " is IGNOREd node descendant");
}
super.entering(property, level);
}
@@ -137,8 +137,8 @@
ItemState contextState = restoredChanges.getItemState(node.getParentIdentifier());
if (contextState != null && !contextState.isDeleted())
{
- if (log.isDebugEnabled())
- log.debug("A node " + node.getQPath().getAsString() + " is IGNOREd");
+ if (LOG.isDebugEnabled())
+ LOG.debug("A node " + node.getQPath().getAsString() + " is IGNOREd");
// set context current parent to existed in restore set
parents.push((NodeData)contextState.getData());
@@ -153,9 +153,9 @@
else
{
// copy as IGNOREd parent child, i.e. OnParentVersionAction is any
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("A node " + node.getQPath().getAsString() + " is IGNOREd node descendant");
+ LOG.debug("A node " + node.getQPath().getAsString() + " is IGNOREd node descendant");
}
super.entering(node, level);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -41,7 +41,7 @@
public class ItemDataCopyVisitor extends DefaultItemDataCopyVisitor
{
- private Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyVisitor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyVisitor");
public ItemDataCopyVisitor(NodeData parent, InternalQName destNodeName, NodeTypeDataManager nodeTypeManager,
SessionDataManager srcDataManager, SessionDataManager dstDataManager, boolean keepIdentifiers)
@@ -151,9 +151,9 @@
.getIdentifier() : IdGenerator.generate(), -1, property.getType(), curParent().getIdentifier(), property
.isMultiValued(), values);
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("entering COPY " + newProperty.getQPath().getAsString() + "; pidentifier: "
+ LOG.debug("entering COPY " + newProperty.getQPath().getAsString() + "; pidentifier: "
+ newProperty.getParentIdentifier() + "; identifier: " + newProperty.getIdentifier());
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -56,7 +56,7 @@
public class VersionableWorkspaceDataManager extends ShareableSupportedWorkspaceDataManager
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.VersionableWorkspaceDataManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.VersionableWorkspaceDataManager");
private ShareableSupportedWorkspaceDataManager versionDataManager;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -37,7 +37,7 @@
{
Cache<?, ?> cache;
- private static final Log log = LogFactory.getLog("exo.jcr.component.core.DefaultEvictionActionPolicy");
+ private static final Log LOG = LogFactory.getLog("exo.jcr.component.core.DefaultEvictionActionPolicy");
public void setCache(Cache<?, ?> cache)
{
@@ -50,18 +50,18 @@
boolean result;
try
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Evicting Fqn " + fqn);
+ LOG.trace("Evicting Fqn " + fqn);
}
cache.evict(fqn);
result = true;
}
catch (Exception e)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Unable to evict " + fqn, e);
+ LOG.debug("Unable to evict " + fqn, e);
}
result = false;
}
@@ -84,9 +84,9 @@
// Check if not null, possibly this node was concurrently removed
if (node != null && !node.hasChildrenDirect())
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Evicting Fqn " + fqn);
+ LOG.trace("Evicting Fqn " + fqn);
}
cache.evict(parentFqn);
}
@@ -94,9 +94,9 @@
}
catch (IllegalStateException e)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Unable to evict " + fqn, e);
+ LOG.debug("Unable to evict " + fqn, e);
}
}
return result;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -51,7 +51,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.SessionActionInterceptor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionActionInterceptor");
private final ActionCatalog catalog;
@@ -498,7 +498,7 @@
}
catch (Exception e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -33,7 +33,7 @@
/**
* Logger.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkerThread");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkerThread");
protected boolean stopped = false;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -40,7 +40,7 @@
public class CASableIOSupport
{
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CASeableIOSupport");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CASeableIOSupport");
public static final int HASHFILE_ORDERNUMBER = 0;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -49,7 +49,7 @@
/**
* Logger.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.FileIOChannel");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.FileIOChannel");
/**
* Temporary directory. Used for I/O transaction operations and locks.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -40,7 +40,7 @@
public abstract class FileValueStorage extends ValueStoragePlugin
{
- private Log log = ExoLogger.getLogger("exo.jcr.component.core.FileValueStorage");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.FileValueStorage");
public final static String PATH = "path";
@@ -109,7 +109,7 @@
{
if (rootDir.mkdirs())
{
- log.info("Directory created: " + rootDir.getAbsolutePath());
+ LOG.info("Directory created: " + rootDir.getAbsolutePath());
// create internal temp dir
File tempDir = new File(rootDir, TEMP_DIR_NAME);
@@ -120,7 +120,7 @@
// care about storage temp dir cleanup
for (File tmpf : tempDir.listFiles())
if (!tmpf.delete())
- log.warn("Storage temporary directory contains un-deletable file " + tmpf.getAbsolutePath()
+ LOG.warn("Storage temporary directory contains un-deletable file " + tmpf.getAbsolutePath()
+ ". It's recommended to leave this directory for JCR External Values Storage private use.");
}
else
@@ -129,7 +129,7 @@
}
else
{
- log.warn("Directory IS NOT created: " + rootDir.getAbsolutePath());
+ LOG.warn("Directory IS NOT created: " + rootDir.getAbsolutePath());
}
}
else
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -41,7 +41,7 @@
private static final int ENCODE_CHARS = 7;
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.StringConverter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.StringConverter");
private static class DNChar
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -54,7 +54,7 @@
public class SpoolFile extends File
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.SpoolFile");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SpoolFile");
protected Map<Object, Long> users = new WeakHashMap<Object, Long>();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -52,7 +52,7 @@
/**
* Class logger.
*/
- protected final Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContentImporter");
+ protected final static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContentImporter");
/**
* The flag indicates whether a verified that the first element is the root.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -44,7 +44,7 @@
*/
public class WorkspaceDataImporter extends StreamImporter
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceDataImporter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceDataImporter");
public WorkspaceDataImporter(NodeData parent, int uuidBehavior, ItemDataKeeper dataKeeper,
ItemDataConsumer dataConsumer, NodeTypeDataManager ntManager, LocationFactory locationFactory,
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -42,7 +42,7 @@
/**
*
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.ImportNodeData");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ImportNodeData");
/**
*
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -37,7 +37,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.PropertyInfo");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.PropertyInfo");
/**
*
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -97,7 +97,7 @@
private ConfigurationManager configurationManager;
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.ExoJBossCacheFactory");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ExoJBossCacheFactory");
/**
* Creates ExoJbossCacheFactory with provided configuration transaction managers.
@@ -142,7 +142,7 @@
{
// get JBossCache configuration file path
String jBossCacheConfigurationPath = parameterEntry.getParameterValue(JBOSSCACHE_CONFIG);
- log.info("JBoss Cache configuration used: " + jBossCacheConfigurationPath);
+ LOG.info("JBoss Cache configuration used: " + jBossCacheConfigurationPath);
// prepare configuration
InputStream configStream;
@@ -194,7 +194,7 @@
// Create and inject multiplexer factory
CHANNEL_FACTORY.setMultiplexerConfig(configurationManager.getResource(jgroupsConfigurationFilePath));
cache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(CHANNEL_FACTORY);
- log.info("Multiplexer stack successfully enabled for the cache.");
+ LOG.info("Multiplexer stack successfully enabled for the cache.");
}
}
catch (Exception e)
@@ -213,7 +213,7 @@
{
cache.getConfiguration().setJgroupsConfigFile(
configurationManager.getResource(jgroupsConfigurationFilePath));
- log.info("Custom JGroups configuration set:"
+ LOG.info("Custom JGroups configuration set:"
+ configurationManager.getResource(jgroupsConfigurationFilePath));
}
catch (Exception e)
@@ -301,16 +301,16 @@
else
{
caches.put(key, cache);
- if (log.isInfoEnabled())
+ if (LOG.isInfoEnabled())
{
- log.info("A new JBoss Cache instance has been registered for the region " + rootFqn + ", a cache of type "
+ LOG.info("A new JBoss Cache instance has been registered for the region " + rootFqn + ", a cache of type "
+ cacheType + " and the container " + container.getContext().getName());
}
}
addEvictionRegion(rootFqn, cache, cfg);
- if (log.isInfoEnabled())
+ if (LOG.isInfoEnabled())
{
- log.info("The region " + rootFqn + " has been registered for a cache of type " + cacheType
+ LOG.info("The region " + rootFqn + " has been registered for a cache of type " + cacheType
+ " and the container " + container.getContext().getName());
}
return cache;
@@ -336,7 +336,7 @@
}
catch (IllegalArgumentException e)
{
- log.error("Could not create the JMX Manager", e);
+ LOG.error("Could not create the JMX Manager", e);
}
return null;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -34,7 +34,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.ExtendedEventType");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ExtendedEventType");
public static final String NODE_ADDED = "Node is added";
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -38,7 +38,7 @@
/**
* The logger
*/
- protected Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ActionNonTxAware");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ActionNonTxAware");
/**
* Executes the action outside the context of the current tx
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -53,7 +53,7 @@
/**
* The logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.JobExistingWorkspaceSameConfigRestore");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobExistingWorkspaceSameConfigRestore");
/**
* JobExistingWorkspaceSameConfigRestore constructor.
@@ -159,7 +159,7 @@
}
catch (BackupException e)
{
- log.error("Can't rollback changes", e);
+ LOG.error("Can't rollback changes", e);
}
}
@@ -176,7 +176,7 @@
}
catch (BackupException e)
{
- log.error("Can't close restorer", e);
+ LOG.error("Can't close restorer", e);
}
}
@@ -189,7 +189,7 @@
}
catch (RepositoryException e)
{
- log.error("Can't resume component", e);
+ LOG.error("Can't resume component", e);
}
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -51,7 +51,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.JobWorkspaceRestore");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobWorkspaceRestore");
/**
* RESTORE_STARTED. The state of start restore.
@@ -156,7 +156,7 @@
}
catch (Throwable t)
{
- log.error("The restore was fail", t);
+ LOG.error("The restore was fail", t);
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -57,7 +57,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.PendingChangesLog");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.PendingChangesLog");
/**
* The definition of ChangesLog types.
@@ -429,15 +429,15 @@
}
catch (InterruptedException ie)
{
- log.error("The interrupted exceptio : ", ie);
+ LOG.error("The interrupted exceptio : ", ie);
}
catch (IndexOutOfBoundsException ioobe)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.info("listFixupStream.size() == " + listFixupStream.size());
- log.info("listRandomAccessFile.size() == " + listRandomAccessFile.size());
- log.info(" i == " + i);
+ LOG.info("listFixupStream.size() == " + listFixupStream.size());
+ LOG.info("listRandomAccessFile.size() == " + listRandomAccessFile.size());
+ LOG.info(" i == " + i);
}
synchronized (this)
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -56,7 +56,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.RepositoryBackupChainImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.RepositoryBackupChainImpl");
private final RepositoryBackupConfig config;
@@ -146,10 +146,11 @@
{
if (state != FINISHED)
{
- if (log.isDebugEnabled()) {
+ if (LOG.isDebugEnabled())
+ {
for (BackupChain bc : workspaceBackups)
{
- log.debug(repositoryBackupId + " : " + getState(bc.getFullBackupState()));
+ LOG.debug(repositoryBackupId + " : " + getState(bc.getFullBackupState()));
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -42,7 +42,7 @@
public class FullBackupJob extends AbstractFullBackupJob
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
private String pathBackupFile;
@@ -70,12 +70,12 @@
}
catch (FileNotFoundException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
catch (IOException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
}
@@ -102,12 +102,12 @@
}
catch (RepositoryException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
catch (IOException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
@@ -118,7 +118,7 @@
public void stop()
{
- log.info("Stop requested " + getStorageURL().getPath());
+ LOG.info("Stop requested " + getStorageURL().getPath());
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -51,7 +51,7 @@
public class IncrementalBackupJob extends AbstractIncrementalBackupJob
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.IncrementalBackupJob");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.IncrementalBackupJob");
private ObjectOutputStream oosFileData;
@@ -77,12 +77,12 @@
}
catch (FileNotFoundException e)
{
- log.error("Incremental backup initialization failed ", e);
+ LOG.error("Incremental backup initialization failed ", e);
notifyError("Incremental backup initialization failed ", e);
}
catch (IOException e)
{
- log.error("Incremental backup initialization failed ", e);
+ LOG.error("Incremental backup initialization failed ", e);
notifyError("Incremental backup initialization failed ", e);
}
}
@@ -90,7 +90,7 @@
public void stop()
{
state = FINISHED;
- log.info("Stop requested " + getStorageURL().getPath());
+ LOG.info("Stop requested " + getStorageURL().getPath());
notifyListeners();
}
@@ -123,8 +123,8 @@
long total = System.currentTimeMillis() - start;
- if (log.isDebugEnabled())
- log.debug("Time : " + total + " ms" + " Itemstates count : " + changesLog.getAllStates().size());
+ if (LOG.isDebugEnabled())
+ LOG.debug("Time : " + total + " ms" + " Itemstates count : " + changesLog.getAllStates().size());
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -46,7 +46,7 @@
/**
* Logger.
*/
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
/**
* {@inheritDoc}
@@ -77,12 +77,12 @@
}
catch (FileNotFoundException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
catch (IOException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
}
@@ -109,12 +109,12 @@
}
catch (BackupException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
catch (RepositoryException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
finally
@@ -125,7 +125,7 @@
}
catch (RepositoryException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
}
@@ -139,6 +139,6 @@
*/
public void stop()
{
- log.info("Stop requested " + getStorageURL().getPath());
+ LOG.info("Stop requested " + getStorageURL().getPath());
}
}
\ No newline at end of file
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -256,7 +256,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.HTTPBackupAgent");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.HTTPBackupAgent");
/**
* To disable cache control.
@@ -302,7 +302,7 @@
this.backupManager = (ExtendedBackupManager) backupManager;
this.sessionProviderService = sessionProviderService;
- log.info("HTTPBackupAgent inited");
+ LOG.info("HTTPBackupAgent inited");
}
/**
@@ -411,7 +411,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start backup", exception);
+ LOG.error("Can not start backup", exception);
return Response.status(status).entity("Can not start backup : " + failMessage).type(MediaType.TEXT_PLAIN)
.cacheControl(noCache).build();
@@ -505,7 +505,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start backup", exception);
+ LOG.error("Can not start backup", exception);
return Response.status(status).entity("Can not start backup : " + failMessage).type(MediaType.TEXT_PLAIN)
.cacheControl(noCache).build();
@@ -567,7 +567,7 @@
failMessage = e.getMessage();
}
- log.error("Can not drop the workspace '" + "/" + repository + "/" + workspace + "'", exception);
+ LOG.error("Can not drop the workspace '" + "/" + repository + "/" + workspace + "'", exception);
return Response.status(status).entity(
"Can not drop the workspace '" + "/" + repository + "/" + workspace + "' : " + failMessage).type(
@@ -680,7 +680,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup log with id '" + backupId + "'", exception);
return Response.status(status).entity(
@@ -814,7 +814,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup log with id '" + backupId + "'", exception);
return Response.status(status).entity(
@@ -856,7 +856,7 @@
}
catch (UnsupportedEncodingException e)
{
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup set '" + backupSetPath + "'", e);
return Response.status(Response.Status.BAD_REQUEST).entity(
@@ -983,7 +983,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup set '" + backupSetPath + "'", exception);
return Response.status(status).entity(
@@ -1134,7 +1134,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ "' from backup log with id '" + backupId + "'", exception);
return Response.status(status).entity(
@@ -1171,7 +1171,7 @@
}
catch (UnsupportedEncodingException e)
{
- log.error("Can not start restore from backup set '" + backupSetPathEncoded + "'", e);
+ LOG.error("Can not start restore from backup set '" + backupSetPathEncoded + "'", e);
return Response.status(Response.Status.BAD_REQUEST).entity(
"Can not start restore from backup set '" + backupSetPathEncoded + "' : " + e.getMessage()).type(
@@ -1235,7 +1235,7 @@
{
if (exception != null)
{
- log.error("Can not start restore from backup set '" + backupSetPath + "'", exception);
+ LOG.error("Can not start restore from backup set '" + backupSetPath + "'", exception);
return Response.status(status).entity(
"Can not start restore from backup set '" + backupSetPath + "' : " + failMessage).type(
@@ -1344,7 +1344,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ "' from backup set \"" + backupSetPath + "\"", exception);
return Response.status(status).entity(
@@ -1419,7 +1419,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + repository + "' from backup set '" + backupSetPath
+ LOG.error("Can not start restore the repository '" + "/" + repository + "' from backup set '" + backupSetPath
+ "'", exception);
return Response.status(status).entity(
@@ -1513,7 +1513,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ backupId + "'", exception);
return Response.status(status).entity(
@@ -1621,7 +1621,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ backupId + "'", exception);
return Response.status(status).entity(
@@ -1663,7 +1663,7 @@
}
catch (UnsupportedEncodingException e)
{
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ backupSetPath + "'", e);
return Response.status(Response.Status.BAD_REQUEST).entity(
@@ -1759,7 +1759,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ backupSetPath + "'", exception);
return Response.status(status).entity(
@@ -1867,7 +1867,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + repository + "' from backup log with id '"
+ LOG.error("Can not start restore the repository '" + "/" + repository + "' from backup log with id '"
+ backupId + "'", exception);
return Response.status(status).entity(
@@ -1927,7 +1927,7 @@
failMessage = e.getMessage();
}
- log.error("Can not stop backup", exception);
+ LOG.error("Can not stop backup", exception);
return Response.status(status).entity("Can not stop backup : " + failMessage).type(MediaType.TEXT_PLAIN)
.cacheControl(noCache).build();
@@ -1985,7 +1985,7 @@
failMessage = e.getMessage();
}
- log.error("Can not stop repository backup ", exception);
+ LOG.error("Can not stop repository backup ", exception);
return Response.status(status).entity("Can not stop repository backup : " + failMessage).type(
MediaType.TEXT_PLAIN).cacheControl(noCache).build();
@@ -2013,7 +2013,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about backup service", e);
+ LOG.error("Can not get information about backup service", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about backup service : " + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2049,7 +2049,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backups", e);
+ LOG.error("Can not get information about current or completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2085,7 +2085,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed reposioty backups", e);
+ LOG.error("Can not get information about current or completed reposioty backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed repository backups" + e.getMessage()).type(
@@ -2133,7 +2133,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backup with 'id' " + id, e);
+ LOG.error("Can not get information about current or completed backup with 'id' " + id, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed backup with 'id' " + id + " : " + e.getMessage()).type(
@@ -2182,7 +2182,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed repository backup with 'id' " + id, e);
+ LOG.error("Can not get information about current or completed repository backup with 'id' " + id, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed repository backup with 'id' " + id + " : "
@@ -2214,7 +2214,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current backups", e);
+ LOG.error("Can not get information about current backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current backups" + e.getMessage()).type(MediaType.TEXT_PLAIN).cacheControl(
@@ -2246,7 +2246,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current repositorty backups", e);
+ LOG.error("Can not get information about current repositorty backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current backups" + e.getMessage()).type(MediaType.TEXT_PLAIN).cacheControl(
@@ -2279,7 +2279,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about completed backups", e);
+ LOG.error("Can not get information about completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2312,7 +2312,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about completed backups", e);
+ LOG.error("Can not get information about completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2366,7 +2366,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backups", e);
+ LOG.error("Can not get information about current or completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2416,7 +2416,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed repository backups", e);
+ LOG.error("Can not get information about current or completed repository backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed repository backups" + e.getMessage()).type(
@@ -2466,7 +2466,7 @@
}
catch (Throwable e)
{
- log.error(
+ LOG.error(
"Can not get information about current restore for workspace /" + repository + "/" + workspace + "'", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
@@ -2515,7 +2515,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current restore for repository /" + repository + "'", e);
+ LOG.error("Can not get information about current restore for repository /" + repository + "'", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current restore for repository /" + repository + "' : " + e.getMessage())
@@ -2571,7 +2571,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current restores.", e);
+ LOG.error("Can not get information about current restores.", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current restores : " + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2625,7 +2625,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current repository restores.", e);
+ LOG.error("Can not get information about current repository restores.", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current repository restores : " + e.getMessage()).type(MediaType.TEXT_PLAIN)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -44,7 +44,7 @@
*/
public class NewGroupListener extends GroupEventListener
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.NewGroupListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NewGroupListener");
private static final String GROUPS_PATH = "groupsPath";
@@ -122,7 +122,7 @@
}
catch (RepositoryException e)
{
- log.error("An error occurs while removing the group directory of '" + groupId + "'", e);
+ LOG.error("An error occurs while removing the group directory of '" + groupId + "'", e);
}
finally
{
@@ -153,7 +153,7 @@
}
catch (Exception e)
{
- log.error("An error occurs while initializing the group directory of '" + groupId + "'", e);
+ LOG.error("An error occurs while initializing the group directory of '" + groupId + "'", e);
}
finally
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -43,7 +43,7 @@
*/
public class NewUserListener extends UserEventListener
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.NewUserListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NewUserListener");
private final HierarchyConfig config_;
@@ -86,7 +86,7 @@
}
catch (Exception e)
{
- log.error("An error occurs while initializing the user directory of '" + userName + "'", e);
+ LOG.error("An error occurs while initializing the user directory of '" + userName + "'", e);
}
finally
{
@@ -106,7 +106,7 @@
}
catch (Exception e)
{
- log.error("An error occurs while removing the user directory of '" + user.getUserName() + "'", e);
+ LOG.error("An error occurs while removing the user directory of '" + user.getUserName() + "'", e);
}
finally
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -68,7 +68,7 @@
/**
* Logger.
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.RESTRegistryService");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.RESTRegistryService");
/**
*
@@ -137,7 +137,7 @@
}
catch (Exception e)
{
- log.error("Get registry failed", e);
+ LOG.error("Get registry failed", e);
throw new WebApplicationException(e);
}
}
@@ -161,7 +161,7 @@
}
catch (RepositoryException e)
{
- log.error("Get registry entry failed", e);
+ LOG.error("Get registry entry failed", e);
throw new WebApplicationException(e);
}
}
@@ -182,27 +182,27 @@
}
catch (IllegalArgumentException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (IOException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (SAXException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (ParserConfigurationException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (RepositoryException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
}
@@ -231,27 +231,27 @@
}
catch (IllegalArgumentException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (IOException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (SAXException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (ParserConfigurationException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (RepositoryException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
}
@@ -273,7 +273,7 @@
}
catch (Exception e)
{
- log.error("Remove registry entry failed", e);
+ LOG.error("Remove registry entry failed", e);
throw new WebApplicationException(e);
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -39,7 +39,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.ext.RegistryInitializationEntryPlugin");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.RegistryInitializationEntryPlugin");
private HashMap<String, String> appConfiguration = new HashMap<String, String>();
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -37,7 +37,7 @@
/**
* Logger.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NtFileNodeRepresentationFactory");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NtFileNodeRepresentationFactory");
protected NodeRepresentationService nodeRepresentationService;
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -54,7 +54,7 @@
public class FtpServerImpl implements FtpServer
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServerImpl");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServerImpl");
public static final String COMMAND_PATH = "/conf/ftp-commands.xml";
@@ -96,14 +96,14 @@
if (!PrivilegedFileHelper.exists(cacheFolder))
{
- log.info("Cache folder not exist. Try to create it...");
+ LOG.info("Cache folder not exist. Try to create it...");
PrivilegedFileHelper.mkdirs(cacheFolder);
}
String[] cacheFiles = PrivilegedFileHelper.list(cacheFolder);
if (cacheFiles == null)
{
- log.info("No cache file in cache folder!");
+ LOG.info("No cache file in cache folder!");
return;
}
@@ -132,11 +132,11 @@
try
{
serverSocket = new ServerSocket(port);
- log.info("FTPServer started on port '" + port + "'");
+ LOG.info("FTPServer started on port '" + port + "'");
}
catch (BindException e)
{
- log.warn("Cannot launch the FTPServer on '" + (port++) + "', we try the next port number");
+ LOG.warn("Cannot launch the FTPServer on '" + (port++) + "', we try the next port number");
}
}
@@ -149,7 +149,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
return false;
@@ -174,11 +174,11 @@
}
catch (RepositoryException e)
{
- log.info("Repository exception. " + e.getMessage(), e);
+ LOG.info("Repository exception. " + e.getMessage(), e);
}
catch (RepositoryConfigurationException e)
{
- log.info("Repository configuration exception. " + e.getMessage(), e);
+ LOG.info("Repository configuration exception. " + e.getMessage(), e);
}
return null;
@@ -197,7 +197,7 @@
public boolean unRegisterClient(FtpClientSession clientSession)
{
boolean result = clients.remove(clientSession);
- log.info(">>> Client disconnected. Clients: " + clients.size());
+ LOG.info(">>> Client disconnected. Clients: " + clients.size());
return result;
}
@@ -249,11 +249,11 @@
FtpClientSession clientSession = new FtpClientSessionImpl(ftpServer, incoming);
clients.add(clientSession);
- log.info(">>> New client connected. Clients: " + clients.size());
+ LOG.info(">>> New client connected. Clients: " + clients.size());
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
}
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -37,7 +37,7 @@
public class FtpServiceImpl implements FtpService, Startable
{
- private Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServiceImpl");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServiceImpl");
private CommandService commandService = null;
@@ -58,7 +58,7 @@
public void start()
{
- log.info("Start service.");
+ LOG.info("Start service.");
try
{
ftpServer = new FtpServerImpl(config, commandService, repositoryService);
@@ -66,17 +66,17 @@
}
catch (Exception e)
{
- log.info("Unhandled exception. could not get repository!!!! " + e.getMessage(), e);
+ LOG.info("Unhandled exception. could not get repository!!!! " + e.getMessage(), e);
}
}
public void stop()
{
- log.info("Stopping...");
+ LOG.info("Stopping...");
if (ftpServer != null)
ftpServer.stop();
else
- log.warn("Service isn't started");
+ LOG.warn("Service isn't started");
}
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -30,7 +30,7 @@
public class FtpTextUtils
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpTextUtils");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpTextUtils");
public static String getStrached(String strVal, int reqLen)
{
@@ -52,7 +52,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
StringBuilder resStr = new StringBuilder();
for (int i = 0; i < reqLen; i++)
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -38,7 +38,7 @@
public class FtpClientCommandThread extends Thread
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientCommandThread");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientCommandThread");
protected FtpClientSession clientSession;
@@ -54,9 +54,9 @@
if (container == null)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("No Portal Container found.");
+ LOG.debug("No Portal Container found.");
}
container = ExoContainerContext.getTopContainer();
}
@@ -116,7 +116,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
break;
}
}
@@ -127,7 +127,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
}
finally
@@ -171,16 +171,16 @@
String encoding = clientSession.getFtpServer().getConfiguration().getClientSideEncoding();
String readyCommand = new String(commandLine, encoding);
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("FTP_CMD:[" + readyCommand + "]");
+ LOG.debug("FTP_CMD:[" + readyCommand + "]");
}
return readyCommand;
}
catch (Exception exc)
{
- log.info("Unahdled exception. " + exc.getMessage(), exc);
+ LOG.info("Unahdled exception. " + exc.getMessage(), exc);
}
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -54,7 +54,7 @@
public class FtpClientSessionImpl implements FtpClientSession
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientSessionImpl");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientSessionImpl");
private FtpServer ftpServer;
@@ -131,7 +131,7 @@
}
catch (UnsupportedEncodingException eexc)
{
- log.info("Unsupported encoding exception. See for CLIENT-SIDE-ENCODING parameter. " + eexc.getMessage(), eexc);
+ LOG.info("Unsupported encoding exception. See for CLIENT-SIDE-ENCODING parameter. " + eexc.getMessage(), eexc);
byte[] data = replyString.getBytes();
clientSocket.getOutputStream().write(data);
// outPrintStream.println(replyString);
@@ -176,7 +176,7 @@
}
catch (IOException exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
getFtpServer().unRegisterClient(this);
@@ -370,7 +370,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
return FtpConst.Replyes.REPLY_550;
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -33,7 +33,7 @@
public class CmdCdUp extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "CmdCdUp");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "CmdCdUp");
public CmdCdUp()
{
@@ -49,7 +49,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
reply(String.format(FtpConst.Replyes.REPLY_550, FtpConst.Commands.CMD_CDUP));
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -34,7 +34,7 @@
public class FtpSlowInputStream extends InputStream
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowInputStream");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowInputStream");
private InputStream nativeInputStream;
@@ -58,7 +58,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
}
readed = 0;
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -34,7 +34,7 @@
public class FtpSlowOutputStream extends OutputStream
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowOutputStream");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowOutputStream");
private OutputStream nativeOutputStream;
@@ -58,7 +58,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
writed = 0;
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -38,7 +38,7 @@
public class FtpFileInfoImpl implements FtpFileInfo
{
- protected static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpFileInfoImpl");
+ protected static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpFileInfoImpl");
protected String _name = "";
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -58,7 +58,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger(AclCommand.class);
+ private static final Log LOG = ExoLogger.getLogger(AclCommand.class);
/**
* Applies changes for JCR node's {@link AccessControlList}
@@ -121,22 +121,22 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.INTERNAL_ERROR).entity(exc.getMessage()).build();
}
catch (AccessControlException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.FORBIDDEN).entity(exc.getMessage()).build();
}
catch (IllegalArgumentException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.BAD_REQUEST).entity(exc.getMessage()).build();
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.BAD_REQUEST).build();
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -73,7 +73,7 @@
/**
* Logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.GetCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.GetCommand");
private Map<String, String> xsltParams;
@@ -236,12 +236,12 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -49,7 +49,7 @@
/**
* Logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.HeadCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.HeadCommand");
/**
* Webdav Head method implementation.
@@ -88,7 +88,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -61,7 +61,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.LockCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.LockCommand");
/**
* Resource locks holder.
@@ -157,7 +157,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
@@ -248,7 +248,7 @@
}
catch (Exception e)
{
- log.error(e.getMessage(), e);
+ LOG.error(e.getMessage(), e);
throw new IOException(e.getMessage());
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -53,7 +53,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchCommand");
/**
* Constructor.
@@ -100,7 +100,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
@@ -214,7 +214,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
status = HTTPStatus.INTERNAL_ERROR;
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -64,7 +64,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindCommand");
/**
* Webdav Propfind method implementation.
@@ -89,7 +89,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
@@ -136,17 +136,17 @@
}
catch (RepositoryException e1)
{
- log.error(e1.getMessage(), e1);
+ LOG.error(e1.getMessage(), e1);
return Response.serverError().build();
}
catch (URISyntaxException e1)
{
- log.error(e1.getMessage(), e1);
+ LOG.error(e1.getMessage(), e1);
return Response.serverError().build();
}
catch (IllegalResourceTypeException e1)
{
- log.error(e1.getMessage(), e1);
+ LOG.error(e1.getMessage(), e1);
return Response.serverError().build();
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -46,7 +46,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.SearchCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.SearchCommand");
/**
* Webdav search method implementation.
@@ -84,7 +84,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -60,7 +60,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.SearchResultResponseEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.SearchResultResponseEntity");
/**
* Namespace conetext.
@@ -192,7 +192,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -45,7 +45,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.CheckOutCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.CheckOutCommand");
/**
* Webdav CheckOut comand implementation.
@@ -79,7 +79,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -55,7 +55,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.ReportCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.ReportCommand");
/**
* Webdav Report method implementation.
@@ -104,12 +104,12 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -46,7 +46,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.UnCheckOutCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.UnCheckOutCommand");
/**
* Webdav Uncheckout method implementation.
@@ -85,7 +85,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -38,7 +38,7 @@
/**
* logger.
*/
- private Log log = ExoLogger.getLogger("exo.jcr.component.webdav.LockRequestEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.LockRequestEntity");
/**
* Lock scope.
@@ -77,7 +77,7 @@
if (!scope.equals(PropertyConstants.EXCLUSIVE))
{
// should we throw PreconditionException here?
- log.warn("Lock is converted to exclusive scope, requested " + scope.getLocalPart());
+ LOG.warn("Lock is converted to exclusive scope, requested " + scope.getLocalPart());
}
lockScope = PropertyConstants.EXCLUSIVE;
}
@@ -87,7 +87,7 @@
if (!type.equals(PropertyConstants.WRITE))
{
// should we throw PreconditionException here?
- log.warn("Lock is converted to exclusive scope, requested " + type.getLocalPart());
+ LOG.warn("Lock is converted to exclusive scope, requested " + type.getLocalPart());
}
lockScope = PropertyConstants.WRITE;
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -48,7 +48,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchResponseEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchResponseEntity");
/**
* Namespace context.
@@ -127,7 +127,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException();
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -55,7 +55,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindResponseEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindResponseEntity");
/**
* XML writer.
@@ -149,22 +149,22 @@
}
catch (XMLStreamException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
catch (IllegalResourceTypeException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
catch (URISyntaxException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -50,7 +50,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.LnkProducer");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.LnkProducer");
/**
* Default constructor.
@@ -88,7 +88,7 @@
}
catch (IOException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new WebApplicationException(exc);
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -44,7 +44,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.ResourceUtil");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.ResourceUtil");
/**
* If the node is file.
@@ -64,7 +64,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return false;
}
}
@@ -85,7 +85,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return false;
}
}
@@ -106,7 +106,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return false;
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -45,7 +45,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.MultipartByterangesEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.MultipartByterangesEntity");
/**
* resource.
@@ -123,12 +123,12 @@
}
catch (IOException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException("Can't write to stream, caused " + exc);
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException("Can't write to stream, caused " + exc);
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -54,7 +54,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.PropstatGroupedRepresentation");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.PropstatGroupedRepresentation");
/**
* properties statuses.
@@ -163,7 +163,7 @@
catch (AccessDeniedException exc)
{
statname = WebDavConst.getStatusDescription(HTTPStatus.FORBIDDEN);
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
}
catch (ItemNotFoundException exc)
{
Modified: jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -64,7 +64,7 @@
}
catch (Exception e)
{
- log.error("GetUserName error: " + e);
+ LOG.error("GetUserName error: " + e);
return "Undefined";
}
}
Modified: jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -41,7 +41,7 @@
public class BasicAppContext extends ContextBase implements JCRAppContext
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.framework.command.BasicAppContext");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.BasicAppContext");
protected final SessionProvider sessionProvider;
Modified: jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -48,7 +48,7 @@
public static final String JCR_CONTENT_MAPPING = "org.exoplatform.frameworks.web.repositoryMapping";
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.JCRWebAppContext");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.JCRWebAppContext");
protected final SessionProvider sessionProvider;
@@ -72,7 +72,7 @@
{
String name = (String)en.nextElement();
put(name, servletContext.getInitParameter(name));
- log.debug("ServletContext init param: " + name + "=" + servletContext.getInitParameter(name));
+ LOG.debug("ServletContext init param: " + name + "=" + servletContext.getInitParameter(name));
}
en = servletContext.getAttributeNames();
@@ -80,7 +80,7 @@
{
String name = (String)en.nextElement();
put(name, servletContext.getAttribute(name));
- log.debug("ServletContext: " + name + "=" + servletContext.getAttribute(name));
+ LOG.debug("ServletContext: " + name + "=" + servletContext.getAttribute(name));
}
HttpSession session = request.getSession(false);
@@ -91,7 +91,7 @@
{
String name = (String)en.nextElement();
put(name, session.getAttribute(name));
- log.debug("Session: " + name + "=" + session.getAttribute(name));
+ LOG.debug("Session: " + name + "=" + session.getAttribute(name));
}
}
@@ -107,7 +107,7 @@
{
String name = (String)en.nextElement();
put(name, request.getParameter(name));
- log.debug("Request: " + name + "=" + request.getParameter(name));
+ LOG.debug("Request: " + name + "=" + request.getParameter(name));
}
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -41,7 +41,7 @@
public class FtpClientSessionImpl implements FtpClientSession
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpClientSessionImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpClientSessionImpl");
protected String host;
@@ -112,7 +112,7 @@
// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> sleeping.........");
}
- log.info("unhandled exception. " + prevExc.getMessage(), prevExc);
+ LOG.info("unhandled exception. " + prevExc.getMessage(), prevExc);
return false;
}
@@ -137,7 +137,7 @@
}
catch (IOException exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdCdUp extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdCdUp");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdCdUp");
public int execute()
{
@@ -43,7 +43,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdCwd extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdCwd");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdCwd");
protected String path;
@@ -50,7 +50,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -37,7 +37,7 @@
public class CmdList extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdList");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdList");
protected String path = "";
@@ -115,7 +115,7 @@
}
catch (Exception exc)
{
- log.info("CAN'T PARSE FILE LINE: [" + lines[i] + "]");
+ LOG.info("CAN'T PARSE FILE LINE: [" + lines[i] + "]");
}
}
reply = getReply();
@@ -124,7 +124,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -31,7 +31,7 @@
public class CmdMode extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdMode");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdMode");
private String mode;
@@ -49,7 +49,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -35,7 +35,7 @@
public class CmdNlst extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdNlst");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdNlst");
protected String path = "";
@@ -106,7 +106,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdNoop extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdNoop");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdNoop");
public int execute()
{
@@ -43,7 +43,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdPass extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdPass");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdPass");
protected String pass;
@@ -50,7 +50,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -34,7 +34,7 @@
public class CmdPasv extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdPasv");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdPasv");
protected String host = "";
@@ -78,9 +78,9 @@
}
catch (Exception exc)
{
- log.info("unhandled ecxeption. " + exc.getMessage(), exc);
+ LOG.info("unhandled ecxeption. " + exc.getMessage(), exc);
}
- log.info("SOME ERRORS");
+ LOG.info("SOME ERRORS");
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdPort extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdPort");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdPort");
protected String host;
@@ -62,7 +62,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdRest extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdRest");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdRest");
protected String offset;
@@ -62,7 +62,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdRnFr extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnFr");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnFr");
protected String path;
@@ -57,7 +57,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdRnTo extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnTo");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnTo");
protected String path;
@@ -57,7 +57,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -31,7 +31,7 @@
public class CmdStat extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdStat");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdStat");
public int execute()
{
@@ -42,7 +42,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -33,7 +33,7 @@
public class CmdStor extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdStor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdStor");
protected String path;
@@ -89,7 +89,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -31,7 +31,7 @@
public class CmdStru extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdStru");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdStru");
private String structureType;
@@ -49,7 +49,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -32,7 +32,7 @@
public class CmdUser extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdUser");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdUser");
protected String userName;
@@ -50,7 +50,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -36,7 +36,7 @@
public abstract class FtpCommandImpl implements FtpCommand
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpCommandImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpCommandImpl");
protected FtpClientSession clientSession;
@@ -59,7 +59,7 @@
public void sendCommand(String command)
{
- log.info(">>> " + command);
+ LOG.info(">>> " + command);
try
{
@@ -70,7 +70,7 @@
}
catch (IOException exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
}
@@ -92,7 +92,7 @@
public int getReply() throws Exception
{
- log.info("try get reply..........");
+ LOG.info("try get reply..........");
StringBuilder reply = new StringBuilder();
String curReply = "";
@@ -122,7 +122,7 @@
descript = reply.toString();
replyCode = FtpUtils.getReplyCode(curReply);
- log.info("<<< " + descript);
+ LOG.info("<<< " + descript);
return replyCode;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -27,7 +27,7 @@
public class FtpSlowInputStream1 extends InputStream
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowInputStream");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowInputStream");
protected InputStream nativeInputStream;
@@ -54,7 +54,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
}
readed = 0;
}
Modified: jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java 2012-02-15 02:16:26 UTC (rev 5635)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java 2012-02-15 08:09:48 UTC (rev 5636)
@@ -27,7 +27,7 @@
public class FtpSlowOutputStream extends OutputStream
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowOutputStream");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowOutputStream");
private OutputStream nativeOutputStream;
@@ -55,7 +55,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
writed = 0;
}
12 years, 4 months
exo-jcr SVN: r5635 - in jcr/branches/1.12.x: exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command and 3 other directories.
by do-not-reply@jboss.org
Author: trang_vu
Date: 2012-02-14 21:16:26 -0500 (Tue, 14 Feb 2012)
New Revision: 5635
Added:
jcr/branches/1.12.x/patch/1.12.12-GA/JCR-1704/readme.txt
Modified:
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
Log:
JCR-1704: Portlet crash and no preview available after saving Office 2010 documents in webdav
Fix description
* Add new WebDavService initial parameter to contain a set of untrusted user agents.
Content-type headers sent by this user agents are now ignored, we use instead MimeTypeResolver to define resource's MIME type.
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java 2012-02-14 14:51:09 UTC (rev 5634)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java 2012-02-15 02:16:26 UTC (rev 5635)
@@ -18,15 +18,14 @@
*/
package org.exoplatform.services.jcr.webdav;
+import org.exoplatform.common.util.HierarchicalProperty;
+
import java.io.InputStream;
-import java.util.List;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-import org.exoplatform.common.util.HierarchicalProperty;
-
/**
* Created by The eXo Platform SARL .<br/>
* JCR WebDAV entry point. Defines WebDav protocol methods: RFC-2518 HTTP
@@ -68,7 +67,7 @@
Response head(String repoName, String repoPath, UriInfo baseURI);
/**
- * WedDAV "HEAD" method. See <a
+ * WedDAV "PUT" method. See <a
* href='http://www.ietf.org/rfc/rfc2518.txt'>HTTP methods for distributed
* authoring sec. 8.7 "PUT"</a>.
*
@@ -83,16 +82,37 @@
* @param inputStream stream that contain incoming data
* @return the instance of javax.ws.rs.core.Response
*/
+ @Deprecated
Response put(String repoName, String repoPath, String lockTokenHeader, String ifHeader, String fileNodeTypeHeader,
String contentNodeTypeHeader, String mixinTypes, MediaType mediatype, InputStream inputStream);
/**
+ * WedDAV "PUT" method. See <a
+ * href='http://www.ietf.org/rfc/rfc2518.txt'>HTTP methods for distributed
+ * authoring sec. 8.7 "PUT"</a>.
+ *
* @param repoName repository name
* @param repoPath path in repository
* @param lockTokenHeader Lock-Token HTTP header
* @param ifHeader If HTTP Header
+ * @param fileNodeTypeHeader JCR NodeType header
+ * @param contentNodeTypeHeader JCR Content-NodeType header
+ * @param mixinTypes JCR Mixin types header
+ * @param mimeType Content-Type HTTP header
+ * @param userAgent User-Agent HTTP header
+ * @param inputStream stream that contain incoming data
* @return the instance of javax.ws.rs.core.Response
*/
+ Response put(String repoName, String repoPath, String lockTokenHeader, String ifHeader, String fileNodeTypeHeader,
+ String contentNodeTypeHeader, String mixinTypes, MediaType mediaType, String userAgent, InputStream inputStream);
+
+ /**
+ * @param repoName repository name
+ * @param repoPath path in repository
+ * @param lockTokenHeader Lock-Token HTTP header
+ * @param ifHeader If HTTP Header
+ * @return the instance of javax.ws.rs.core.Response
+ */
Response delete(String repoName, String repoPath, String lockTokenHeader, String ifHeader);
/**
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2012-02-14 14:51:09 UTC (rev 5634)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2012-02-15 02:16:26 UTC (rev 5635)
@@ -23,6 +23,7 @@
import org.exoplatform.commons.utils.MimeTypeResolver;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.container.xml.ValuesParam;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService;
@@ -76,8 +77,10 @@
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.jcr.NoSuchWorkspaceException;
import javax.jcr.PathNotFoundException;
@@ -141,6 +144,8 @@
public static final String FOLDER_ICON_PATH = "folder-icon-path";
+ public static final String UNTRUSTED_USER_AGENTS = "untrusted-user-agents";
+
/**
* Logger.
*/
@@ -192,6 +197,10 @@
private Map<String, String> xsltParams = new HashMap<String, String>();
/**
+ * Set of untrusted user agents. Special rules are applied for listed agents.
+ */
+ private Set<String> untrustedUserAgents = new HashSet<String>();
+ /**
* The list of allowed methods.
*/
private static final String ALLOW;
@@ -300,6 +309,12 @@
}
+ ValuesParam pUntrustedUserAgents = params.getValuesParam(UNTRUSTED_USER_AGENTS);
+ if (pUntrustedUserAgents != null)
+ {
+ untrustedUserAgents.addAll((List<String>)pUntrustedUserAgents.getValues());
+ }
+
}
/**
@@ -987,6 +1002,17 @@
}
}
+ @Deprecated
+ public Response put(@PathParam("repoName") String repoName, @PathParam("repoPath") String repoPath,
+ @HeaderParam(ExtHttpHeaders.LOCKTOKEN) String lockTokenHeader, @HeaderParam(ExtHttpHeaders.IF) String ifHeader,
+ @HeaderParam(ExtHttpHeaders.FILE_NODETYPE) String fileNodeTypeHeader,
+ @HeaderParam(ExtHttpHeaders.CONTENT_NODETYPE) String contentNodeTypeHeader,
+ @HeaderParam(ExtHttpHeaders.CONTENT_MIXINTYPES) String mixinTypes,
+ @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype, InputStream inputStream)
+ {
+ return put(repoName, repoPath, lockTokenHeader, ifHeader, fileNodeTypeHeader, contentNodeTypeHeader, mixinTypes,
+ mediatype, null, inputStream);
+ }
/**
* {@inheritDoc}
*/
@@ -997,9 +1023,9 @@
@HeaderParam(ExtHttpHeaders.FILE_NODETYPE) String fileNodeTypeHeader,
@HeaderParam(ExtHttpHeaders.CONTENT_NODETYPE) String contentNodeTypeHeader,
@HeaderParam(ExtHttpHeaders.CONTENT_MIXINTYPES) String mixinTypes,
- @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype, InputStream inputStream)
+ @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype,
+ @HeaderParam(ExtHttpHeaders.USER_AGENT) String userAgent, InputStream inputStream)
{
-
if (log.isDebugEnabled())
{
log.debug("PUT " + repoName + "/" + repoPath);
@@ -1012,7 +1038,7 @@
String mimeType = null;
String encoding = null;
- if (mediatype == null)
+ if (mediatype == null || untrustedUserAgents.contains(userAgent))
{
MimeTypeResolver mimeTypeResolver = new MimeTypeResolver();
mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2012-02-14 14:51:09 UTC (rev 5634)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2012-02-15 02:16:26 UTC (rev 5635)
@@ -144,6 +144,85 @@
assertEquals(headers.getFirst(HttpHeaders.CONTENT_TYPE), property.getString());
}
+ /**
+ * Testing if we use MimeTypeResolver to define jcr:mimeType property
+ * for untrusted user agents during resource creation.
+ */
+ public void testUntrustedUserAgentResourceCreation() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+
+ // create User-Agent header indicating that the resource we create
+ // has application/octet-stream type
+ // though it's extension is .txt
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
+ headers.add(HttpHeaders.USER_AGENT, "test-user-agent");
+
+ // fullfiling the request
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+ // though that we passed application/octet-stream mime type
+ // the user agent is within untrusted user agents set
+ // so we use MimeTypeResolver to define the mimeType and
+ // ignore Content-Type header
+ assertEquals(MediaType.TEXT_PLAIN, node.getProperty("jcr:mimeType").getString());
+ }
+
+ /**
+ * Testing if we use MimeTypeResolver to define jcr:mimeType property
+ * for untrusted user agents during resource modification.
+ */
+ public void testUntrustedUserAgentResourceModification() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+
+ // create data with 'trusted' user agent
+ // (all user agents are considered to be trusted
+ // if they are not listed as untrusted)
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN);
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ headers.clear();
+ content = TestUtils.getFileContent();
+ // define user agent to be among untrusted user agents
+ headers.add(HttpHeaders.USER_AGENT, "test-user-agent");
+ // define incorrect mime-type via seting Content-Type header
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+ // mime-type should still be correct
+ assertEquals(MediaType.TEXT_PLAIN, node.getProperty("jcr:mimeType").getString());
+ }
+
+ /**
+ * Testing if we can modify mime-type of previously defined resource
+ * via trusted user agent
+ */
+ public void testTrustedUserAgentResourceModification() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName() + ".html";
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", null, content.getBytes());
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path));
+ // mime-type is defined according to resource's extension
+ assertEquals(MediaType.TEXT_HTML, node.getNode("jcr:content").getProperty("jcr:mimeType").getString());
+
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_XML);
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+ // mime-type modified according to Content-Type header content
+ assertEquals(MediaType.TEXT_XML, node.getNode("jcr:content").getProperty("jcr:mimeType").getString());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml 2012-02-14 14:51:09 UTC (rev 5634)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml 2012-02-15 02:16:26 UTC (rev 5635)
@@ -209,6 +209,16 @@
<value>/absolute/path/to/file</value>
</value-param>
+ <!--
+ For testing untrusted-user-agents proper treatment.
+ Content-type headers of listed here user agents should be
+ ignored and MimeTypeResolver should be explicitly used instead
+ -->
+ <values-param>
+ <name>untrusted-user-agents</name>
+ <value>test-user-agent</value>
+ </values-param>
+
</init-params>
</component>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2012-02-14 14:51:09 UTC (rev 5634)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2012-02-15 02:16:26 UTC (rev 5635)
@@ -1,345 +1,471 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
-<chapter id="JCR.WebDAV">
-<?dbhtml filename="ch-webdav.html"?> <title>WebDAV</title>
- <section>
- <title>Related documents</title>
- <itemizedlist>
- <listitem>
- <para><link linkend="JCR.LinkProducerService">Link Producer</link></para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Introduction</title>
- <para>The WebDAV protocol enables you to use the third party tools to
- communicate with hierarchical content servers via HTTP. It is possible to
- add and remove documents or a set of documents from a path on the server.
- DeltaV is an extension of the WebDav protocol that allows managing
- document versioning. Locking guarantees protection against multiple access
- when writing resources. The ordering support allows changing the position
- of the resource in the list and sort the directory to make the directory tree viewed conveniently. The full-text search makes it easy to find the
- necessary documents. You can search by using two languages: SQL and
- XPATH.</para>
- <para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
- from the extension modules of the reference implementation - on the top of
- our JCR implementation so that it is possible to browse a workspace using
- the third party tools (it can be Windows folders or Mac ones as well as a
- Java WebDAV client, such as DAVExplorer or IE using File->Open as a Web
- Folder).</para>
- <para>Now WebDav is an extension of the REST service. To get the WebDav
- server ready, you must deploy the REST application. Then, you can access
- any workspaces of your repository by using the following URL:</para>
- <para>Standalone mode:</para>
- <para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
- <para>Portal mode:</para>
- <para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
- <para>When accessing the WebDAV server with the URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
- also use "collaboration" (instead of "production") which is the default
- workspace in eXo products. You will be asked to enter your login and
- password. Those will then be checked by using the organization service
- that can be implemented thanks to an InMemory (dummy) module or a DB module
- or an LDAP one and the JCR user session will be created with the correct JCR
- Credentials.</para>
- <note>
- <para>If you try the "in ECM"
- option, add "@ecm" to the user's password. Alternatively, you may modify
- jaas.conf by adding the <emphasis role="bold">domain=ecm</emphasis> option
- as follows:</para>
- <programlisting>exo-domain {
- org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
-};</programlisting>
- </note>
- </section>
- <section>
- <title>Configuration</title>
- <programlisting><component>
- <key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
- <type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
- <init-params>
-
- <!-- this parameter indicates the default login and password values
- used as credentials for accessing the repository -->
- <!-- value-param>
- <name>default-identity</name>
- <value>admin:admin</value>
- </value-param -->
-
- <!-- this is the value of WWW-Authenticate header -->
- <value-param>
- <name>auth-header</name>
- <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
- </value-param>
-
- <!-- default node type which is used for the creation of collections -->
- <value-param>
- <name>def-folder-node-type</name>
- <value>nt:folder</value>
- </value-param>
-
- <!-- default node type which is used for the creation of files -->
- <value-param>
- <name>def-file-node-type</name>
- <value>nt:file</value>
- </value-param>
-
- <!-- if MimeTypeResolver can't find the required mime type,
- which conforms with the file extension, and the mimeType header is absent
- in the HTTP request header, this parameter is used
- as the default mime type-->
- <value-param>
- <name>def-file-mimetype</name>
- <value>application/octet-stream</value>
- </value-param>
-
- <!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
- In case of "create-version", PUT command creates the new version of the resource if this resource exists.
- In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
- In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
-
- <value-param>
- <name>update-policy</name>
- <value>create-version</value>
- <!--value>replace</value -->
- <!-- value>add</value -->
- </value-param>
-
- <!--
- This parameter determines how service responds to a method that attempts to modify file content.
- In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
- In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
- -->
- <value-param>
- <name>auto-version</name>
- <value>checkout-checkin</value>
- <!--value>checkout</value -->
- </value-param>
-
- <!--
- This parameter is responsible for managing Cache-Control header value which will be returned to the client.
- You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
- -->
- <value-param>
- <name>cache-control</name>
- <value>text/xml,text/html:max-age=3600;image/png,image/jpg:max-age=1800;*/*:no-cache;</value>
- </value-param>
-
- <!--
- This parameter determines the absolute path to the folder icon file, which is shown
- during WebDAV view of the contents
- -->
- <value-param>
- <name>folder-icon-path</name>
- <value>/absolute/path/to/file</value>
- </value-param>
-
- </init-params
-</component></programlisting>
- </section>
- <section>
- <title>Screenshots</title>
- <para>At present, eXo JCR WebDav server is tested by using MS Internet
- Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav Explorer</ulink>, <ulink url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
- <section>
- <title>MS Internet Explorer</title>
- <para>(File -> Open as Web Folder)</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_explorer.jpg"/>
- </imageobject>
- </mediaobject>
- </section>
- <section>
- <title>Dav Explorer</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_davexplorer.jpg"/>
- </imageobject>
- </mediaobject>
- </section>
- <section>
- <title>Xythos Drive</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_xythosdrive.jpg"/>
- </imageobject>
- </mediaobject>
- </section>
- <section>
- <title>Microsoft Office 2003</title>
- <para>(as client) (File->Open with typing http://... href in the file
- name box)</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_msoffice2003.jpg"/>
- </imageobject>
- </mediaobject>
- </section>
- <section>
- <title>Ubuntu Linux</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg"/>
- </imageobject>
- </mediaobject>
- </section>
- </section>
- <section>
- <title>Comparison table of WebDav and JCR commands</title>
- <table>
- <title/>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>WebDav</entry>
- <entry>JCR</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>COPY</entry>
- <entry>Workspace.copy(...)</entry>
- </row>
- <row>
- <entry>DELETE</entry>
- <entry>Node.remove()</entry>
- </row>
- <row>
- <entry>GET</entry>
- <entry>Node.getProperty(...); Property.getValue()</entry>
- </row>
- <row>
- <entry>HEAD</entry>
- <entry>Node.getProperty(...); Property.getLength()</entry>
- </row>
- <row>
- <entry>MKCOL</entry>
- <entry>Node.addNode(...)</entry>
- </row>
- <row>
- <entry>MOVE</entry>
- <entry>Session.move(...) or Workspace.move(...)</entry>
- </row>
- <row>
- <entry>PROPFIND</entry>
- <entry>Session.getNode(...); Node.getNode(...); Node.getNodes(...); Node.getProperties()</entry>
- </row>
- <row>
- <entry>PROPPATCH</entry>
- <entry>Node.setProperty(...); Node.getProperty(...).remove()</entry>
- </row>
- <row>
- <entry>PUT</entry>
- <entry>Node.addNode("node","nt:file"); Node.setProperty("jcr:data", "data")</entry>
- </row>
- <row>
- <entry>CHECKIN</entry>
- <entry>Node.checkin()</entry>
- </row>
- <row>
- <entry>CHECKOUT</entry>
- <entry>Node.checkout()</entry>
- </row>
- <row>
- <entry>REPORT</entry>
- <entry>Node.getVersionHistory(); VersionHistory.getAllVersions(); Version.getProperties()</entry>
- </row>
- <row>
- <entry>RESTORE</entry>
- <entry>Node.restore(...)</entry>
- </row>
- <row>
- <entry>UNCHECKOUT</entry>
- <entry>Node.restore(...)</entry>
- </row>
- <row>
- <entry>VERSION-CONTROL</entry>
- <entry>Node.addMixin("mix:versionable")</entry>
- </row>
- <row>
- <entry>LOCK</entry>
- <entry>Node.lock(...)</entry>
- </row>
- <row>
- <entry>UNLOCK</entry>
- <entry>Node.unlock()</entry>
- </row>
- <row>
- <entry>ORDERPATCH</entry>
- <entry>Node.orderBefore(...)</entry>
- </row>
- <row>
- <entry>SEARCH</entry>
- <entry>Workspace.getQueryManager(); QueryManager.createQuery(); Query.execute()</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
- <section>
- <title>Restrictions</title>
- <para>There are some restrictions for WebDAV in different Operating
- systems.</para>
- <section>
- <title>Windows 7</title>
- <para>When you try to set up a web folder by “adding a network location”
- or “map a network drive” through My Computer, you can get an error
- message saying that either “The folder you entered does not appear to be valid.
- Please choose another” or “Windows cannot access… Check the spelling of
- the name. Otherwise, there might be…”. These errors may appear when you are
- using SSL or non-SSL.</para>
- <para>To fix this, do as follows:</para>
- <orderedlist>
- <listitem>
- <para>Go to Windows Registry Editor.</para>
- </listitem>
- <listitem>
- <para>Find a key:
- \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
- .</para>
- </listitem>
- <listitem>
- <para>Change the value to 2.</para>
- </listitem>
- </orderedlist>
- </section>
- <section>
- <title>Microsoft Office 2010</title>
- <para>If you have Microsoft Office 2010 applications or Microsoft Office 2007 applications installed on a client computer. From that client computer, you try to access an Office file that is stored on a web server that is configured for Basic authentication. The connection between your computer and the web server does not use Secure Sockets Layer (SSL). When you try to open or to download the file, you experience the following symptoms:
- <itemizedlist>
- <listitem>
- <para>The Office file does not open or download.</para>
- </listitem>
- <listitem>
- <para>You do not receive a Basic authentication password prompt when you try to open or to download the file.</para>
- </listitem>
- <listitem>
- <para>You do not receive an error message when you try to open the file. The associated Office application starts. However, the selected file does not open.</para>
- </listitem>
- </itemizedlist>
- </para>
- <para>To enable Basic authentication on the client computer, follow these steps:</para>
- <orderedlist>
- <listitem>
- <para>Click Start, type regedit in the Start Search box, and then press Enter.</para>
- </listitem>
- <listitem>
- <para>Locate and then click the following registry subkey: </para>
- <para>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet</para>
- </listitem>
- <listitem>
- <para>On the Edit menu, point to New, and then click DWORD Value.</para>
- </listitem>
- <listitem>
- <para>Type BasicAuthLevel, and then press Enter.</para>
- </listitem>
- <listitem>
- <para>Right-click BasicAuthLevel, and then click Modify.</para>
- </listitem>
- <listitem>
- <para>In the Value data box, type 2, and then click OK.</para>
- </listitem>
- </orderedlist>
- </section>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="JCR.WebDAV">
+ <?dbhtml filename="ch-webdav.html"?>
+
+ <title>WebDAV</title>
+
+ <section>
+ <title>Related documents</title>
+
+ <itemizedlist>
+ <listitem>
+ <para><link linkend="JCR.LinkProducerService">Link
+ Producer</link></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>The WebDAV protocol enables you to use the third party tools to
+ communicate with hierarchical content servers via HTTP. It is possible to
+ add and remove documents or a set of documents from a path on the server.
+ DeltaV is an extension of the WebDav protocol that allows managing
+ document versioning. Locking guarantees protection against multiple access
+ when writing resources. The ordering support allows changing the position
+ of the resource in the list and sort the directory to make the directory
+ tree viewed conveniently. The full-text search makes it easy to find the
+ necessary documents. You can search by using two languages: SQL and
+ XPATH.</para>
+
+ <para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
+ from the extension modules of the reference implementation - on the top of
+ our JCR implementation so that it is possible to browse a workspace using
+ the third party tools (it can be Windows folders or Mac ones as well as a
+ Java WebDAV client, such as DAVExplorer or IE using File->Open as a Web
+ Folder).</para>
+
+ <para>Now WebDav is an extension of the REST service. To get the WebDav
+ server ready, you must deploy the REST application. Then, you can access
+ any workspaces of your repository by using the following URL:</para>
+
+ <para>Standalone mode:</para>
+
+ <para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
+
+ <para>Portal mode:</para>
+
+ <para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
+
+ <para>When accessing the WebDAV server with the
+ URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you
+ might also use "collaboration" (instead of "production") which is the
+ default workspace in eXo products. You will be asked to enter your login
+ and password. Those will then be checked by using the organization service
+ that can be implemented thanks to an InMemory (dummy) module or a DB
+ module or an LDAP one and the JCR user session will be created with the
+ correct JCR Credentials.</para>
+
+ <note>
+ <para>If you try the "in ECM" option, add "@ecm" to the user's password.
+ Alternatively, you may modify jaas.conf by adding the <emphasis
+ role="bold">domain=ecm</emphasis> option as follows:</para>
+
+ <programlisting>exo-domain {
+ org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
+};</programlisting>
+ </note>
+ </section>
+
+ <section>
+ <title>Configuration</title>
+
+ <programlisting><component>
+ <key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
+ <type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
+ <init-params>
+
+ <!-- this parameter indicates the default login and password values
+ used as credentials for accessing the repository -->
+ <!-- value-param>
+ <name>default-identity</name>
+ <value>admin:admin</value>
+ </value-param -->
+
+ <!-- this is the value of WWW-Authenticate header -->
+ <value-param>
+ <name>auth-header</name>
+ <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
+ </value-param>
+
+ <!-- default node type which is used for the creation of collections -->
+ <value-param>
+ <name>def-folder-node-type</name>
+ <value>nt:folder</value>
+ </value-param>
+
+ <!-- default node type which is used for the creation of files -->
+ <value-param>
+ <name>def-file-node-type</name>
+ <value>nt:file</value>
+ </value-param>
+
+ <!-- if MimeTypeResolver can't find the required mime type,
+ which conforms with the file extension, and the mimeType header is absent
+ in the HTTP request header, this parameter is used
+ as the default mime type-->
+ <value-param>
+ <name>def-file-mimetype</name>
+ <value>application/octet-stream</value>
+ </value-param>
+
+ <!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
+ In case of "create-version", PUT command creates the new version of the resource if this resource exists.
+ In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
+ In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
+
+ <value-param>
+ <name>update-policy</name>
+ <value>create-version</value>
+ <!--value>replace</value -->
+ <!-- value>add</value -->
+ </value-param>
+
+ <!--
+ This parameter determines how service responds to a method that attempts to modify file content.
+ In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
+ In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
+ -->
+ <value-param>
+ <name>auto-version</name>
+ <value>checkout-checkin</value>
+ <!--value>checkout</value -->
+ </value-param>
+
+ <!--
+ This parameter is responsible for managing Cache-Control header value which will be returned to the client.
+ You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
+ -->
+ <value-param>
+ <name>cache-control</name>
+ <value>text/xml,text/html:max-age=3600;image/png,image/jpg:max-age=1800;*/*:no-cache;</value>
+ </value-param>
+
+ <!--
+ This parameter determines the absolute path to the folder icon file, which is shown
+ during WebDAV view of the contents
+ -->
+ <value-param>
+ <name>folder-icon-path</name>
+ <value>/absolute/path/to/file</value>
+ </value-param>
+
+ <!--
+ This parameter is responsible for untrusted user agents definition.
+ Content-type headers of listed here user agents should be
+ ignored and MimeTypeResolver should be explicitly used instead
+ -->
+ <values-param>
+ <name>untrusted-user-agents</name>
+ <value>Microsoft Office Core Storage Infrastructure/1.0</value>
+ </values-param>
+
+
+ </init-params>
+</component></programlisting>
+ </section>
+
+ <section>
+ <title>Screenshots</title>
+
+ <para>At present, eXo JCR WebDav server is tested by using MS Internet
+ Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav
+ Explorer</ulink>, <ulink
+ url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos
+ Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
+ <section>
+ <title>MS Internet Explorer</title>
+
+ <para>(File -> Open as Web Folder)</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_explorer.jpg" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section>
+ <title>Dav Explorer</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_davexplorer.jpg" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section>
+ <title>Xythos Drive</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_xythosdrive.jpg" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section>
+ <title>Microsoft Office 2003</title>
+
+ <para>(as client) (File->Open with typing http://... href in the file
+ name box)</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_msoffice2003.jpg" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section>
+ <title>Ubuntu Linux</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg" />
+ </imageobject>
+ </mediaobject>
+ </section>
+ </section>
+
+ <section>
+ <title>Comparison table of WebDav and JCR commands</title>
+
+ <table>
+ <title></title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>WebDav</entry>
+
+ <entry>JCR</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>COPY</entry>
+
+ <entry>Workspace.copy(...)</entry>
+ </row>
+
+ <row>
+ <entry>DELETE</entry>
+
+ <entry>Node.remove()</entry>
+ </row>
+
+ <row>
+ <entry>GET</entry>
+
+ <entry>Node.getProperty(...); Property.getValue()</entry>
+ </row>
+
+ <row>
+ <entry>HEAD</entry>
+
+ <entry>Node.getProperty(...); Property.getLength()</entry>
+ </row>
+
+ <row>
+ <entry>MKCOL</entry>
+
+ <entry>Node.addNode(...)</entry>
+ </row>
+
+ <row>
+ <entry>MOVE</entry>
+
+ <entry>Session.move(...) or Workspace.move(...)</entry>
+ </row>
+
+ <row>
+ <entry>PROPFIND</entry>
+
+ <entry>Session.getNode(...); Node.getNode(...);
+ Node.getNodes(...); Node.getProperties()</entry>
+ </row>
+
+ <row>
+ <entry>PROPPATCH</entry>
+
+ <entry>Node.setProperty(...);
+ Node.getProperty(...).remove()</entry>
+ </row>
+
+ <row>
+ <entry>PUT</entry>
+
+ <entry>Node.addNode("node","nt:file");
+ Node.setProperty("jcr:data", "data")</entry>
+ </row>
+
+ <row>
+ <entry>CHECKIN</entry>
+
+ <entry>Node.checkin()</entry>
+ </row>
+
+ <row>
+ <entry>CHECKOUT</entry>
+
+ <entry>Node.checkout()</entry>
+ </row>
+
+ <row>
+ <entry>REPORT</entry>
+
+ <entry>Node.getVersionHistory(); VersionHistory.getAllVersions();
+ Version.getProperties()</entry>
+ </row>
+
+ <row>
+ <entry>RESTORE</entry>
+
+ <entry>Node.restore(...)</entry>
+ </row>
+
+ <row>
+ <entry>UNCHECKOUT</entry>
+
+ <entry>Node.restore(...)</entry>
+ </row>
+
+ <row>
+ <entry>VERSION-CONTROL</entry>
+
+ <entry>Node.addMixin("mix:versionable")</entry>
+ </row>
+
+ <row>
+ <entry>LOCK</entry>
+
+ <entry>Node.lock(...)</entry>
+ </row>
+
+ <row>
+ <entry>UNLOCK</entry>
+
+ <entry>Node.unlock()</entry>
+ </row>
+
+ <row>
+ <entry>ORDERPATCH</entry>
+
+ <entry>Node.orderBefore(...)</entry>
+ </row>
+
+ <row>
+ <entry>SEARCH</entry>
+
+ <entry>Workspace.getQueryManager(); QueryManager.createQuery();
+ Query.execute()</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Restrictions</title>
+
+ <para>There are some restrictions for WebDAV in different Operating
+ systems.</para>
+
+ <section>
+ <title>Windows 7</title>
+
+ <para>When you try to set up a web folder by “adding a network location”
+ or “map a network drive” through My Computer, you can get an error
+ message saying that either “The folder you entered does not appear to be
+ valid. Please choose another” or “Windows cannot access… Check the
+ spelling of the name. Otherwise, there might be…”. These errors may
+ appear when you are using SSL or non-SSL.</para>
+
+ <para>To fix this, do as follows:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Go to Windows Registry Editor.</para>
+ </listitem>
+
+ <listitem>
+ <para>Find a key:
+ \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
+ .</para>
+ </listitem>
+
+ <listitem>
+ <para>Change the value to 2.</para>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section>
+ <title>Microsoft Office 2010</title>
+
+ <para>If you have Microsoft Office 2010 applications or Microsoft Office
+ 2007 applications installed on a client computer. From that client
+ computer, you try to access an Office file that is stored on a web
+ server that is configured for Basic authentication. The connection
+ between your computer and the web server does not use Secure Sockets
+ Layer (SSL). When you try to open or to download the file, you
+ experience the following symptoms: <itemizedlist>
+ <listitem>
+ <para>The Office file does not open or download.</para>
+ </listitem>
+
+ <listitem>
+ <para>You do not receive a Basic authentication password prompt
+ when you try to open or to download the file.</para>
+ </listitem>
+
+ <listitem>
+ <para>You do not receive an error message when you try to open the
+ file. The associated Office application starts. However, the
+ selected file does not open.</para>
+ </listitem>
+ </itemizedlist></para>
+
+ <para>To enable Basic authentication on the client computer, follow
+ these steps:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Click Start, type regedit in the Start Search box, and then
+ press Enter.</para>
+ </listitem>
+
+ <listitem>
+ <para>Locate and then click the following registry subkey:</para>
+
+ <para>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet</para>
+ </listitem>
+
+ <listitem>
+ <para>On the Edit menu, point to New, and then click DWORD
+ Value.</para>
+ </listitem>
+
+ <listitem>
+ <para>Type BasicAuthLevel, and then press Enter.</para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click BasicAuthLevel, and then click Modify.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the Value data box, type 2, and then click OK.</para>
+ </listitem>
+ </orderedlist>
+ </section>
+ </section>
+</chapter>
Added: jcr/branches/1.12.x/patch/1.12.12-GA/JCR-1704/readme.txt
===================================================================
--- jcr/branches/1.12.x/patch/1.12.12-GA/JCR-1704/readme.txt (rev 0)
+++ jcr/branches/1.12.x/patch/1.12.12-GA/JCR-1704/readme.txt 2012-02-15 02:16:26 UTC (rev 5635)
@@ -0,0 +1,82 @@
+Summary
+
+ * Status: Portlet crash and no preview available after save from Office 2010 in webdav
+ * CCP Issue: CCP-1182, Product Jira Issue: JCR-1704.
+ * Complexity: medium
+
+The Proposal
+Problem description
+
+What is the problem to fix?
+Portlet crash and no preview available after save from Office 2010 in webdav
+To reproduce this issue:
+
+ * Create a webdav drive, for example "http://localhost:8080/rest/private/jcr/repository/collaboration/"
+ * Copy any doc or DOCX created by MS Office 2010 to this drive
+ * Access to the document in the Site Explorer => The icon associated to the MIME type of DOCX is the icon of nt file
+ * Open the document in the webdav drive and make a modification (even one character) then save it.
+ * Access again to Site Explorer
+ => The MIME type and the icon of the document have changed to XML.
+ => The portlet crashes and it is difficult to get the interface back.
+
+Fix description
+
+How is the problem fixed?
+
+ * New WebDavService initial parameter added to contain a set of untrusted user agents.
+ Content-type headers sent by this user agents are now ignored, we use instead MimeTypeResolver to define resource's MIME type.
+
+Patch file: JCR-1704.patch
+
+Tests to perform
+
+Reproduction test
+1. Case 1: cf. above
+2. Case 2:
+* Create a webdav drive, for example "http://localhost:8080/rest/private/jcr/repository/collaboration/"
+* Create a new document by Office 2010 inside that web folder
+* Save the document directly in the webdav folder (no copy from local)
+ => The MIME type passes directly to xml before doing any modification in the document.
+
+Tests performed at DevLevel
+* Launch PLF to manually reproduce usecase.
+* Creat unit test with the usecase.
+
+Tests performed at QA/Support Level
+*
+
+Documentation changes
+
+Documentation changes:
+* Added description and example of a new initial parameter for WebDavService
+
+Configuration changes
+
+Configuration changes:
+
+ * Added new initial parameter for WebDavService
+
+Will previous configuration continue to work?
+
+ * Yes
+
+Risks and impacts
+
+Can this bug fix have any side effects on current client projects?
+
+ * No
+
+Is there a performance risk/cost?
+
+ * No
+
+Validation (PM/Support/QA)
+
+PM Comment
+* Validated
+
+Support Comment
+* Validated
+
+QA Feedbacks
+*
12 years, 4 months
exo-jcr SVN: r5634 - in ws/trunk: exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy and 1 other directory.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-14 09:51:09 -0500 (Tue, 14 Feb 2012)
New Revision: 5634
Modified:
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java
ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -49,7 +49,7 @@
class ContentEncodingModule implements HTTPClientModule
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.ContentEncodingModule");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.ContentEncodingModule");
// Methods
@@ -170,8 +170,8 @@
String encoding = ((HttpHeaderElement)pce.firstElement()).getName();
if (encoding.equalsIgnoreCase("gzip") || encoding.equalsIgnoreCase("x-gzip"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing gzip-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing gzip-input-stream");
resp.inp_stream = new GZIPInputStream(resp.inp_stream);
pce.removeElementAt(pce.size() - 1);
@@ -179,8 +179,8 @@
}
else if (encoding.equalsIgnoreCase("deflate"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing inflater-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing inflater-input-stream");
resp.inp_stream = new InflaterInputStream(resp.inp_stream);
pce.removeElementAt(pce.size() - 1);
@@ -188,8 +188,8 @@
}
else if (encoding.equalsIgnoreCase("compress") || encoding.equalsIgnoreCase("x-compress"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing uncompress-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing uncompress-input-stream");
resp.inp_stream = new UncompressInputStream(resp.inp_stream);
pce.removeElementAt(pce.size() - 1);
@@ -197,15 +197,15 @@
}
else if (encoding.equalsIgnoreCase("identity"))
{
- if (log.isDebugEnabled())
- log.debug("Ignoring 'identity' token");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Ignoring 'identity' token");
pce.removeElementAt(pce.size() - 1);
}
else
{
- if (log.isDebugEnabled())
- log.debug("Unknown content encoding '" + encoding + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Unknown content encoding '" + encoding + "'");
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -50,7 +50,7 @@
class ContentMD5Module implements HTTPClientModule
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.ContentMD5Module");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.ContentMD5Module");
// Constructors
@@ -107,12 +107,12 @@
if ((md5_digest == null && !md5_tok) || resp.getHeader("Transfer-Encoding") != null)
return;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
if (md5_digest != null)
- log.debug("Received digest: " + md5_digest + " - pushing md5-check-stream");
+ LOG.debug("Received digest: " + md5_digest + " - pushing md5-check-stream");
else
- log.debug("Expecting digest in trailer " + " - pushing md5-check-stream");
+ LOG.debug("Expecting digest in trailer " + " - pushing md5-check-stream");
}
resp.inp_stream = new MD5InputStream(resp.inp_stream, new VerifyMD5(resp));
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -70,7 +70,7 @@
/** Make this compatible with V0.3-2 */
private static final long serialVersionUID = 8599975325569296615L;
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.Cookie");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.Cookie");
protected String name;
@@ -304,8 +304,8 @@
cookie_arr = Util.resizeArray(cookie_arr, cookie_arr.length + 1);
cookie_arr[cookie_arr.length - 1] = curr;
}
- else if (log.isDebugEnabled())
- log.debug("Ignoring cookie: " + curr);
+ else if (LOG.isDebugEnabled())
+ LOG.debug("Ignoring cookie: " + curr);
}
return cookie_arr;
@@ -339,7 +339,7 @@
* throw new ProtocolException("Bad Set-Cookie header: " + set_cookie +
* "\nInvalid date found at " + "position " + beg);
*/
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Invalid date '" + value + "'");
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Invalid date '" + value + "'");
}
}
else if (name.equals("max-age")) // from rfc-2109
@@ -365,7 +365,7 @@
// you get everything these days...
if (value.length() == 0)
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Domain is empty - ignoring domain");
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Domain is empty - ignoring domain");
return true;
}
@@ -379,7 +379,7 @@
// must be the same domain as in the url
if (!cookie.domain.endsWith(value))
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Current domain " + cookie.domain
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Current domain " + cookie.domain
+ " does not match given parsed " + value);
return false;
}
@@ -398,7 +398,7 @@
// two dots
if (!value.equals(".local") && value.indexOf('.', 1) == -1)
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ "isn't .local and doesn't have at " + "least 2 dots");
return false;
}
@@ -416,7 +416,7 @@
int dl = cookie.domain.length(), vl = value.length();
if (dl > vl && cookie.domain.substring(0, dl - vl).indexOf('.') != -1)
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ "is more than one level below " + "current domain " + cookie.domain);
return false;
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -54,7 +54,7 @@
/** Make this compatible with V0.3-2 */
private static final long serialVersionUID = 2208203902820875917L;
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.Cookie2");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.Cookie2");
protected int version;
@@ -341,7 +341,7 @@
// path attribute must be a prefix of the request-URI
if (!Util.getPath(req.getRequestURI()).startsWith(curr.path))
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", path '" + curr.path + "' is not a prefix of the "
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", path '" + curr.path + "' is not a prefix of the "
+ "request uri '" + req.getRequestURI() + "'");
continue;
}
@@ -356,7 +356,7 @@
// domain must be either .local or must contain at least two dots
if (!curr.domain.equals(".local") && curr.domain.indexOf('.', 1) == -1)
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is not '.local' and "
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is not '.local' and "
+ "doesn't contain two '.'s");
continue;
}
@@ -364,7 +364,7 @@
// domain must domain match host
if (!eff_host.endsWith(curr.domain))
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' does not match current"
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' does not match current"
+ "host '" + eff_host + "'");
continue;
}
@@ -372,7 +372,7 @@
// host minus domain may not contain any dots
if (eff_host.substring(0, eff_host.length() - curr.domain.length()).indexOf('.') != -1)
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is more than one '.'"
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is more than one '.'"
+ "away from host '" + eff_host + "'");
continue;
}
@@ -386,7 +386,7 @@
break;
if (idx2 == curr.port_list.length)
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", port list " + "does include current port "
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", port list " + "does include current port "
+ req.getConnection().getPort());
continue;
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -125,7 +125,7 @@
/** just ignore all the data if told to do so */
private boolean ignore = false;
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.HttpOutputStream");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.HttpOutputStream");
// Constructors
@@ -172,11 +172,11 @@
if (os == null)
bos = new ByteArrayOutputStream();
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Stream ready for writing");
+ LOG.debug("Stream ready for writing");
if (bos != null)
- log.debug("Buffering all data before sending request");
+ LOG.debug("Buffering all data before sending request");
}
}
@@ -375,8 +375,8 @@
req.setHeaders(hdrs);
}
- if (log.isDebugEnabled())
- log.debug("Sending request");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Sending request");
try
{
@@ -405,11 +405,11 @@
if (length == -1)
{
- if (log.isDebugEnabled() && trailers.length > 0)
+ if (LOG.isDebugEnabled() && trailers.length > 0)
{
- log.debug("Sending trailers:");
+ LOG.debug("Sending trailers:");
for (int idx = 0; idx < trailers.length; idx++)
- log.debug("\t" + trailers[idx].getName() + ": " + trailers[idx].getValue());
+ LOG.debug("\t" + trailers[idx].getName() + ": " + trailers[idx].getValue());
}
os.write(Codecs.chunkedEncode(null, 0, 0, trailers, true));
@@ -417,8 +417,8 @@
os.flush();
- if (log.isDebugEnabled())
- log.debug("All data sent");
+ if (LOG.isDebugEnabled())
+ LOG.debug("All data sent");
}
catch (IOException ioe)
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -54,7 +54,7 @@
class RetryModule implements HTTPClientModule, GlobalConstants
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.RetryModule");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.RetryModule");
// Constructors
@@ -85,7 +85,7 @@
}
catch (RetryException re)
{
- log.error("Caught RetryException");
+ LOG.error("Caught RetryException");
boolean got_lock = false;
@@ -102,7 +102,7 @@
for (RetryException e = re.first; e != null; e = e.next)
{
- log.error("Handling exception ", e);
+ LOG.error("Handling exception ", e);
Request req = e.request;
HTTPConnection con = req.getConnection();
@@ -181,7 +181,7 @@
// now resend the request
- log.info("Retrying request '" + req.getMethod() + " " + req.getRequestURI() + "'");
+ LOG.info("Retrying request '" + req.getMethod() + " " + req.getRequestURI() + "'");
if (e.conn_reset)
req.num_retries++;
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -49,7 +49,7 @@
class TransferEncodingModule implements HTTPClientModule
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.TransferEncodingModule");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.TransferEncodingModule");
// Methods
@@ -165,41 +165,41 @@
String encoding = ((HttpHeaderElement)pte.lastElement()).getName();
if (encoding.equalsIgnoreCase("gzip"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing gzip-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing gzip-input-stream");
resp.inp_stream = new GZIPInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("deflate"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing inflater-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing inflater-input-stream");
resp.inp_stream = new InflaterInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("compress"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing uncompress-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing uncompress-input-stream");
resp.inp_stream = new UncompressInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("chunked"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing chunked-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing chunked-input-stream");
resp.inp_stream = new ChunkedInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("identity"))
{
- if (log.isDebugEnabled())
- log.debug("Ignoring 'identity' token");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Ignoring 'identity' token");
}
else
{
- if (log.isDebugEnabled())
- log.debug("Unknown transfer encoding '" + encoding + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Unknown transfer encoding '" + encoding + "'");
break;
}
Modified: ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java
===================================================================
--- ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java 2012-02-14 14:49:09 UTC (rev 5633)
+++ ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java 2012-02-14 14:51:09 UTC (rev 5634)
@@ -64,7 +64,7 @@
*/
public class GroovyJaxrsPublisher
{
- private static final Log log = ExoLogger.getExoLogger(GroovyJaxrsPublisher.class);
+ private static final Log LOG = ExoLogger.getExoLogger(GroovyJaxrsPublisher.class);
@SuppressWarnings("rawtypes")
private static final Comparator<Constructor> constructorComparator = new Comparator<Constructor>() {
@@ -134,7 +134,7 @@
@Deprecated
public void setGroovyClassLoader(GroovyClassLoader gcl)
{
- log.warn("Method setGroovyClassLoader is deprecated.");
+ LOG.warn("Method setGroovyClassLoader is deprecated.");
}
/**
12 years, 4 months
exo-jcr SVN: r5633 - in kernel/trunk: exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl and 20 other directories.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-14 09:49:09 -0500 (Tue, 14 Feb 2012)
New Revision: 5633
Modified:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java
kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java
kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java
kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -36,7 +36,7 @@
public class MimeTypeResolver
{
- protected static Log log = ExoLogger.getLogger("org.exoplatform.commons.utils.MimeTypeResolver");
+ protected static final Log LOG = ExoLogger.getLogger("org.exoplatform.commons.utils.MimeTypeResolver");
static {
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -35,7 +35,7 @@
{
/** . */
- private final ConcurrentMap<String, Log> loggers = new ConcurrentHashMap<String, Log>();
+ private static final ConcurrentMap<String, Log> LOGGERS = new ConcurrentHashMap<String, Log>();
/**
* Obtain a specified logger.
@@ -54,11 +54,11 @@
{
throw new IllegalArgumentException("The logger name cannot be null");
}
- Log exoLogger = loggers.get(name);
+ Log exoLogger = LOGGERS.get(name);
if (exoLogger == null)
{
exoLogger = getLogger(name);
- Log phantom = loggers.putIfAbsent(name, exoLogger);
+ Log phantom = LOGGERS.putIfAbsent(name, exoLogger);
if (phantom != null)
{
exoLogger = phantom;
Modified: kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java
===================================================================
--- kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -47,7 +47,7 @@
private final ConcurrentMap<K, FutureTask<V>> futureEntries;
/** . */
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.cache.FutureCache");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.cache.FutureCache");
public FutureCache(Loader<K, V, C> loader)
@@ -126,11 +126,11 @@
}
catch (ExecutionException e)
{
- log.error("Computing of resource " + key + " threw an exception", e.getCause());
+ LOG.error("Computing of resource " + key + " threw an exception", e.getCause());
}
catch (Exception e)
{
- log.error("Retrieval of resource " + key + " threw an exception", e);
+ LOG.error("Retrieval of resource " + key + " threw an exception", e);
}
finally
{
Modified: kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java
===================================================================
--- kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -34,46 +34,46 @@
public class LoggingCacheListener implements CacheListener
{
- Log log = ExoLogger.getLogger("exo.kernel.component.cache.LoggingCacheListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.cache.LoggingCacheListener");
public void onClearCache(CacheListenerContext context) throws Exception
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Cleared region " + context.getCacheInfo().getName());
+ LOG.debug("Cleared region " + context.getCacheInfo().getName());
}
}
public void onExpire(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Expired entry " + key + " on region " + context.getCacheInfo().getName());
+ LOG.trace("Expired entry " + key + " on region " + context.getCacheInfo().getName());
}
}
public void onGet(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Get entry " + key + " on region " + context.getCacheInfo().getName());
+ LOG.trace("Get entry " + key + " on region " + context.getCacheInfo().getName());
}
}
public void onPut(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Put entry " + key + " region " + context.getCacheInfo().getName());
+ LOG.trace("Put entry " + key + " region " + context.getCacheInfo().getName());
}
- if (log.isWarnEnabled())
+ if (LOG.isWarnEnabled())
{
int maxSize = context.getCacheInfo().getMaxSize();
int size = context.getCacheInfo().getSize();
double treshold = maxSize * 0.95;
if (size >= treshold)
{
- log.warn("region " + context.getCacheInfo().getName() + " is 95% full, consider extending maxSize");
+ LOG.warn("region " + context.getCacheInfo().getName() + " is 95% full, consider extending maxSize");
}
}
@@ -81,9 +81,9 @@
public void onRemove(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Removed entry " + key + " region " + context.getCacheInfo().getName());
+ LOG.trace("Removed entry " + key + " region " + context.getCacheInfo().getName());
}
}
}
Modified: kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -46,7 +46,7 @@
// protected Catalog defaultCatalog;
- private static Log log = ExoLogger.getLogger("exo.kernel.component.cache.CommonsXMLConfigurationPlugin");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.cache.CommonsXMLConfigurationPlugin");
public CommonsXMLConfigurationPlugin(InitParams params, ConfigurationManager configurationManager) throws Exception
{
@@ -70,7 +70,7 @@
res = configurationManager.getResource(path);
if (res == null)
throw new Exception("Resource not found " + path);
- log.info("Catalog configuration found at " + res);
+ LOG.info("Catalog configuration found at " + res);
final URL fRes = res;
SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -46,7 +46,7 @@
*/
private final Map<String, List<Listener>> listeners_;
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.common.ListenerService");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.ListenerService");
/**
* Construct a listener service.
@@ -151,9 +151,9 @@
return;
for (Listener<S, D> listener : list)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("broadcasting event " + name + " on " + listener.getName());
+ LOG.debug("broadcasting event " + name + " on " + listener.getName());
}
try
@@ -163,8 +163,8 @@
catch (Exception e)
{
// log exception and keep broadcast events
- log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
- log.info("Exception occures but keep broadcast events.");
+ LOG.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ LOG.info("Exception occures but keep broadcast events.");
}
}
}
@@ -197,8 +197,8 @@
catch (Exception e)
{
// log exception and keep broadcast events
- log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
- log.info("Exception occures but keep broadcast events.");
+ LOG.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ LOG.info("Exception occures but keep broadcast events.");
}
}
}
@@ -275,7 +275,7 @@
{
// Do not throw exception. Event is asynchronous so just report error.
// Must say that exception will be ignored even in synchronous events.
- log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ LOG.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
}
}
}
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -69,7 +69,7 @@
public static final String DEFAULT_BINDING_STORE_PATH = PrivilegedSystemHelper.getProperty("java.io.tmpdir")
+ File.separator + "bind-references.xml";
- private static Log LOG = ExoLogger.getLogger("exo.kernel.component.common.InitialContextInitializer");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.InitialContextInitializer");
private List<BindReferencePlugin> bindReferencesPlugins;
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -62,7 +62,7 @@
public class JobSchedulerServiceImpl implements JobSchedulerService, Startable
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.common.JobSchedulerServiceImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.JobSchedulerServiceImpl");
static final String STANDALONE_CONTAINER_NAME = "$Standalone";
private final Scheduler scheduler_;
@@ -409,7 +409,7 @@
}
catch (SchedulerException e)
{
- log.error("Could not suspend the scheduler", e);
+ LOG.error("Could not suspend the scheduler", e);
}
return false;
}
@@ -425,7 +425,7 @@
}
catch (SchedulerException e)
{
- log.error("Could not resume the scheduler", e);
+ LOG.error("Could not resume the scheduler", e);
}
return false;
}
@@ -441,7 +441,7 @@
}
catch (Exception e)
{
- log.warn("Could not remove the GlobalJobListener " + JobEnvironmentConfigListener.NAME, e);
+ LOG.warn("Could not remove the GlobalJobListener " + JobEnvironmentConfigListener.NAME, e);
}
}
@@ -463,7 +463,7 @@
}
catch (Exception ex)
{
- log.warn("Could not interrupt all the current jobs properly", ex);
+ LOG.warn("Could not interrupt all the current jobs properly", ex);
}
}
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -41,7 +41,7 @@
*/
public class QuartzSheduler implements Startable
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.common.QuartzSheduler");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.QuartzSheduler");
private final Scheduler scheduler_;
@@ -108,7 +108,7 @@
}
catch (SchedulerException ex)
{
- log.warn("Could not shutdown the scheduler", ex);
+ LOG.warn("Could not shutdown the scheduler", ex);
}
}
}
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -46,7 +46,7 @@
public class TransactionServiceJotmImpl extends AbstractTransactionService
{
- protected static Log log = ExoLogger.getLogger("exo.kernel.component.common.TransactionServiceJotmImpl");
+ protected static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.TransactionServiceJotmImpl");
private final int defaultTimeout;
@@ -112,7 +112,7 @@
}
else
{
- log.info("Use externally initialized JOTM: " + current);
+ LOG.info("Use externally initialized JOTM: " + current);
}
return current;
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -121,7 +121,7 @@
return Collections.unmodifiableSet(profiles);
}
- static Log log = ExoLogger.getLogger("exo.kernel.container.ExoContainer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ExoContainer");
private Map<String, ComponentLifecyclePlugin> componentLifecylePlugin_ =
new HashMap<String, ComponentLifecyclePlugin>();
@@ -217,7 +217,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -300,7 +300,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -323,7 +323,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -346,7 +346,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -378,8 +378,8 @@
public <T> T createComponent(Class<T> clazz, InitParams params) throws Exception
{
- if (log.isDebugEnabled())
- log.debug(clazz.getName() + " " + ((params != null) ? params : "") + " added to " + getContext().getName());
+ if (LOG.isDebugEnabled())
+ LOG.debug(clazz.getName() + " " + ((params != null) ? params : "") + " added to " + getContext().getName());
Constructor<?>[] constructors = new Constructor<?>[0];
try
{
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -45,7 +45,7 @@
private String name;
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.ExoContainerContext");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ExoContainerContext");
public ExoContainerContext(ExoContainer container)
{
@@ -143,7 +143,7 @@
if (topContainer != null && cont != null)
throw new IllegalStateException("Two top level containers created, but must be only one.");
- log.info("Set the top container in its context");
+ LOG.info("Set the top container in its context");
topContainer = cont;
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -317,13 +317,13 @@
Configuration conf = getConfiguration();
if (conf == null)
{
- log.warn("The configuration of the PortalContainer could not be found");
+ LOG.warn("The configuration of the PortalContainer could not be found");
return null;
}
Configuration result = Configuration.merge(((ExoContainer)parent).getConfiguration(), conf);
if (result == null)
{
- log.warn("The configurations could not be merged");
+ LOG.warn("The configurations could not be merged");
return null;
}
return result.toXML();
@@ -494,7 +494,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.warn("The Servlet Context '" + context.getServletContextName() + "' has not been registered"
+ LOG.warn("The Servlet Context '" + context.getServletContextName() + "' has not been registered"
+ " has a dependency of any PortalContainerDefinitions.");
}
return null;
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -60,7 +60,7 @@
{
/** The logger. */
- private final Log log = ExoLogger.getExoLogger(PropertyConfigurator.class);
+ private static final Log LOG = ExoLogger.getExoLogger(PropertyConfigurator.class);
public PropertyConfigurator(ConfigurationManager confManager)
{
@@ -75,20 +75,20 @@
PropertiesParam propertiesParam = params.getPropertiesParam("properties");
if (propertiesParam != null)
{
- log.debug("Going to initialize properties from init param");
+ LOG.debug("Going to initialize properties from init param");
for (Iterator<Property> i = propertiesParam.getPropertyIterator();i.hasNext();)
{
Property property = i.next();
String name = property.getName();
String value = property.getValue();
- log.debug("Adding property from init param " + name + " = " + value);
+ LOG.debug("Adding property from init param " + name + " = " + value);
PropertyManager.setProperty(name, value);
}
}
ValueParam pathParam = params.getValueParam("properties.url");
if (pathParam != null)
{
- log.debug("Using file path " + path + " found from configuration");
+ LOG.debug("Using file path " + path + " found from configuration");
path = pathParam.getValue();
}
}
@@ -97,14 +97,14 @@
String systemPath = PropertyManager.getProperty(PropertyManager.PROPERTIES_URL);
if (systemPath != null)
{
- log.debug("Using file path " + path + " found from system properties");
+ LOG.debug("Using file path " + path + " found from system properties");
path = systemPath;
}
//
if (path != null)
{
- log.debug("Found property file path " + path);
+ LOG.debug("Found property file path " + path);
try
{
URL url = confManager.getURL(path);
@@ -121,7 +121,7 @@
}
catch (Exception e)
{
- log.error("Cannot load property file " + path, e);
+ LOG.error("Cannot load property file " + path, e);
}
}
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -112,7 +112,7 @@
profiles.addAll(ExoContainer.getProfiles());
// Lof the active profiles
- log.info("Active profiles " + profiles);
+ LOG.info("Active profiles " + profiles);
//
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
@@ -240,7 +240,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("We assume that the ServletContext '" + context.getServletContextName()
+ LOG.info("We assume that the ServletContext '" + context.getServletContextName()
+ "' is not a portal since no portal container definition with the same name has been"
+ " registered to the component PortalContainerConfig. The related portal container"
+ " will be declared as disabled.");
@@ -301,7 +301,7 @@
if (config.isPortalContainerName(portalContainerName))
{
// Unregister name of portal container that doesn't exist
- log.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
+ LOG.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
+ " it has not yet been registered, please check your PortalContainerDefinitions and "
+ "the loading order.");
config.unregisterPortalContainerName(portalContainerName);
@@ -323,7 +323,7 @@
final String portalContainerName = context.getServletContextName();
try
{
- log.info("Trying to create the portal container '" + portalContainerName + "'");
+ LOG.info("Trying to create the portal container '" + portalContainerName + "'");
PortalContainer pcontainer = new PortalContainer(this, context);
PortalContainer.setInstance(pcontainer);
executeInitTasks(pcontainer, PortalContainerPreInitTask.TYPE);
@@ -339,7 +339,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration conf/portal/configuration.xml. ServletContext: " + context, ex);
+ LOG.error("Cannot add configuration conf/portal/configuration.xml. ServletContext: " + context, ex);
}
// Add configuration that depends on the environment
@@ -359,7 +359,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration " + uri + ". ServletContext: " + context, ex);
+ LOG.error("Cannot add configuration " + uri + ". ServletContext: " + context, ex);
}
// add configs from web apps
@@ -373,7 +373,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration war:/conf/configuration.xml. ServletContext: " + ctx, ex);
+ LOG.error("Cannot add configuration war:/conf/configuration.xml. ServletContext: " + ctx, ex);
}
}
@@ -390,7 +390,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration " + overrideConfig + ". ServletContext: " + context, ex);
+ LOG.error("Cannot add configuration " + overrideConfig + ". ServletContext: " + context, ex);
}
cService.processRemoveConfiguration();
@@ -404,11 +404,11 @@
//
executeInitTasks(pcontainer, PortalContainerPostInitTask.TYPE);
executeInitTasks(pcontainer, PortalContainerPostCreateTask.TYPE);
- log.info("The portal container '" + portalContainerName + "' has been created successfully");
+ LOG.info("The portal container '" + portalContainerName + "' has been created successfully");
}
catch (Exception ex)
{
- log.error("Cannot create the portal container '" + portalContainerName + "' . ServletContext: " + context, ex);
+ LOG.error("Cannot create the portal container '" + portalContainerName + "' . ServletContext: " + context, ex);
}
finally
{
@@ -423,7 +423,7 @@
}
catch (Exception e)
{
- log.warn("An error occured while cleaning the ThreadLocal", e);
+ LOG.warn("An error occured while cleaning the ThreadLocal", e);
}
}
}
@@ -480,7 +480,7 @@
}
catch (Exception e)
{
- log.error("Could not build root container", e);
+ LOG.error("Could not build root container", e);
// The logger is not necessary configured so we have to use the standard
// output stream
LOG.error(e.getLocalizedMessage(), e);
@@ -513,13 +513,13 @@
booting = true;
try
{
- log.info("Building root container");
+ LOG.info("Building root container");
long time = -System.currentTimeMillis();
result = buildRootContainer();
if (result != null)
{
time += System.currentTimeMillis();
- log.info("Root container is built (build time " + time + "ms)");
+ LOG.info("Root container is built (build time " + time + "ms)");
singleton_ = result;
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
{
@@ -529,11 +529,11 @@
return null;
}
});
- log.info("Root container booted");
+ LOG.info("Root container booted");
}
else
{
- log.error("Failed to boot root container");
+ LOG.error("Failed to boot root container");
}
}
finally
@@ -563,7 +563,7 @@
Configuration config = getConfiguration();
if (config == null)
{
- log.warn("The configuration of the RootContainer could not be found");
+ LOG.warn("The configuration of the RootContainer could not be found");
return null;
}
return config.toXML();
@@ -599,8 +599,8 @@
final PortalContainer container = getPortalContainer(portalContainer);
if (!task.alreadyExists(container))
{
- if (log.isDebugEnabled())
- log.debug("The portal container '" + portalContainer
+ if (LOG.isDebugEnabled())
+ LOG.debug("The portal container '" + portalContainer
+ "' has not yet been initialized, thus the task can be added");
ConcurrentMap<String, Queue<PortalContainerInitTaskContext>> queues = initTasks.get(portalContainer);
if (queues == null)
@@ -639,8 +639,8 @@
}
else
{
- if (log.isDebugEnabled())
- log.debug("The portal container '" + portalContainer
+ if (LOG.isDebugEnabled())
+ LOG.debug("The portal container '" + portalContainer
+ "' has already been initialized, thus we call onAlreadyExists");
PortalContainer oldPortalContainer = PortalContainer.getInstanceIfPresent();
try
@@ -673,8 +673,8 @@
{
return;
}
- if (log.isDebugEnabled())
- log.debug("Start launching the " + type + " tasks of the portal container '" + portalContainer + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Start launching the " + type + " tasks of the portal container '" + portalContainer + "'");
// Keep the old ClassLoader
final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
PortalContainerInitTaskContext context;
@@ -702,8 +702,8 @@
{
initTasks.remove(portalContainerName);
}
- if (log.isDebugEnabled())
- log.debug("End launching the " + type + " tasks of the portal container '" + portalContainer + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("End launching the " + type + " tasks of the portal container '" + portalContainer + "'");
}
static class ShutdownThread extends Thread
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -320,7 +320,7 @@
Configuration config = getConfiguration();
if (config == null)
{
- log.warn("The configuration of the StandaloneContainer could not be found");
+ LOG.warn("The configuration of the StandaloneContainer could not be found");
return null;
}
return config.toXML();
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -51,7 +51,7 @@
{
final static public String WAR_CONF_LOCATION = "/WEB-INF";
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.ConfigurationManagerImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ConfigurationManagerImpl");
protected Configuration configurations_;
@@ -137,7 +137,7 @@
private void addConfiguration(ServletContext context, URL url) throws Exception
{
if (LOG_DEBUG)
- log.info("Add configuration " + url);
+ LOG.info("Add configuration " + url);
if (url == null)
return;
try
@@ -174,7 +174,7 @@
}
catch (Exception ex)
{
- log.error("Cannot process the configuration " + currentURL.get(), ex);
+ LOG.error("Cannot process the configuration " + currentURL.get(), ex);
}
finally
{
@@ -219,7 +219,7 @@
if (urlObject != null)
{
if (LOG_DEBUG)
- log.info(prefix + "import " + urlObject);
+ LOG.info(prefix + "import " + urlObject);
// Set the URL of imported file
currentURL.set(urlObject);
conf = unmarshaller.unmarshall(urlObject);
@@ -228,7 +228,7 @@
}
else
{
- log.warn("Couldn't process the URL for " + uri + " configuration file ignored ");
+ LOG.warn("Couldn't process the URL for " + uri + " configuration file ignored ");
}
}
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -41,7 +41,7 @@
{
/** . */
- private static final Log log = ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
+ private static final Log LOG = ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
/** . */
private static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
@@ -78,14 +78,14 @@
if (Namespaces.isKernelNamespace(uri) || XSI_URI.equals(uri))
{
blackListedPrefixes.add(prefix);
- if (log.isTraceEnabled())
- log.trace("Black listing prefix " + prefix + " with uri " + uri);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Black listing prefix " + prefix + " with uri " + uri);
}
else
{
contentHandler.startPrefixMapping(prefix, uri);
- if (log.isTraceEnabled())
- log.trace("Start prefix mapping " + prefix + " with uri " + uri);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Start prefix mapping " + prefix + " with uri " + uri);
}
}
@@ -93,14 +93,14 @@
{
if (!blackListedPrefixes.remove(prefix))
{
- if (log.isTraceEnabled())
- log.trace("Ending prefix mapping " + prefix);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Ending prefix mapping " + prefix);
contentHandler.endPrefixMapping(prefix);
}
else
{
- if (log.isTraceEnabled())
- log.trace("Removed prefix mapping " + prefix + " from black list ");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Removed prefix mapping " + prefix + " from black list ");
}
}
@@ -113,14 +113,14 @@
if ((attQName.equals("xmlns")) && blackListedPrefixes.contains(""))
{
// Skip
- if (log.isTraceEnabled())
- log.trace("Skipping black listed xmlns attribute");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Skipping black listed xmlns attribute");
}
else if (attQName.startsWith("xmlns:") && blackListedPrefixes.contains(attQName.substring(6)))
{
// Skip
- if (log.isTraceEnabled())
- log.trace("Skipping black listed " + attQName + " attribute");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Skipping black listed " + attQName + " attribute");
}
else
{
@@ -133,14 +133,14 @@
if (XSI_URI.equals(attURI))
{
// Skip
- if (log.isTraceEnabled())
- log.trace("Skipping XSI " + attQName + " attribute");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Skipping XSI " + attQName + " attribute");
continue;
}
else if (Namespaces.isKernelNamespace(attURI))
{
- if (log.isTraceEnabled())
- log.trace("Requalifying prefixed attribute " + attQName + " attribute to " + localName);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Requalifying prefixed attribute " + attQName + " attribute to " + localName);
attURI = null;
attQName = localName;
}
@@ -153,8 +153,8 @@
//
if (Namespaces.isKernelNamespace(uri))
{
- if (log.isTraceEnabled())
- log.trace("Requalifying active profile " + qName + " start element to " + localName);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Requalifying active profile " + qName + " start element to " + localName);
qName = localName;
uri = null;
}
@@ -167,15 +167,15 @@
{
if (Namespaces.isKernelNamespace(uri))
{
- if (log.isTraceEnabled())
- log.trace("Requalifying " + qName + " end element");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Requalifying " + qName + " end element");
qName = localName;
uri = null;
}
//
- if (log.isTraceEnabled())
- log.trace("Propagatting " + qName + " end element");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Propagatting " + qName + " end element");
contentHandler.endElement(uri, localName, qName);
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -64,7 +64,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.PortalContainerConfig");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.PortalContainerConfig");
/**
* The name of the setting corresponding to the portal container name
@@ -237,7 +237,7 @@
else
{
// The nested object is not of the right type, thus it will be ignored
- log.warn("The object parameter 'default.portal.definition' should be of type "
+ LOG.warn("The object parameter 'default.portal.definition' should be of type "
+ PortalContainerDefinition.class);
}
}
@@ -384,7 +384,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal container '" + name + "' will be disabled");
+ LOG.info("The portal container '" + name + "' will be disabled");
}
final Set<String> lPortalContainerNames = new HashSet<String>(portalContainerNamesDisabled.size() + 1);
lPortalContainerNames.add(name);
@@ -561,14 +561,14 @@
// the webapp is ignored since it has not been registered in any portal container dependency list
if (PropertyManager.isDevelopping())
{
- log.warn("The context '" + contextName + "' has not been added as " +
+ LOG.warn("The context '" + contextName + "' has not been added as " +
"dependency of any portal containers");
}
return null;
}
if (PropertyManager.isDevelopping())
{
- log.debug("The context '" + contextName + "' has not been added as " +
+ LOG.debug("The context '" + contextName + "' has not been added as " +
"dependency of any portal containers");
}
// by default we will return the default portal container
@@ -702,7 +702,7 @@
String name = def.getName();
if (name == null || (name = name.trim()).length() == 0)
{
- log.warn("A PortalContainerDefinition cannot have an empty name");
+ LOG.warn("A PortalContainerDefinition cannot have an empty name");
continue;
}
else
@@ -997,14 +997,14 @@
url = file.toURI().toURL();
if (ConfigurationManager.LOG_DEBUG)
{
- log.info("The external settings could be found in the directory ${exo-conf}/portal, "
+ LOG.info("The external settings could be found in the directory ${exo-conf}/portal, "
+ "it will be used as external settings of the "
+ (isPath4DefaultPCD ? "default portal container" : "portal container '" + def.getName() + "'"));
}
}
else if (ConfigurationManager.LOG_DEBUG)
{
- log.info("No external settings could be found in the directory ${exo-conf}/portal for the "
+ LOG.info("No external settings could be found in the directory ${exo-conf}/portal for the "
+ (isPath4DefaultPCD ? "default portal container" : "portal container '" + def.getName() + "'"));
}
}
@@ -1014,7 +1014,7 @@
url = cm.getURL(path);
if (ConfigurationManager.LOG_DEBUG)
{
- log.info("Trying to retrieve the external settings from the url '" + url
+ LOG.info("Trying to retrieve the external settings from the url '" + url
+ "', it will be used as external settings of the "
+ (isPath4DefaultPCD ? "default portal container" : "portal container '" + def.getName() + "'"));
}
@@ -1024,7 +1024,7 @@
}
catch (Exception e)
{
- log.error("Cannot load property file " + path, e);
+ LOG.error("Cannot load property file " + path, e);
}
return null;
}
@@ -1092,9 +1092,9 @@
}
catch (Exception e)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug(
+ LOG.debug(
"The static method valueOf(String) cannot be found for the class " + oldValue.getClass(), e);
}
}
@@ -1113,7 +1113,7 @@
}
catch (Exception e)
{
- log.error("Cannot convert the value '" + propertyValue + "' to an Object of type "
+ LOG.error("Cannot convert the value '" + propertyValue + "' to an Object of type "
+ oldValue.getClass(), e);
// we ignore invalid value
continue;
@@ -1202,7 +1202,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.warn("No portal container definition has been registered, the old behavior is" +
+ LOG.warn("No portal container definition has been registered, the old behavior is" +
" then expected so you cannot disable any portal container. The list of" +
" portal containers to disable will be ignored");
}
@@ -1235,7 +1235,7 @@
}
catch (Exception e)
{
- log.warn("Cannot apply the change " + change, e);
+ LOG.warn("Cannot apply the change " + change, e);
}
}
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -52,7 +52,7 @@
private volatile Object instance_;
- private Log log = ExoLogger.getLogger("exo.kernel.container.MX4JComponentAdapter");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.MX4JComponentAdapter");
public MX4JComponentAdapter(Object key, Class implementation)
{
@@ -102,7 +102,7 @@
}
exocontainer.addComponentToCtx(getComponentKey(), instance);
if (debug)
- log.debug("==> create component : " + instance_);
+ LOG.debug("==> create component : " + instance_);
if (component != null && component.getComponentPlugins() != null)
{
addComponentPlugin(debug, instance, component.getComponentPlugins(), exocontainer);
@@ -159,7 +159,7 @@
final Method m = getSetMethod(clazz, plugin.getSetMethod(), pluginClass);
if (m == null)
{
- log.error("Cannot find the method '" + plugin.getSetMethod() + "' that has only one parameter of type '"
+ LOG.error("Cannot find the method '" + plugin.getSetMethod() + "' that has only one parameter of type '"
+ pluginClass.getName() + "' in the class '" + clazz.getName() + "'.");
continue;
}
@@ -175,14 +175,15 @@
});
if (debug)
- log.debug("==> add component plugin: " + cplugin);
+ LOG.debug("==> add component plugin: " + cplugin);
cplugin.setName(plugin.getName());
cplugin.setDescription(plugin.getDescription());
}
catch (Exception ex)
{
- log.error("Failed to instanciate plugin " + plugin.getName() + " for component " + component + ": "
+ LOG.error(
+ "Failed to instanciate plugin " + plugin.getName() + " for component " + component + ": "
+ ex.getMessage(), ex);
}
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -35,7 +35,7 @@
{
/** . */
- private Log log = ExoLogger.getLogger("exo.kernel.container.ManageableComponentAdapter");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ManageableComponentAdapter");
/** . */
private ComponentAdapter delegate;
@@ -76,7 +76,7 @@
if (container.managementContext != null)
{
// Registry the instance against the management context
- log.debug("==> add " + instance + " to a mbean server");
+ LOG.debug("==> add " + instance + " to a mbean server");
container.managementContext.register(instance);
// Register if it is a management provider
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -38,7 +38,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.kernel.container.MCIntegrationContainer");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.MCIntegrationContainer");
/**
* Constructor that exposes super constructor.
@@ -99,7 +99,8 @@
}
catch(Exception ignored)
{
- log.debug("MC integration failed - maybe not supported in this environment (component: "
+ LOG.debug(
+ "MC integration failed - maybe not supported in this environment (component: "
+ componentAdapter.getComponentKey() + ")", ignored);
}
}
@@ -122,7 +123,8 @@
}
catch (Exception ignored)
{
- log.warn("MC integration failed - maybe not supported in this environment (component: "
+ LOG.warn(
+ "MC integration failed - maybe not supported in this environment (component: "
+ componentAdapter.getComponentKey() + ")", ignored);
}
return false;
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -25,9 +25,10 @@
import org.exoplatform.services.log.Log;
import org.picocontainer.ComponentAdapter;
-import javax.servlet.ServletContext;
import java.lang.reflect.Method;
+import javax.servlet.ServletContext;
+
/**
* This class performs a loosely coupled integration to mc-integration logic.
* MC integration provides the ability to inject JBoss MC configured beans into
@@ -43,7 +44,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.kernel.container.MCIntegrationInvoker");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.MCIntegrationInvoker");
/**
* Reference to actual implementation of mc-integration - the one with hard dependencies on JBoss MC Kernel.
@@ -127,7 +128,7 @@
catch (ClassNotFoundException ignored)
{
permFailure = true;
- log.debug("MC integration not available in this environment (missing class: "
+ LOG.debug("MC integration not available in this environment (missing class: "
+ ignored.getMessage() + ")");
return null;
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -34,7 +34,7 @@
public class AddJVMComponentsToRootContainer extends BaseContainerLifecyclePlugin
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.AddJVMComponentsToRootContainer");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.AddJVMComponentsToRootContainer");
public void initContainer(ExoContainer container)
{
@@ -57,9 +57,9 @@
{
if (mxComponent != null)
{
- log.debug("Attempt to register mx component " + mxComponent);
+ LOG.debug("Attempt to register mx component " + mxComponent);
container.registerComponentInstance(mxComponent);
- log.debug("Mx component " + mxComponent + " registered");
+ LOG.debug("Mx component " + mxComponent + " registered");
}
}
@@ -67,9 +67,9 @@
{
if (mxComponent != null)
{
- log.debug("Attempt to register mx component " + mxComponent + " with key " + mxKey);
+ LOG.debug("Attempt to register mx component " + mxComponent + " with key " + mxKey);
container.registerComponentInstance(mxKey, mxComponent);
- log.debug("Mx component " + mxComponent + " registered");
+ LOG.debug("Mx component " + mxComponent + " registered");
}
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -46,7 +46,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.AbstractHttpServlet");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.AbstractHttpServlet");
/**
* Serial Version ID.
@@ -194,7 +194,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal environment could not be set for the webapp '"
+ LOG.info("The portal environment could not be set for the webapp '"
+ config.getServletContext().getServletContextName()
+ "' because this servlet context has not been defined as a "
+ "dependency of any portal container or it is a disabled portal"
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -40,7 +40,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.AbstractHttpSessionListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.AbstractHttpSessionListener");
/**
* @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent)
@@ -82,7 +82,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal environment could not be set for the webapp '" + ctxName
+ LOG.info("The portal environment could not be set for the webapp '" + ctxName
+ "' because this servlet context has not been defined as a "
+ "dependency of any portal container or it is a disabled portal"
+ " container, the sessionCreated event will be ignored");
@@ -152,7 +152,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal environment could not be set for the webapp '" + ctxName
+ LOG.info("The portal environment could not be set for the webapp '" + ctxName
+ "' because this servlet context has not been defined as a "
+ "dependency of any portal container or it is a disabled portal"
+ " container, the sessionDestroyed event will be ignored");
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -44,7 +44,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.PortalContainerFilter");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.PortalContainerFilter");
/**
* @see javax.servlet.Filter#destroy()
@@ -81,7 +81,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal container corresponding to the webapp '" + servletContextName
+ LOG.info("The portal container corresponding to the webapp '" + servletContextName
+ "' is disabled, thus the request is cancelled: target URI was "
+ ((HttpServletRequest)request).getRequestURI());
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -38,7 +38,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.ConfigurationMarshallerUtil");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ConfigurationMarshallerUtil");
/**
* This method adds the given {@link URL} as comment to XML content.
@@ -51,7 +51,7 @@
}
catch (IOException e)
{
- log.warn("Could not add the source into the XML document", e);
+ LOG.warn("Could not add the source into the XML document", e);
}
}
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -78,7 +78,7 @@
/**
* Logger.
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int.MCIntConfig");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int.MCIntConfig");
/**
* Configuration for <em>beans</em> specified with <em>name</em>.
@@ -126,7 +126,7 @@
}
if (data != null)
{
- log.warn("Overriding existing mc-int-beans configuration for bean: " + data.data
+ LOG.warn("Overriding existing mc-int-beans configuration for bean: " + data.data
+ " from " + data.deployment.getName() + " with one from " + deployment.getName());
}
addConf(new DeploymentData(deployment, mdata));
@@ -221,10 +221,10 @@
*/
private KernelDeployment parseConfigURL(UnmarshallerFactory factory, MutableSchemaResolver resolver, URL url)
{
- final boolean trace = log.isTraceEnabled();
+ final boolean trace = LOG.isTraceEnabled();
if (trace)
{
- log.trace("Parsing " + url);
+ LOG.trace("Parsing " + url);
}
long start = System.currentTimeMillis();
@@ -248,7 +248,7 @@
if (trace)
{
long now = System.currentTimeMillis();
- log.trace("Parsing " + url + " took " + (now - start) + " milliseconds");
+ LOG.trace("Parsing " + url + " took " + (now - start) + " milliseconds");
}
return deployment;
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -32,10 +32,11 @@
import org.jboss.mc.servlet.vdf.api.VDFThreadLocalUtils;
import org.picocontainer.ComponentAdapter;
-import javax.servlet.ServletContext;
import java.lang.annotation.Annotation;
import java.util.Set;
+import javax.servlet.ServletContext;
+
/**
* Implementation of MCIntegration that contains hard dependencies on JBoss Microcontainer.
*
@@ -49,7 +50,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.kernel.mc-int.MCIntegrationImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int.MCIntegrationImpl");
/**
* A singleton MCIntegration implementation
@@ -103,7 +104,7 @@
}
else
{
- log.warn("GateIn - MC integration not available");
+ LOG.warn("GateIn - MC integration not available");
return null;
}
}
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -31,7 +31,7 @@
*/
public class InjectedBean
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectedBean");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectedBean");
public static final String SOME_PROPERTY_VALUE = "[This is some property value]";
@@ -39,7 +39,7 @@
public InjectedBean()
{
- log.info("InjectedBean instantiated :: " + this);
+ LOG.info("InjectedBean instantiated :: " + this);
}
public String getSomeString()
@@ -49,7 +49,7 @@
public void start()
{
- log.info("Method start() called on InjectedBean");
+ LOG.info("Method start() called on InjectedBean");
}
public String getAnotherProperty()
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -57,7 +57,7 @@
/**
* Logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectingBean");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectingBean");
/**
* Field to be injected through setter method by mc kernel.
@@ -113,7 +113,7 @@
*/
public InjectingBean()
{
- log.info("Injecting bean instantiated");
+ LOG.info("Injecting bean instantiated");
}
/**
@@ -133,7 +133,7 @@
public void setBean(InjectedBean bean)
{
this.bean = bean;
- log.info("Received InjectedBean: " + bean);
+ LOG.info("Received InjectedBean: " + bean);
}
/**
@@ -153,7 +153,7 @@
public void setConfigurator(KernelConfigurator configurator)
{
this.configurator = configurator;
- log.info("InjectingBean Received KernelConfigurator: " + configurator);
+ LOG.info("InjectingBean Received KernelConfigurator: " + configurator);
}
/**
@@ -205,7 +205,7 @@
)
public void setBindings(Map<Class<?>, Object> bindings)
{
- log.info("Received a map with bindings: " + bindings);
+ LOG.info("Received a map with bindings: " + bindings);
this.bindingsMap = bindings;
}
@@ -225,7 +225,7 @@
@Inject(bean = "InjectedBean", property = "someString")
public void setSomeStringProperty(String value)
{
- log.info("Received SomeStringProperty value: " + value);
+ LOG.info("Received SomeStringProperty value: " + value);
this.stringValue = value;
}
@@ -234,7 +234,7 @@
*/
public void start()
{
- log.warn("start() called (injectedBean is set to: " + injectedBean + ", transactionManager is setTo: " + tm + ")");
+ LOG.warn("start() called (injectedBean is set to: " + injectedBean + ", transactionManager is setTo: " + tm + ")");
this.startCount++;
}
@@ -243,7 +243,7 @@
*/
public void stop()
{
- log.info("stop() called");
+ LOG.info("stop() called");
}
/**
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -31,15 +31,16 @@
import org.junit.Assert;
import org.junit.Test;
-import javax.transaction.TransactionManager;
import java.util.Map;
+import javax.transaction.TransactionManager;
+
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class ExternalMCInjectionTest
{
- protected Log log = ExoLogger.getLogger("exo.kernel.mc-int-tests.ExternalMCInjectionTest");
+ protected static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-tests.ExternalMCInjectionTest");
protected String beanName;
protected ExternallyControlledInjectingBean bean;
@@ -53,13 +54,13 @@
protected void init()
{
- log.info("init() method called");
+ LOG.info("init() method called");
RootContainer rootContainer = RootContainer.getInstance();
bean = (ExternallyControlledInjectingBean) rootContainer.getComponentInstance(beanName);
- log.info("Retrieved " + beanName + ": " + bean);
+ LOG.info("Retrieved " + beanName + ": " + bean);
Assert.assertNotNull(beanName + " not installed", bean);
inJboss = Environment.getInstance().getPlatform() == Environment.JBOSS_PLATFORM;
- log.info("Running inside JBoss? " + inJboss);
+ LOG.info("Running inside JBoss? " + inJboss);
}
@Test
@@ -89,13 +90,13 @@
try
{
int status = tm.getStatus();
- log.info("Status before tx: " + tm.getStatus());
+ LOG.info("Status before tx: " + tm.getStatus());
tm.begin();
Assert.assertFalse("TX status didn't change: ", status == tm.getStatus());
- log.info("Status in tx: " + tm.getStatus());
+ LOG.info("Status in tx: " + tm.getStatus());
tm.commit();
Assert.assertTrue("TX status didn't return to original: ", status == tm.getStatus());
- log.info("Status after tx: " + tm.getStatus());
+ LOG.info("Status after tx: " + tm.getStatus());
}
catch (Exception ex)
{
@@ -106,7 +107,7 @@
{
Assert.assertNull("Injection should not have worked", tm);
}
- log.info("testTransactionManager passed");
+ LOG.info("testTransactionManager passed");
}
protected void testNameLookupMethodInjection()
@@ -120,7 +121,7 @@
{
Assert.assertFalse("Method injection by name lookup should not have worked", found);
}
- log.info("testNameLookupMethodInjection passed");
+ LOG.info("testNameLookupMethodInjection passed");
}
protected void testMapInjection()
@@ -137,7 +138,7 @@
{
Assert.assertFalse("Map injection should not have worked", found);
}
- log.info("testMapInjection passed");
+ LOG.info("testMapInjection passed");
}
protected void testPropertyValueMethodInjection()
@@ -153,7 +154,7 @@
{
Assert.assertFalse("Property value method injection should not have worked", found);
}
- log.info("testPropertyValueMethodInjection passed");
+ LOG.info("testPropertyValueMethodInjection passed");
}
protected void testNestedPropertyInjection()
@@ -169,7 +170,7 @@
{
Assert.assertFalse("Nested property value method injection should not have worked", found);
}
- log.info("testNestedPropertyInjection passed");
+ LOG.info("testNestedPropertyInjection passed");
}
protected void testInstallMethod()
@@ -183,12 +184,12 @@
{
Assert.assertFalse("Install method should not have worked", installOk);
}
- log.info("testInstallMethod passed");
+ LOG.info("testInstallMethod passed");
}
protected void testStarted()
{
Assert.assertEquals("start() method not called exactly once", 1, bean.getStartCount());
- log.info("testStarted passed");
+ LOG.info("testStarted passed");
}
}
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2012-02-14 14:40:01 UTC (rev 5632)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2012-02-14 14:49:09 UTC (rev 5633)
@@ -36,7 +36,7 @@
public class JUnitInvokerServlet extends HttpServlet
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int-tests.JUnitInvokerServlet");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-tests.JUnitInvokerServlet");
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
@@ -44,7 +44,7 @@
String className = request.getParameter("class");
response.setContentType("text/plain");
OutputStream out = response.getOutputStream();
- final PrintStream fOut = new PrintStream(new TeeOutputStream(out, new LogOutputStream(log)));
+ final PrintStream fOut = new PrintStream(new TeeOutputStream(out, new LogOutputStream(LOG)));
//final PrintStream fOut = new PrintStream(out);
JUnitSystem sys = new JUnitSystem()
{
12 years, 4 months
exo-jcr SVN: r5632 - in jcr/branches/1.15.x: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow and 57 other directories.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-14 09:40:01 -0500 (Tue, 14 Feb 2012)
New Revision: 5632
Modified:
jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java
jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java
jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java
jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessControlList.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/WorkspaceImpl.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RSyncJob.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/GenericConnectionFactory.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java
jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java
jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java
jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java
jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java
jcr/branches/1.15.x/exo.jcr.framework.web/src/main/java/org/exoplatform/frameworks/jcr/web/ThreadLocalSessionProviderInitializedFilter.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessControlList.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessControlList.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessControlList.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -45,7 +45,7 @@
private static final long serialVersionUID = 5848327750178729120L;
- private Log log = ExoLogger.getLogger("exo.jcr.component.core.AccessControlList");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.AccessControlList");
public static final String DELIMITER = ";";
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -45,7 +45,7 @@
public abstract class AccessManager
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.AccessManager");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.AccessManager");
protected final Map<String, String> parameters;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemState.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -42,7 +42,7 @@
private static final long serialVersionUID = 7967457831325761318L;
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemState");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemState");
public static final int ADDED = 1;
@@ -162,8 +162,8 @@
this.internallyCreated = isInternalCreated;
this.isPersisted = isPersisted;
- if (log.isDebugEnabled())
- log.debug(nameFromValue(state) + " " + data.getQPath().getAsString() + ", " + data.getIdentifier());
+ if (LOG.isDebugEnabled())
+ LOG.debug(nameFromValue(state) + " " + data.getQPath().getAsString() + ", " + data.getIdentifier());
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/Constants.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -33,7 +33,7 @@
public class Constants
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.Constants");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.Constants");
/**
* Default namespace prefix (empty uri).
@@ -712,7 +712,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse JCR_SYSTEM_URI for constant JCR_SYSTEM (" + JCR_SYSTEM_URI + "): " + e, e);
+ LOG.error("ERROR: Can't parse JCR_SYSTEM_URI for constant JCR_SYSTEM (" + JCR_SYSTEM_URI + "): " + e, e);
}
try
@@ -721,7 +721,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse JCR_VERSION_STORAGE_URI for constant JCR_VERSION_STORAGE_PATH ("
+ LOG.error("ERROR: Can't parse JCR_VERSION_STORAGE_URI for constant JCR_VERSION_STORAGE_PATH ("
+ JCR_VERSION_STORAGE_URI + "): " + e, e);
}
@@ -731,7 +731,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse JCR_NODETYPES_URI for constant JCR_NODETYPES_PATH ("
+ LOG.error("ERROR: Can't parse JCR_NODETYPES_URI for constant JCR_NODETYPES_PATH ("
+ JCR_NODETYPES_URI + "): " + e, e);
}
@@ -742,7 +742,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse EXO_NAMESPACES_URI for constant EXO_NAMESPACES (" + nsUri + "): " + e, e);
+ LOG.error("ERROR: Can't parse EXO_NAMESPACES_URI for constant EXO_NAMESPACES (" + nsUri + "): " + e, e);
}
try
@@ -751,7 +751,7 @@
}
catch (IllegalPathException e)
{
- log.error("ERROR: Can't parse ROOT_URI " + e, e);
+ LOG.error("ERROR: Can't parse ROOT_URI " + e, e);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/WorkspaceContainer.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -50,7 +50,7 @@
public class WorkspaceContainer extends ExoContainer
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContainer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContainer");
private final String name;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -53,7 +53,7 @@
public class JDBCConfigurationPersister implements ConfigurationPersister
{
- protected static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JDBCConfigurationPersister");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JDBCConfigurationPersister");
public final static String PARAM_SOURCE_NAME = "source-name";
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -45,7 +45,7 @@
public final static String PARENT_RELPATH = "..";
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.JCRPath");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JCRPath");
public static JCRPath createJCRPath()
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -181,7 +181,7 @@
{
if (size <= 0)
{
- log.warn("Wrong relative path. Can't move up in path hierarhy.");
+ LOG.warn("Wrong relative path. Can't move up in path hierarhy.");
return 0;
}
return size - 1;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -51,7 +51,7 @@
private final static Set<String> PROTECTED_NAMESPACES = new HashSet<String>();
- protected final static Log log = ExoLogger.getLogger("exo.jcr.component.core.NamespaceRegistryImpl");
+ protected final static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.NamespaceRegistryImpl");
private boolean started = false;
static
@@ -389,15 +389,15 @@
{
registerNamespace(prefix, uri);
}
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Namespace is registered " + prefix + " = " + uri);
+ LOG.debug("Namespace is registered " + prefix + " = " + uri);
}
}
}
catch (Exception e)
{
- log.error("Error load namespaces ", e);
+ LOG.error("Error load namespaces ", e);
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -85,7 +85,7 @@
public static final int MERGE_ITEMS = 3;
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.SessionDataManager");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionDataManager");
protected final SessionImpl session;
@@ -357,10 +357,10 @@
throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
+ LOG.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
}
ItemImpl item = null;
@@ -370,9 +370,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + ") --> "
+ LOG.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + ") --> "
+ (item != null ? item.getPath() : "null") + " <<<<< " + ((System.currentTimeMillis() - start) / 1000d)
+ "sec");
}
@@ -405,10 +405,10 @@
ItemType itemType, boolean createNullItemData) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
+ LOG.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
}
ItemImpl item = null;
@@ -420,9 +420,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + ") --> "
+ LOG.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + ") --> "
+ (item != null ? item.getPath() : "null") + " <<<<< " + ((System.currentTimeMillis() - start) / 1000d)
+ "sec");
}
@@ -448,7 +448,7 @@
throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
StringBuilder debugPath = new StringBuilder();
@@ -456,7 +456,7 @@
{
debugPath.append(rp.getAsString());
}
- log.debug("getItem(" + parent.getQPath().getAsString() + " + " + debugPath + " ) >>>>>");
+ LOG.debug("getItem(" + parent.getQPath().getAsString() + " + " + debugPath + " ) >>>>>");
}
ItemImpl item = null;
@@ -466,14 +466,14 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
StringBuilder debugPath = new StringBuilder();
for (QPathEntry rp : relPath)
{
debugPath.append(rp.getAsString());
}
- log.debug("getItem(" + parent.getQPath().getAsString() + " + " + debugPath + ") --> "
+ LOG.debug("getItem(" + parent.getQPath().getAsString() + " + " + debugPath + ") --> "
+ (item != null ? item.getPath() : "null") + " <<<<< " + ((System.currentTimeMillis() - start) / 1000d)
+ "sec");
}
@@ -493,10 +493,10 @@
public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getItem(" + path.getAsString() + " ) >>>>>");
+ LOG.debug("getItem(" + path.getAsString() + " ) >>>>>");
}
ItemImpl item = null;
@@ -506,9 +506,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getItem(" + path.getAsString() + ") --> " + (item != null ? item.getPath() : "null") + " <<<<< "
+ LOG.debug("getItem(" + path.getAsString() + ") --> " + (item != null ? item.getPath() : "null") + " <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -614,10 +614,10 @@
public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getItemByIdentifier(" + identifier + " ) >>>>>");
+ LOG.debug("getItemByIdentifier(" + identifier + " ) >>>>>");
}
ItemImpl item = null;
@@ -627,9 +627,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getItemByIdentifier(" + identifier + ") --> " + (item != null ? item.getPath() : "null")
+ LOG.debug("getItemByIdentifier(" + identifier + ") --> " + (item != null ? item.getPath() : "null")
+ " <<<<< " + ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -805,10 +805,10 @@
throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getChildNodesData(" + parent.getQPath().getAsString() + " , itemDataFilter) >>>>>");
+ LOG.debug("getChildNodesData(" + parent.getQPath().getAsString() + " , itemDataFilter) >>>>>");
}
try
@@ -864,9 +864,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ LOG.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -878,10 +878,10 @@
public List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") >>>>>");
+ LOG.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") >>>>>");
}
try
@@ -890,9 +890,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ LOG.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -905,10 +905,10 @@
throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getChildNodesData(" + parent.getQPath().getAsString() + " , itemDataFilter) >>>>>");
+ LOG.debug("getChildNodesData(" + parent.getQPath().getAsString() + " , itemDataFilter) >>>>>");
}
try
@@ -920,9 +920,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ LOG.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -964,10 +964,10 @@
public List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") >>>>>");
+ LOG.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") >>>>>");
}
try
@@ -976,9 +976,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ LOG.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -991,10 +991,10 @@
throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") >>>>>");
+ LOG.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") >>>>>");
}
try
@@ -1007,9 +1007,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ LOG.debug("getChildPropertiesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -1022,10 +1022,10 @@
public List<PropertyData> listChildPropertiesData(NodeData parent) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("listChildPropertiesData(" + parent.getQPath().getAsString() + ") >>>>>");
+ LOG.debug("listChildPropertiesData(" + parent.getQPath().getAsString() + ") >>>>>");
}
try
@@ -1034,9 +1034,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("listChildPropertiesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ LOG.debug("listChildPropertiesData(" + parent.getQPath().getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -1054,10 +1054,10 @@
public AccessControlList getACL(QPath path) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getACL(" + path.getAsString() + " ) >>>>>");
+ LOG.debug("getACL(" + path.getAsString() + " ) >>>>>");
}
try
@@ -1109,9 +1109,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getACL(" + path.getAsString() + ") <<<<< " + ((System.currentTimeMillis() - start) / 1000d)
+ LOG.debug("getACL(" + path.getAsString() + ") <<<<< " + ((System.currentTimeMillis() - start) / 1000d)
+ "sec");
}
}
@@ -1120,10 +1120,10 @@
public AccessControlList getACL(NodeData parent, QPathEntry name) throws RepositoryException
{
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
- log.debug("getACL(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
+ LOG.debug("getACL(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
}
try
@@ -1142,9 +1142,9 @@
}
finally
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("getACL(" + parent.getQPath().getAsString() + " + " + name.getAsString() + ") <<<<< "
+ LOG.debug("getACL(" + parent.getQPath().getAsString() + " + " + name.getAsString() + ") <<<<< "
+ ((System.currentTimeMillis() - start) / 1000d) + "sec");
}
}
@@ -1277,9 +1277,9 @@
invalidated.add(pooled);
}
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("deleted top item: " + itemData.getQPath().getAsString());
+ LOG.debug("deleted top item: " + itemData.getQPath().getAsString());
}
}
@@ -1507,9 +1507,9 @@
PlainChangesLog cLog = changesLog.pushLog(path);
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug(" ----- commit -------- \n" + cLog.dump());
+ LOG.debug(" ----- commit -------- \n" + cLog.dump());
}
try
@@ -1554,9 +1554,9 @@
private void remainChangesBack(PlainChangesLog cLog)
{
changesLog.addAll(cLog.getAllStates());
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug(" ----- rollback ----- \n" + cLog.dump());
+ LOG.debug(" ----- rollback ----- \n" + cLog.dump());
}
}
@@ -1747,7 +1747,7 @@
}
catch (RepositoryException e)
{
- log.warn("Unexpected exception. Probable wrong data. Exception message:" + e.getLocalizedMessage());
+ LOG.warn("Unexpected exception. Probable wrong data. Exception message:" + e.getLocalizedMessage());
}
}
}
@@ -2492,7 +2492,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return str.toString();
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionReference.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -42,7 +42,7 @@
/**
* The logger instance for this class.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionReference");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionReference");
//
private static final int INITIAL_DELAY = 10;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -89,7 +89,7 @@
public static final String RESTORE_PATH_PARAMETER = "restore-path";
- protected static final Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceInitializer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceInitializer");
protected final String workspaceName;
@@ -535,7 +535,7 @@
final NodeData root = (NodeData)dataManager.getItemData(Constants.ROOT_UUID);
- log.info("Workspace [" + workspaceName + "] restored from storage " + restorePath + " in "
+ LOG.info("Workspace [" + workspaceName + "] restored from storage " + restorePath + " in "
+ (System.currentTimeMillis() - start) * 1d / 1000 + "sec");
return root;
@@ -675,7 +675,7 @@
true));
}
else
- log.warn("Node skipped name=" + svName + " id=" + exoId + ". Context node "
+ LOG.warn("Node skipped name=" + svName + " id=" + exoId + ". Context node "
+ (parents.size() > 0 ? parents.peek().getQPath().getAsString() : "/"));
}
@@ -709,12 +709,12 @@
("true".equals(exoMultivalued) ? true : false));
}
else
- log.warn("Property can'b be first name=" + svName + " type=" + svType + " id=" + exoId
+ LOG.warn("Property can'b be first name=" + svName + " type=" + svType + " id=" + exoId
+ ". Node should be prior. Context node "
+ (parents.size() > 0 ? parents.peek().getQPath().getAsString() : "/"));
}
else
- log.warn("Property skipped name=" + svName + " type=" + svType + " id=" + exoId
+ LOG.warn("Property skipped name=" + svName + " type=" + svType + " id=" + exoId
+ ". Context node "
+ (parents.size() > 0 ? parents.peek().getQPath().getAsString() : "/"));
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/WorkspaceImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/WorkspaceImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/WorkspaceImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -82,7 +82,7 @@
public class WorkspaceImpl implements ExtendedWorkspace
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceImpl");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceImpl");
private final SessionImpl session;
@@ -638,7 +638,7 @@
}
else
{
- log.warn("Workspace.restore(). Correspondent node is not found " + versionableIdentifier);
+ LOG.warn("Workspace.restore(). Correspondent node is not found " + versionableIdentifier);
}
}
if (versionableParentIdentifier != null && existedIdentifiers.contains(versionableParentIdentifier))
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -136,7 +136,7 @@
/**
* Logger
*/
- protected Log LOG = ExoLogger.getLogger("exo.jcr.component.core.AbstractCacheableLockManager");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.AbstractCacheableLockManager");
protected LockActionNonTxAware<Integer, Object> getNumLocks;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -35,7 +35,7 @@
*/
public class CacheLockImpl extends LockImpl
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.CacheLockImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CacheLockImpl");
private boolean live;
@@ -117,7 +117,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return null;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -51,7 +51,7 @@
/**
* Logger
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.CacheableSessionLockManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CacheableSessionLockManager");
/**
* Session identifier.
@@ -242,19 +242,19 @@
}
catch (UnsupportedRepositoryOperationException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
catch (LockException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
catch (AccessDeniedException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -39,7 +39,7 @@
*/
public class InmemoryNodeTypeRepository extends AbstractNodeTypeRepository
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.InmemoryNodeTypeRepository");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.InmemoryNodeTypeRepository");
private final ItemDefinitionDataHolder defsHolder;
@@ -104,7 +104,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return hierarchy.getAllNodeTypes();
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -61,7 +61,7 @@
public class ItemAutocreator
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemAutocreator");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemAutocreator");
private final NodeTypeDataManager nodeTypeDataManager;
@@ -132,9 +132,9 @@
}
else
{
- if (this.log.isDebugEnabled())
+ if (this.LOG.isDebugEnabled())
{
- this.log.debug("Skipping existed node " + ndef.getName() + " in " + parent.getQPath().getAsString()
+ this.LOG.debug("Skipping existed node " + ndef.getName() + " in " + parent.getQPath().getAsString()
+ " during the automatic creation of items for " + typeName.getAsString()
+ " nodetype or mixin type");
}
@@ -180,9 +180,9 @@
}
else
{
- if (this.log.isDebugEnabled())
+ if (this.LOG.isDebugEnabled())
{
- this.log.debug("Skipping existed property " + pdef.getName() + " in "
+ this.LOG.debug("Skipping existed property " + pdef.getName() + " in "
+ parent.getQPath().getAsString() + " during the automatic creation of items for "
+ typeName.getAsString() + " nodetype or mixin type");
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/VolatileNodeTypeDataManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -41,7 +41,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.VolatileNodeTypeDataManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.VolatileNodeTypeDataManager");
public VolatileNodeTypeDataManager(final NodeTypeDataManagerImpl nodeTypeDataManagerImpl) throws RepositoryException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -43,7 +43,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger(CNDNodeTypeDataPersister.class);
+ private static final Log LOG = ExoLogger.getLogger(CNDNodeTypeDataPersister.class);
private final InputStream is;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -65,7 +65,7 @@
public class JCRNodeTypeDataPersister implements NodeTypeDataPersister
{
- protected final Log log = ExoLogger.getLogger("exo.jcr.component.core.JCRNodeTypeDataPersister");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JCRNodeTypeDataPersister");
private final DataManager dataManager;
@@ -120,7 +120,7 @@
{
if (!started)
{
- log.warn("Unable save nodetype " + nodeType.getName().getAsString()
+ LOG.warn("Unable save nodetype " + nodeType.getName().getAsString()
+ " in to the storage. Storage not initialized");
return;
}
@@ -152,7 +152,7 @@
TransientNodeData jcrNodetypes;
long start = 0;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
start = System.currentTimeMillis();
}
@@ -214,9 +214,9 @@
changesLog.add(ItemState.createAddedState(jcrNodetypes)).add(ItemState.createAddedState(primaryType));
}
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("/jcr:system/jcr:nodetypes is created, creation time: " + (System.currentTimeMillis() - start)
+ LOG.debug("/jcr:system/jcr:nodetypes is created, creation time: " + (System.currentTimeMillis() - start)
+ " ms");
}
@@ -233,7 +233,7 @@
{
if (nodeTypeStorageRoot == null)
{
- log.warn(" Storage not initialized");
+ LOG.warn(" Storage not initialized");
return false;
}
try
@@ -243,7 +243,7 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return false;
@@ -335,7 +335,7 @@
{
if (nodeTypeStorageRoot == null)
{
- log.warn(" Storage not initialized");
+ LOG.warn(" Storage not initialized");
return null;
}
//Searching nodeType root
@@ -431,8 +431,8 @@
{
if (this.nodeTypeStorageRoot == null)
{
- if (log.isDebugEnabled())
- log.debug(" Storage not initialized");
+ if (LOG.isDebugEnabled())
+ LOG.debug(" Storage not initialized");
return false;
}
return true;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/NodeTypeConverter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -49,7 +49,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.NodeTypeConverter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.NodeTypeConverter");
private final LocationFactory locationFactory;
@@ -76,7 +76,7 @@
{
// skip this node, so it's not necessary at this runtime
// + "' -- it's not necessary at this runtime";
- log.warn("Node type " + ntvalue.getName() + " is not register due to DISABLE control policy");
+ LOG.warn("Node type " + ntvalue.getName() + " is not register due to DISABLE control policy");
break;
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -57,7 +57,7 @@
public final int SKIP_EVENT = Integer.MIN_VALUE;
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.ActionLauncher");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ActionLauncher");
private final ObservationManagerRegistry observationRegistry;
@@ -129,7 +129,7 @@
}
catch (RepositoryException e)
{
- log.error("Can not fire ActionLauncher.onSaveItems() for " + item.getQPath().getAsString()
+ LOG.error("Can not fire ActionLauncher.onSaveItems() for " + item.getQPath().getAsString()
+ " reason: " + e.getMessage());
}
}
@@ -228,7 +228,7 @@
if (node == null)
{
- log.warn("Item's " + item.getQPath().getAsString() + " associated parent (" + item.getParentIdentifier()
+ LOG.warn("Item's " + item.getQPath().getAsString() + " associated parent (" + item.getParentIdentifier()
+ ") can't be found nor in workspace nor in current changes. Nodetype filter is rejected.");
return false;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ObservationManagerRegistry.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -43,7 +43,7 @@
public class ObservationManagerRegistry
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.ObservationManagerRegistry");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ObservationManagerRegistry");
protected Map<EventListener, ListenerCriteria> listenersMap;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -39,7 +39,7 @@
/**
* Logger instance for this class
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.DefaultChangesFilter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.DefaultChangesFilter");
/**
* @param searchManager
@@ -89,11 +89,11 @@
}
catch (RepositoryException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
}
catch (IOException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
logErrorChanges(handler, removedNodes, addedNodes);
}
@@ -103,17 +103,17 @@
}
catch (RepositoryException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
}
catch (IOException e)
{
- log.error("Error indexing changes " + e, e);
+ LOG.error("Error indexing changes " + e, e);
logErrorChanges(parentHandler, parentRemovedNodes, parentAddedNodes);
}
}
protected Log getLogger()
{
- return log;
+ return LOG;
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/RepositoryIndexSearcherHolder.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -43,7 +43,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.RepositoryIndexSearcherHolder");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.RepositoryIndexSearcherHolder");
/**
* @param indexSearchers
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -131,7 +131,7 @@
/**
* Logger instance for this class
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.SearchManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SearchManager");
/**
* Used to display date and time for JMX components
@@ -441,7 +441,7 @@
}
catch (SuspendException e)
{
- log.error(e.getMessage(), e);
+ LOG.error(e.getMessage(), e);
}
}
}
@@ -612,9 +612,9 @@
public void start()
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("start");
+ LOG.debug("start");
}
try
{
@@ -643,7 +643,7 @@
}
catch (RepositoryException e)
{
- log.warn(e.getLocalizedMessage());
+ LOG.warn(e.getLocalizedMessage());
}
}
}
@@ -662,7 +662,7 @@
}
catch (RepositoryException e)
{
- log.warn(e.getLocalizedMessage() + " Indexing root set to " + Constants.ROOT_PATH.getAsString());
+ LOG.warn(e.getLocalizedMessage() + " Indexing root set to " + Constants.ROOT_PATH.getAsString());
}
@@ -675,7 +675,7 @@
}
catch (RepositoryException e)
{
- log.error("Fail to load root node data");
+ LOG.error("Fail to load root node data");
}
}
@@ -685,13 +685,13 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
handler = null;
throw new RuntimeException(e.getLocalizedMessage(), e.getCause());
}
catch (RepositoryConfigurationException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
handler = null;
throw new RuntimeException(e.getLocalizedMessage(), e.getCause());
}
@@ -705,7 +705,7 @@
{
changesFilter.close();
}
- log.info("Search manager stopped");
+ LOG.info("Search manager stopped");
}
/**
@@ -763,19 +763,19 @@
}
else
{
- log.warn("Node not found, but property " + id + ", " + item.getQPath().getAsString()
+ LOG.warn("Node not found, but property " + id + ", " + item.getQPath().getAsString()
+ " found. ");
}
}
else
{
- log.warn("Unable to index node with id " + id + ", node does not exist.");
+ LOG.warn("Unable to index node with id " + id + ", node does not exist.");
}
}
catch (RepositoryException e)
{
- log.error("Can't read next node data " + id, e);
+ LOG.error("Can't read next node data " + id, e);
}
}
while (iter.hasNext()); // get next if error or node not found
@@ -903,7 +903,7 @@
String dir = config.getParameterValue(QueryHandlerParams.PARAM_INDEX_DIR, null);
if (dir == null)
{
- log.warn(QueryHandlerParams.PARAM_INDEX_DIR + " parameter not found. Using outdated parameter name "
+ LOG.warn(QueryHandlerParams.PARAM_INDEX_DIR + " parameter not found. Using outdated parameter name "
+ QueryHandlerParams.OLD_PARAM_INDEX_DIR);
dir = config.getParameterValue(QueryHandlerParams.OLD_PARAM_INDEX_DIR);
}
@@ -1116,7 +1116,7 @@
}
catch (IOException e)
{
- log.error("Can not close QueryHits.", e);
+ LOG.error("Can not close QueryHits.", e);
}
}
}
@@ -1309,7 +1309,7 @@
+ ((isSuspended) ? "SUSPENDED." : "already OFFLINE (it means that reindexing is in progress).") + ".");
}
- log.info("Starting hot reindexing on the " + handler.getContext().getRepositoryName() + "/"
+ LOG.info("Starting hot reindexing on the " + handler.getContext().getRepositoryName() + "/"
+ handler.getContext().getContainer().getWorkspaceName() + ", with" + (dropExisting ? "" : "out")
+ " dropping the existing indexes.");
// starting new thread, releasing JMX call
@@ -1339,24 +1339,24 @@
}
else
{
- log.error("This kind of QuerHandler class doesn't support hot reindxing.");
+ LOG.error("This kind of QuerHandler class doesn't support hot reindxing.");
}
}
catch (RepositoryException e)
{
- log.error("Error while reindexing the workspace", e);
+ LOG.error("Error while reindexing the workspace", e);
}
catch (SecurityException e)
{
- log.error("Can't change state to offline.", e);
+ LOG.error("Can't change state to offline.", e);
}
catch (RPCException e)
{
- log.error("Can't change state to offline.", e);
+ LOG.error("Can't change state to offline.", e);
}
catch (IOException e)
{
- log.error("Erroe while reindexing the workspace", e);
+ LOG.error("Erroe while reindexing the workspace", e);
}
// safely change state back
finally
@@ -1371,11 +1371,11 @@
}
catch (SecurityException e)
{
- log.error("Error setting index back online in a cluster", e);
+ LOG.error("Error setting index back online in a cluster", e);
}
catch (RPCException e)
{
- log.error("Error setting index back online in a cluster", e);
+ LOG.error("Error setting index back online in a cluster", e);
}
}
else
@@ -1386,18 +1386,18 @@
}
catch (IOException e)
{
- log.error("Error setting index back online locally");
+ LOG.error("Error setting index back online locally");
}
}
if (successful)
{
hotReindexingState = "Finished at " + sdf.format(Calendar.getInstance().getTime());
- log.info("Reindexing finished successfully.");
+ LOG.info("Reindexing finished successfully.");
}
else
{
hotReindexingState = "Stopped with errors at " + sdf.format(Calendar.getInstance().getTime());
- log.info("Reindexing halted with errors.");
+ LOG.info("Reindexing halted with errors.");
}
isResponsibleForResuming = false;
}
@@ -1600,16 +1600,16 @@
}
catch (ResumeException e)
{
- log.error("Can not resume component", e);
+ LOG.error("Can not resume component", e);
}
}
catch (SecurityException e1)
{
- log.error("You haven't privileges to execute remote command", e1);
+ LOG.error("You haven't privileges to execute remote command", e1);
}
catch (RPCException e1)
{
- log.error("Exception during command execution", e1);
+ LOG.error("Exception during command execution", e1);
}
}
}.start();
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -56,7 +56,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.SystemSearchManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SystemSearchManager");
/**
* Is started flag.
@@ -103,14 +103,14 @@
}
catch (RepositoryException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
handler = null;
//freeBuffers();
throw new RuntimeException(e);
}
catch (RepositoryConfigurationException e)
{
- log.error(e.getLocalizedMessage());
+ LOG.error(e.getLocalizedMessage());
handler = null;
//freeBuffers();
throw new RuntimeException(e);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -42,7 +42,7 @@
*/
public class IndexerCacheLoader extends AbstractWriteOnlyCacheLoader
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.IndexerCacheLoader");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.IndexerCacheLoader");
/**
* A map of all the indexers that has been registered
@@ -74,9 +74,9 @@
{
indexers.put(Fqn.fromElements(searchManager.getWsId()), new Indexer(searchManager, parentSearchManager, handler,
parentHandler));
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
+ LOG.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
}
}
@@ -87,9 +87,9 @@
{
if (key.equals(JBossCacheIndexChangesFilter.LISTWRAPPER) && value instanceof ChangesFilterListsWrapper)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.info("Received list wrapper, start indexing...");
+ LOG.info("Received list wrapper, start indexing...");
}
// updating index
ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)value;
@@ -98,10 +98,10 @@
Indexer indexer = indexers.get(name.getParent());
if (indexer == null)
{
- log.warn("No indexer could be found for the fqn " + name.getParent());
- if (log.isDebugEnabled())
+ LOG.warn("No indexer could be found for the fqn " + name.getParent());
+ if (LOG.isDebugEnabled())
{
- log.debug("The current content of the map of indexers is " + indexers);
+ LOG.debug("The current content of the map of indexers is " + indexers);
}
}
else if (wrapper.withChanges())
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerSingletonStoreCacheLoader.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -39,7 +39,7 @@
*/
public class IndexerSingletonStoreCacheLoader extends SingletonStoreCacheLoader
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.IndexerSingletonStoreCacheLoader");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.IndexerSingletonStoreCacheLoader");
/**
* @see org.jboss.cache.loader.SingletonStoreCacheLoader#activeStatusChanged(boolean)
@@ -63,7 +63,7 @@
}
catch (PushStateException e)
{
- log.error("Failed to initiate PushState.", e);
+ LOG.error("Failed to initiate PushState.", e);
}
}
}, "JCR Indexer ActiveStatusChanged-handler").start();
@@ -76,11 +76,11 @@
{
public Object call() throws Exception
{
- final boolean debugEnabled = log.isDebugEnabled();
+ final boolean debugEnabled = LOG.isDebugEnabled();
if (debugEnabled)
{
- log.debug("start pushing in-memory state to cache cacheLoader collection");
+ LOG.debug("start pushing in-memory state to cache cacheLoader collection");
}
// merging all lists stored in memory
@@ -139,7 +139,7 @@
}
if (debugEnabled)
{
- log.debug("in-memory state passed to cache cacheLoader successfully");
+ LOG.debug("in-memory state passed to cache cacheLoader successfully");
}
return null;
}
@@ -169,7 +169,7 @@
// if newActiveState is true IndexerCacheLoader is coordinator with write enabled;
((IndexerCacheLoader)getCacheLoader()).setMode(writeEnabled ? IndexerIoMode.READ_WRITE
: IndexerIoMode.READ_ONLY);
- log.info("Set indexer io mode to:" + (writeEnabled ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
+ LOG.info("Set indexer io mode to:" + (writeEnabled ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -65,7 +65,7 @@
/**
* Logger instance for this class
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.JBossCacheIndexChangesFilter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JBossCacheIndexChangesFilter");
public static final String PARAM_JBOSSCACHE_CONFIGURATION = "jbosscache-configuration";
@@ -240,7 +240,7 @@
protected Log getLogger()
{
- return log;
+ return LOG;
}
protected void doUpdateIndex(ChangesFilterListsWrapper changes)
@@ -279,7 +279,7 @@
}
catch (PrivilegedActionException e)
{
- log.warn("Not all JBoss Cache MBeans were unregistered.");
+ LOG.warn("Not all JBoss Cache MBeans were unregistered.");
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -56,7 +56,7 @@
public class JBossCacheIndexInfos extends IndexInfos implements IndexerIoModeListener
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.JBossCacheIndexInfos");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JBossCacheIndexInfos");
private static final String INDEX_NAMES = "$names".intern();
@@ -143,7 +143,7 @@
}
catch (IOException e)
{
- log.error("Cannot read the list of indexe names", e);
+ LOG.error("Cannot read the list of indexe names", e);
}
}
else
@@ -183,7 +183,7 @@
Map<?, ?> data = event.getData();
if (data == null)
{
- log.warn("The data map is empty");
+ LOG.warn("The data map is empty");
}
else
{
@@ -191,7 +191,7 @@
}
if (set == null)
{
- log.warn("The data cannot be found, we will try to get it from the cache");
+ LOG.warn("The data cannot be found, we will try to get it from the cache");
// read from cache to update lists
set = (Set<String>)cache.get(namesFqn, LIST_KEY);
}
@@ -223,7 +223,7 @@
}
catch (IOException e)
{
- log.error("Failed to update indexes! " + e.getMessage(), e);
+ LOG.error("Failed to update indexes! " + e.getMessage(), e);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RSyncJob.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RSyncJob.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RSyncJob.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -36,7 +36,7 @@
*/
public class RSyncJob
{
- final Log log = ExoLogger.getLogger("exo.jcr.component.core.RsyncJob");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.RsyncJob");
private final static String RSYNC_USER_SYSTEM_PROPERTY = "USER";
@@ -72,9 +72,9 @@
try
{
String command = "rsync -rv --delete " + src + " " + dst;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Rsync job started: " + command);
+ LOG.debug("Rsync job started: " + command);
}
if (userName != null && password != null)
{
@@ -125,9 +125,9 @@
// oops, this can happen sometimes
}
}
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Rsync job finished: " + returnCode + ". Error stream output \n"
+ LOG.debug("Rsync job finished: " + returnCode + ". Error stream output \n"
+ stringBuilderErr.toString() + " Standard stream output \n" + stringBuilderStd.toString());
}
if (returnCode != 0)
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -42,7 +42,7 @@
public class RsyncIndexInfos extends JBossCacheIndexInfos
{
- final Log log = ExoLogger.getLogger("exo.jcr.component.core.RsyncIndexInfos");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.RsyncIndexInfos");
private final String indexPath;
@@ -146,7 +146,7 @@
}
catch (IOException e)
{
- log.error("Failed to retrieve index using RSYNC", e);
+ LOG.error("Failed to retrieve index using RSYNC", e);
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneVirtualTableResolver.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -19,9 +19,9 @@
package org.exoplatform.services.jcr.impl.core.query.lucene;
import org.apache.lucene.index.Term;
+import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
-import org.apache.lucene.search.BooleanClause.Occur;
import org.exoplatform.services.jcr.core.NamespaceAccessor;
import org.exoplatform.services.jcr.core.nodetype.NodeTypeDataManager;
import org.exoplatform.services.jcr.datamodel.InternalQName;
@@ -51,7 +51,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.LuceneVirtualTableResolver");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.LuceneVirtualTableResolver");
private final String mixinTypesField;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SimpleExcerptProvider.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -44,7 +44,7 @@
/**
* Logger instance for this class
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.SimpleExcerptProvider");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SimpleExcerptProvider");
/**
* The item state manager.
@@ -88,7 +88,7 @@
catch (RepositoryException e)
{
// ignore
- log.warn(e.getLocalizedMessage());
+ LOG.warn(e.getLocalizedMessage());
}
if (text.length() > maxFragmentSize)
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -49,7 +49,7 @@
public abstract class BaseValue implements ExtendedValue, ReadableBinaryValue
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.BaseValue");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.BaseValue");
protected final int type;
@@ -352,7 +352,7 @@
}
catch (IOException e)
{
- log.error("Read error", e);
+ LOG.error("Read error", e);
return false;
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/version/ItemDataCopyIgnoredVisitor.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -46,7 +46,7 @@
public class ItemDataCopyIgnoredVisitor extends DefaultItemDataCopyVisitor
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyIgnoredVisitor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyIgnoredVisitor");
protected final SessionChangesLog restoredChanges;
@@ -88,8 +88,8 @@
{
// the node can be stored as IGNOREd in restore set, check an action
- if (log.isDebugEnabled())
- log.debug("A property " + property.getQPath().getAsString() + " is IGNOREd");
+ if (LOG.isDebugEnabled())
+ LOG.debug("A property " + property.getQPath().getAsString() + " is IGNOREd");
// set context current parent to existed in restore set
parents.push((NodeData)contextState.getData());
@@ -101,9 +101,9 @@
else
{
// copy as IGNOREd parent child, i.e. OnParentVersionAction is any
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("A property " + property.getQPath().getAsString() + " is IGNOREd node descendant");
+ LOG.debug("A property " + property.getQPath().getAsString() + " is IGNOREd node descendant");
}
super.entering(property, level);
}
@@ -137,8 +137,8 @@
ItemState contextState = restoredChanges.getItemState(node.getParentIdentifier());
if (contextState != null && !contextState.isDeleted())
{
- if (log.isDebugEnabled())
- log.debug("A node " + node.getQPath().getAsString() + " is IGNOREd");
+ if (LOG.isDebugEnabled())
+ LOG.debug("A node " + node.getQPath().getAsString() + " is IGNOREd");
// set context current parent to existed in restore set
parents.push((NodeData)contextState.getData());
@@ -153,9 +153,9 @@
else
{
// copy as IGNOREd parent child, i.e. OnParentVersionAction is any
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("A node " + node.getQPath().getAsString() + " is IGNOREd node descendant");
+ LOG.debug("A node " + node.getQPath().getAsString() + " is IGNOREd node descendant");
}
super.entering(node, level);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataCopyVisitor.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -41,7 +41,7 @@
public class ItemDataCopyVisitor extends DefaultItemDataCopyVisitor
{
- private Log log = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyVisitor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ItemDataCopyVisitor");
public ItemDataCopyVisitor(NodeData parent, InternalQName destNodeName, NodeTypeDataManager nodeTypeManager,
SessionDataManager srcDataManager, SessionDataManager dstDataManager, boolean keepIdentifiers)
@@ -151,9 +151,9 @@
.getIdentifier() : IdGenerator.generate(), -1, property.getType(), curParent().getIdentifier(), property
.isMultiValued(), values);
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("entering COPY " + newProperty.getQPath().getAsString() + "; pidentifier: "
+ LOG.debug("entering COPY " + newProperty.getQPath().getAsString() + "; pidentifier: "
+ newProperty.getParentIdentifier() + "; identifier: " + newProperty.getIdentifier());
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -56,7 +56,7 @@
public class VersionableWorkspaceDataManager extends ShareableSupportedWorkspaceDataManager
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.VersionableWorkspaceDataManager");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.VersionableWorkspaceDataManager");
private ShareableSupportedWorkspaceDataManager versionDataManager;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -37,7 +37,7 @@
{
Cache<?, ?> cache;
- private static final Log log = LogFactory.getLog("exo.jcr.component.core.DefaultEvictionActionPolicy");
+ private static final Log LOG = LogFactory.getLog("exo.jcr.component.core.DefaultEvictionActionPolicy");
public void setCache(Cache<?, ?> cache)
{
@@ -50,18 +50,18 @@
boolean result;
try
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Evicting Fqn " + fqn);
+ LOG.trace("Evicting Fqn " + fqn);
}
cache.evict(fqn);
result = true;
}
catch (Exception e)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Unable to evict " + fqn, e);
+ LOG.debug("Unable to evict " + fqn, e);
}
result = false;
}
@@ -84,9 +84,9 @@
// Check if not null, possibly this node was concurrently removed
if (node != null && !node.hasChildrenDirect())
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Evicting Fqn " + fqn);
+ LOG.trace("Evicting Fqn " + fqn);
}
cache.evict(parentFqn);
}
@@ -94,9 +94,9 @@
}
catch (IllegalStateException e)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Unable to evict " + fqn, e);
+ LOG.debug("Unable to evict " + fqn, e);
}
}
return result;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/ext/action/SessionActionInterceptor.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -51,7 +51,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.SessionActionInterceptor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SessionActionInterceptor");
private final ActionCatalog catalog;
@@ -498,7 +498,7 @@
}
catch (Exception e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerThread.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -33,7 +33,7 @@
/**
* Logger.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkerThread");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkerThread");
protected boolean stopped = false;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/GenericConnectionFactory.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/GenericConnectionFactory.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/GenericConnectionFactory.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -43,7 +43,7 @@
*/
public class GenericConnectionFactory implements WorkspaceStorageConnectionFactory
{
- protected final Log log = ExoLogger.getLogger("exo.jcr.component.core.GenericConnectionFactory");
+ protected static final Log log = ExoLogger.getLogger("exo.jcr.component.core.GenericConnectionFactory");
protected final DataSource dbDataSource;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableIOSupport.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -40,7 +40,7 @@
public class CASableIOSupport
{
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CASeableIOSupport");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.CASeableIOSupport");
public static final int HASHFILE_ORDERNUMBER = 0;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileIOChannel.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -49,7 +49,7 @@
/**
* Logger.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.FileIOChannel");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.FileIOChannel");
/**
* Temporary directory. Used for I/O transaction operations and locks.
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -40,7 +40,7 @@
public abstract class FileValueStorage extends ValueStoragePlugin
{
- private Log log = ExoLogger.getLogger("exo.jcr.component.core.FileValueStorage");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.FileValueStorage");
public final static String PATH = "path";
@@ -109,7 +109,7 @@
{
if (rootDir.mkdirs())
{
- log.info("Directory created: " + rootDir.getAbsolutePath());
+ LOG.info("Directory created: " + rootDir.getAbsolutePath());
// create internal temp dir
File tempDir = new File(rootDir, TEMP_DIR_NAME);
@@ -120,7 +120,7 @@
// care about storage temp dir cleanup
for (File tmpf : tempDir.listFiles())
if (!tmpf.delete())
- log.warn("Storage temporary directory contains un-deletable file " + tmpf.getAbsolutePath()
+ LOG.warn("Storage temporary directory contains un-deletable file " + tmpf.getAbsolutePath()
+ ". It's recommended to leave this directory for JCR External Values Storage private use.");
}
else
@@ -129,7 +129,7 @@
}
else
{
- log.warn("Directory IS NOT created: " + rootDir.getAbsolutePath());
+ LOG.warn("Directory IS NOT created: " + rootDir.getAbsolutePath());
}
}
else
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/StringConverter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -41,7 +41,7 @@
private static final int ENCODE_CHARS = 7;
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.StringConverter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.StringConverter");
private static class DNChar
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/SpoolFile.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -54,7 +54,7 @@
public class SpoolFile extends File
{
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.SpoolFile");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SpoolFile");
protected Map<Object, Long> users = new WeakHashMap<Object, Long>();
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/DBInitializer.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -62,7 +62,7 @@
static public String SQL_TRIGGERNAME = "(([A-Z_]+JCR_[A-Z_]+){1}(\\s*?|(\\(\\))*?)+)+?";
- protected final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.DBInitializer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.DBInitializer");
protected final Connection connection;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -76,7 +76,7 @@
/**
*
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.SystemViewImporter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.SystemViewImporter");
protected PropertyInfo propertyInfo = new PropertyInfo();
@@ -134,7 +134,7 @@
}
else
{
- log.debug("Wrong XML content. Element 'sv:value' expected,"
+ LOG.debug("Wrong XML content. Element 'sv:value' expected,"
+ " but SAX event 'characters' occured. characters:[" + new String(ch, start, length) + "]");
}
}
@@ -544,7 +544,7 @@
{
if (!((Boolean)context.get(ContentImporter.RESPECT_PROPERTY_DEFINITIONS_CONSTRAINTS)))
{
- log.warn("Property definition not found for " + propertyInfo.getName());
+ LOG.warn("Property definition not found for " + propertyInfo.getName());
return null;
}
else
@@ -569,7 +569,7 @@
+ propertyInfo.getName().getName());
}
}
- log.debug("Import " + propertyInfo.getName().getName() + " size=" + propertyInfo.getValuesSize()
+ LOG.debug("Import " + propertyInfo.getName().getName() + " size=" + propertyInfo.getValuesSize()
+ " isMultivalue=" + isMultivalue);
propertyData =
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceContentImporter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -52,7 +52,7 @@
/**
* Class logger.
*/
- protected final Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContentImporter");
+ protected final static Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceContentImporter");
/**
* The flag indicates whether a verified that the first element is the root.
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/WorkspaceDataImporter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -44,7 +44,7 @@
*/
public class WorkspaceDataImporter extends StreamImporter
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceDataImporter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.WorkspaceDataImporter");
public WorkspaceDataImporter(NodeData parent, int uuidBehavior, ItemDataKeeper dataKeeper,
ItemDataConsumer dataConsumer, NodeTypeDataManager ntManager, LocationFactory locationFactory,
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -42,7 +42,7 @@
/**
*
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.core.ImportNodeData");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ImportNodeData");
/**
*
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/PropertyInfo.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -37,7 +37,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.PropertyInfo");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.PropertyInfo");
/**
*
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -97,7 +97,7 @@
private ConfigurationManager configurationManager;
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.ExoJBossCacheFactory");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ExoJBossCacheFactory");
/**
* Creates ExoJbossCacheFactory with provided configuration transaction managers.
@@ -142,7 +142,7 @@
{
// get JBossCache configuration file path
String jBossCacheConfigurationPath = parameterEntry.getParameterValue(JBOSSCACHE_CONFIG);
- log.info("JBoss Cache configuration used: " + jBossCacheConfigurationPath);
+ LOG.info("JBoss Cache configuration used: " + jBossCacheConfigurationPath);
// prepare configuration
InputStream configStream;
@@ -194,7 +194,7 @@
// Create and inject multiplexer factory
CHANNEL_FACTORY.setMultiplexerConfig(configurationManager.getResource(jgroupsConfigurationFilePath));
cache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(CHANNEL_FACTORY);
- log.info("Multiplexer stack successfully enabled for the cache.");
+ LOG.info("Multiplexer stack successfully enabled for the cache.");
}
}
catch (Exception e)
@@ -213,7 +213,7 @@
{
cache.getConfiguration().setJgroupsConfigFile(
configurationManager.getResource(jgroupsConfigurationFilePath));
- log.info("Custom JGroups configuration set:"
+ LOG.info("Custom JGroups configuration set:"
+ configurationManager.getResource(jgroupsConfigurationFilePath));
}
catch (Exception e)
@@ -301,16 +301,16 @@
else
{
caches.put(key, cache);
- if (log.isInfoEnabled())
+ if (LOG.isInfoEnabled())
{
- log.info("A new JBoss Cache instance has been registered for the region " + rootFqn + ", a cache of type "
+ LOG.info("A new JBoss Cache instance has been registered for the region " + rootFqn + ", a cache of type "
+ cacheType + " and the container " + container.getContext().getName());
}
}
addEvictionRegion(rootFqn, cache, cfg);
- if (log.isInfoEnabled())
+ if (LOG.isInfoEnabled())
{
- log.info("The region " + rootFqn + " has been registered for a cache of type " + cacheType
+ LOG.info("The region " + rootFqn + " has been registered for a cache of type " + cacheType
+ " and the container " + container.getContext().getName());
}
return cache;
@@ -336,7 +336,7 @@
}
catch (IllegalArgumentException e)
{
- log.error("Could not create the JMX Manager", e);
+ LOG.error("Could not create the JMX Manager", e);
}
return null;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/observation/ExtendedEventType.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -34,7 +34,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.ExtendedEventType");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ExtendedEventType");
public static final String NODE_ADDED = "Node is added";
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/ActionNonTxAware.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -38,7 +38,7 @@
/**
* The logger
*/
- protected Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ActionNonTxAware");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.ActionNonTxAware");
/**
* Executes the action outside the context of the current tx
Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -58,7 +58,7 @@
*/
protected final Map<String, Indexer> indexers = new HashMap<String, Indexer>();
- protected static final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.IndexerCacheLoader");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.IndexerCacheLoader");
/**
* Executor used to remove all the entries that have already been treated. We
@@ -98,9 +98,9 @@
{
indexers.put(searchManager.getWsId(), new Indexer(searchManager, parentSearchManager, handler,
parentHandler));
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
+ LOG.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
}
}
@@ -111,9 +111,9 @@
{
if (entry.getKey() instanceof ChangesKey && entry.getValue() instanceof ChangesFilterListsWrapper)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.info("Received list wrapper, start indexing...");
+ LOG.info("Received list wrapper, start indexing...");
}
// updating index
ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)entry.getValue();
@@ -123,10 +123,10 @@
Indexer indexer = indexers.get(key.getWsId());
if (indexer == null)
{
- log.warn("No indexer could be found for the cache entry " + key.toString());
- if (log.isDebugEnabled())
+ LOG.warn("No indexer could be found for the cache entry " + key.toString());
+ if (LOG.isDebugEnabled())
{
- log.debug("The current content of the map of indexers is " + indexers);
+ LOG.debug("The current content of the map of indexers is " + indexers);
}
}
else if (wrapper.withChanges())
Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -153,7 +153,7 @@
coordinator = newActiveState;
getModeHandler().setMode(coordinator ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY);
- log.info("Set indexer io mode to:" + (coordinator ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
+ LOG.info("Set indexer io mode to:" + (coordinator ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
if (coordinator)
{
@@ -168,11 +168,11 @@
*/
protected void doPushState()
{
- final boolean debugEnabled = log.isDebugEnabled();
+ final boolean debugEnabled = LOG.isDebugEnabled();
if (debugEnabled)
{
- log.debug("start pushing in-memory state to cache cacheLoader collection");
+ LOG.debug("start pushing in-memory state to cache cacheLoader collection");
}
Map<String, ChangesFilterListsWrapper> changesMap = new HashMap<String, ChangesFilterListsWrapper>();
@@ -189,9 +189,9 @@
{
if (entry.getValue() instanceof ChangesFilterListsWrapper && entry.getKey() instanceof ChangesKey)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.info("Received list wrapper, start indexing...");
+ LOG.info("Received list wrapper, start indexing...");
}
// get stale List that was not processed
ChangesFilterListsWrapper staleListIncache = (ChangesFilterListsWrapper)entry.getValue();
@@ -232,7 +232,7 @@
if (debugEnabled)
{
- log.debug("in-memory state passed to cache cacheStore successfully");
+ LOG.debug("in-memory state passed to cache cacheStore successfully");
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -58,7 +58,8 @@
/**
* Logger instance for this class
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.LocalIndexChangesFilter");
+ private static final Log LOG = ExoLogger
+ .getLogger("exo.jcr.component.core.impl.infinispan.v5.LocalIndexChangesFilter");
public static final String PARAM_INFINISPAN_CACHESTORE_CLASS = "infinispan-cachestore-classname";
@@ -103,7 +104,7 @@
protected Log getLogger()
{
- return log;
+ return LOG;
}
protected void doUpdateIndex(ChangesFilterListsWrapper changes)
Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -46,7 +46,7 @@
public class RsyncIndexInfos extends ISPNIndexInfos
{
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.RsyncIndexInfos");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.RsyncIndexInfos");
private final String indexPath;
@@ -162,18 +162,18 @@
}
catch (IOException e)
{
- log.error("Failed to retrieve index using RSYNC", e);
+ LOG.error("Failed to retrieve index using RSYNC", e);
}
}
else
{
- log.error("Error triggering RSync synchronization, skipped. Unsupported Address object : "
+ LOG.error("Error triggering RSync synchronization, skipped. Unsupported Address object : "
+ jgAddress.getClass().getName());
}
}
else
{
- log.error("Error triggering RSync synchronization, skipped. Unsupported Address object : "
+ LOG.error("Error triggering RSync synchronization, skipped. Unsupported Address object : "
+ cacheManager.getCoordinator().getClass().getName());
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingWorkspaceSameConfigRestore.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -53,7 +53,7 @@
/**
* The logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.JobExistingWorkspaceSameConfigRestore");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobExistingWorkspaceSameConfigRestore");
/**
* JobExistingWorkspaceSameConfigRestore constructor.
@@ -159,7 +159,7 @@
}
catch (BackupException e)
{
- log.error("Can't rollback changes", e);
+ LOG.error("Can't rollback changes", e);
}
}
@@ -176,7 +176,7 @@
}
catch (BackupException e)
{
- log.error("Can't close restorer", e);
+ LOG.error("Can't close restorer", e);
}
}
@@ -189,7 +189,7 @@
}
catch (RepositoryException e)
{
- log.error("Can't resume component", e);
+ LOG.error("Can't resume component", e);
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -60,7 +60,7 @@
/**
* The apache logger.
*/
- protected static Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobRepositoryRestore");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobRepositoryRestore");
/**
* REPOSITORY_RESTORE_STARTED. The state of start restore.
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobWorkspaceRestore.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -51,7 +51,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.JobWorkspaceRestore");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobWorkspaceRestore");
/**
* RESTORE_STARTED. The state of start restore.
@@ -156,7 +156,7 @@
}
catch (Throwable t)
{
- log.error("The restore was fail", t);
+ LOG.error("The restore was fail", t);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -56,7 +56,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.PendingChangesLog");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.PendingChangesLog");
/**
* The definition of ChangesLog types.
@@ -428,15 +428,15 @@
}
catch (InterruptedException ie)
{
- log.error("The interrupted exceptio : ", ie);
+ LOG.error("The interrupted exceptio : ", ie);
}
catch (IndexOutOfBoundsException ioobe)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.info("listFixupStream.size() == " + listFixupStream.size());
- log.info("listRandomAccessFile.size() == " + listRandomAccessFile.size());
- log.info(" i == " + i);
+ LOG.info("listFixupStream.size() == " + listFixupStream.size());
+ LOG.info("listRandomAccessFile.size() == " + listRandomAccessFile.size());
+ LOG.info(" i == " + i);
}
synchronized (this)
{
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/RepositoryBackupChainImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -56,7 +56,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.RepositoryBackupChainImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.RepositoryBackupChainImpl");
private final RepositoryBackupConfig config;
@@ -146,10 +146,11 @@
{
if (state != FINISHED)
{
- if (log.isDebugEnabled()) {
+ if (LOG.isDebugEnabled())
+ {
for (BackupChain bc : workspaceBackups)
{
- log.debug(repositoryBackupId + " : " + getState(bc.getFullBackupState()));
+ LOG.debug(repositoryBackupId + " : " + getState(bc.getFullBackupState()));
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -42,7 +42,7 @@
public class FullBackupJob extends AbstractFullBackupJob
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
private String pathBackupFile;
@@ -70,12 +70,12 @@
}
catch (FileNotFoundException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
catch (IOException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
}
@@ -102,12 +102,12 @@
}
catch (RepositoryException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
catch (IOException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
@@ -118,7 +118,7 @@
public void stop()
{
- log.info("Stop requested " + getStorageURL().getPath());
+ LOG.info("Stop requested " + getStorageURL().getPath());
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -51,7 +51,7 @@
public class IncrementalBackupJob extends AbstractIncrementalBackupJob
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.IncrementalBackupJob");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.IncrementalBackupJob");
private ObjectOutputStream oosFileData;
@@ -77,12 +77,12 @@
}
catch (FileNotFoundException e)
{
- log.error("Incremental backup initialization failed ", e);
+ LOG.error("Incremental backup initialization failed ", e);
notifyError("Incremental backup initialization failed ", e);
}
catch (IOException e)
{
- log.error("Incremental backup initialization failed ", e);
+ LOG.error("Incremental backup initialization failed ", e);
notifyError("Incremental backup initialization failed ", e);
}
}
@@ -90,7 +90,7 @@
public void stop()
{
state = FINISHED;
- log.info("Stop requested " + getStorageURL().getPath());
+ LOG.info("Stop requested " + getStorageURL().getPath());
notifyListeners();
}
@@ -123,8 +123,8 @@
long total = System.currentTimeMillis() - start;
- if (log.isDebugEnabled())
- log.debug("Time : " + total + " ms" + " Itemstates count : " + changesLog.getAllStates().size());
+ if (LOG.isDebugEnabled())
+ LOG.debug("Time : " + total + " ms" + " Itemstates count : " + changesLog.getAllStates().size());
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/FullBackupJob.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -46,7 +46,7 @@
/**
* Logger.
*/
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.FullBackupJob");
/**
* {@inheritDoc}
@@ -77,12 +77,12 @@
}
catch (FileNotFoundException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
catch (IOException e)
{
- log.error("Full backup initialization failed ", e);
+ LOG.error("Full backup initialization failed ", e);
notifyError("Full backup initialization failed ", e);
}
}
@@ -109,12 +109,12 @@
}
catch (BackupException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
catch (RepositoryException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
finally
@@ -125,7 +125,7 @@
}
catch (RepositoryException e)
{
- log.error("Full backup failed " + getStorageURL().getPath(), e);
+ LOG.error("Full backup failed " + getStorageURL().getPath(), e);
notifyError("Full backup failed", e);
}
}
@@ -139,6 +139,6 @@
*/
public void stop()
{
- log.info("Stop requested " + getStorageURL().getPath());
+ LOG.info("Stop requested " + getStorageURL().getPath());
}
}
\ No newline at end of file
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -256,7 +256,7 @@
/**
* The apache logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.HTTPBackupAgent");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.HTTPBackupAgent");
/**
* To disable cache control.
@@ -302,7 +302,7 @@
this.backupManager = (ExtendedBackupManager) backupManager;
this.sessionProviderService = sessionProviderService;
- log.info("HTTPBackupAgent inited");
+ LOG.info("HTTPBackupAgent inited");
}
/**
@@ -411,7 +411,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start backup", exception);
+ LOG.error("Can not start backup", exception);
return Response.status(status).entity("Can not start backup : " + failMessage).type(MediaType.TEXT_PLAIN)
.cacheControl(noCache).build();
@@ -505,7 +505,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start backup", exception);
+ LOG.error("Can not start backup", exception);
return Response.status(status).entity("Can not start backup : " + failMessage).type(MediaType.TEXT_PLAIN)
.cacheControl(noCache).build();
@@ -567,7 +567,7 @@
failMessage = e.getMessage();
}
- log.error("Can not drop the workspace '" + "/" + repository + "/" + workspace + "'", exception);
+ LOG.error("Can not drop the workspace '" + "/" + repository + "/" + workspace + "'", exception);
return Response.status(status).entity(
"Can not drop the workspace '" + "/" + repository + "/" + workspace + "' : " + failMessage).type(
@@ -680,7 +680,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup log with id '" + backupId + "'", exception);
return Response.status(status).entity(
@@ -814,7 +814,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup log with id '" + backupId + "'", exception);
return Response.status(status).entity(
@@ -856,7 +856,7 @@
}
catch (UnsupportedEncodingException e)
{
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup set '" + backupSetPath + "'", e);
return Response.status(Response.Status.BAD_REQUEST).entity(
@@ -983,7 +983,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + wEntry.getName()
+ "' from backup set '" + backupSetPath + "'", exception);
return Response.status(status).entity(
@@ -1134,7 +1134,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ "' from backup log with id '" + backupId + "'", exception);
return Response.status(status).entity(
@@ -1171,7 +1171,7 @@
}
catch (UnsupportedEncodingException e)
{
- log.error("Can not start restore from backup set '" + backupSetPathEncoded + "'", e);
+ LOG.error("Can not start restore from backup set '" + backupSetPathEncoded + "'", e);
return Response.status(Response.Status.BAD_REQUEST).entity(
"Can not start restore from backup set '" + backupSetPathEncoded + "' : " + e.getMessage()).type(
@@ -1235,7 +1235,7 @@
{
if (exception != null)
{
- log.error("Can not start restore from backup set '" + backupSetPath + "'", exception);
+ LOG.error("Can not start restore from backup set '" + backupSetPath + "'", exception);
return Response.status(status).entity(
"Can not start restore from backup set '" + backupSetPath + "' : " + failMessage).type(
@@ -1344,7 +1344,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ LOG.error("Can not start restore the workspace '" + "/" + repository + "/" + workspace
+ "' from backup set \"" + backupSetPath + "\"", exception);
return Response.status(status).entity(
@@ -1419,7 +1419,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + repository + "' from backup set '" + backupSetPath
+ LOG.error("Can not start restore the repository '" + "/" + repository + "' from backup set '" + backupSetPath
+ "'", exception);
return Response.status(status).entity(
@@ -1513,7 +1513,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ backupId + "'", exception);
return Response.status(status).entity(
@@ -1621,7 +1621,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup log with id '"
+ backupId + "'", exception);
return Response.status(status).entity(
@@ -1663,7 +1663,7 @@
}
catch (UnsupportedEncodingException e)
{
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ backupSetPath + "'", e);
return Response.status(Response.Status.BAD_REQUEST).entity(
@@ -1759,7 +1759,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ LOG.error("Can not start restore the repository '" + "/" + rEntry.getName() + "' from backup set '"
+ backupSetPath + "'", exception);
return Response.status(status).entity(
@@ -1867,7 +1867,7 @@
failMessage = e.getMessage();
}
- log.error("Can not start restore the repository '" + "/" + repository + "' from backup log with id '"
+ LOG.error("Can not start restore the repository '" + "/" + repository + "' from backup log with id '"
+ backupId + "'", exception);
return Response.status(status).entity(
@@ -1927,7 +1927,7 @@
failMessage = e.getMessage();
}
- log.error("Can not stop backup", exception);
+ LOG.error("Can not stop backup", exception);
return Response.status(status).entity("Can not stop backup : " + failMessage).type(MediaType.TEXT_PLAIN)
.cacheControl(noCache).build();
@@ -1985,7 +1985,7 @@
failMessage = e.getMessage();
}
- log.error("Can not stop repository backup ", exception);
+ LOG.error("Can not stop repository backup ", exception);
return Response.status(status).entity("Can not stop repository backup : " + failMessage).type(
MediaType.TEXT_PLAIN).cacheControl(noCache).build();
@@ -2013,7 +2013,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about backup service", e);
+ LOG.error("Can not get information about backup service", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about backup service : " + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2049,7 +2049,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backups", e);
+ LOG.error("Can not get information about current or completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2085,7 +2085,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed reposioty backups", e);
+ LOG.error("Can not get information about current or completed reposioty backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed repository backups" + e.getMessage()).type(
@@ -2133,7 +2133,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backup with 'id' " + id, e);
+ LOG.error("Can not get information about current or completed backup with 'id' " + id, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed backup with 'id' " + id + " : " + e.getMessage()).type(
@@ -2182,7 +2182,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed repository backup with 'id' " + id, e);
+ LOG.error("Can not get information about current or completed repository backup with 'id' " + id, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed repository backup with 'id' " + id + " : "
@@ -2214,7 +2214,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current backups", e);
+ LOG.error("Can not get information about current backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current backups" + e.getMessage()).type(MediaType.TEXT_PLAIN).cacheControl(
@@ -2246,7 +2246,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current repositorty backups", e);
+ LOG.error("Can not get information about current repositorty backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current backups" + e.getMessage()).type(MediaType.TEXT_PLAIN).cacheControl(
@@ -2279,7 +2279,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about completed backups", e);
+ LOG.error("Can not get information about completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2312,7 +2312,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about completed backups", e);
+ LOG.error("Can not get information about completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2366,7 +2366,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed backups", e);
+ LOG.error("Can not get information about current or completed backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed backups" + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2416,7 +2416,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current or completed repository backups", e);
+ LOG.error("Can not get information about current or completed repository backups", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current or completed repository backups" + e.getMessage()).type(
@@ -2466,7 +2466,7 @@
}
catch (Throwable e)
{
- log.error(
+ LOG.error(
"Can not get information about current restore for workspace /" + repository + "/" + workspace + "'", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
@@ -2515,7 +2515,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current restore for repository /" + repository + "'", e);
+ LOG.error("Can not get information about current restore for repository /" + repository + "'", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current restore for repository /" + repository + "' : " + e.getMessage())
@@ -2571,7 +2571,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current restores.", e);
+ LOG.error("Can not get information about current restores.", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current restores : " + e.getMessage()).type(MediaType.TEXT_PLAIN)
@@ -2625,7 +2625,7 @@
}
catch (Throwable e)
{
- log.error("Can not get information about current repository restores.", e);
+ LOG.error("Can not get information about current repository restores.", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"Can not get information about current repository restores : " + e.getMessage()).type(MediaType.TEXT_PLAIN)
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -44,7 +44,7 @@
*/
public class NewGroupListener extends GroupEventListener
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.NewGroupListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NewGroupListener");
private static final String GROUPS_PATH = "groupsPath";
@@ -122,7 +122,7 @@
}
catch (RepositoryException e)
{
- log.error("An error occurs while removing the group directory of '" + groupId + "'", e);
+ LOG.error("An error occurs while removing the group directory of '" + groupId + "'", e);
}
finally
{
@@ -153,7 +153,7 @@
}
catch (Exception e)
{
- log.error("An error occurs while initializing the group directory of '" + groupId + "'", e);
+ LOG.error("An error occurs while initializing the group directory of '" + groupId + "'", e);
}
finally
{
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -43,7 +43,7 @@
*/
public class NewUserListener extends UserEventListener
{
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.NewUserListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NewUserListener");
private final HierarchyConfig config_;
@@ -86,7 +86,7 @@
}
catch (Exception e)
{
- log.error("An error occurs while initializing the user directory of '" + userName + "'", e);
+ LOG.error("An error occurs while initializing the user directory of '" + userName + "'", e);
}
finally
{
@@ -106,7 +106,7 @@
}
catch (Exception e)
{
- log.error("An error occurs while removing the user directory of '" + user.getUserName() + "'", e);
+ LOG.error("An error occurs while removing the user directory of '" + user.getUserName() + "'", e);
}
finally
{
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -68,7 +68,7 @@
/**
* Logger.
*/
- private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.RESTRegistryService");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.RESTRegistryService");
/**
*
@@ -136,7 +136,7 @@
}
catch (Exception e)
{
- log.error("Get registry failed", e);
+ LOG.error("Get registry failed", e);
throw new WebApplicationException(e);
}
}
@@ -160,7 +160,7 @@
}
catch (RepositoryException e)
{
- log.error("Get registry entry failed", e);
+ LOG.error("Get registry entry failed", e);
throw new WebApplicationException(e);
}
}
@@ -181,27 +181,27 @@
}
catch (IllegalArgumentException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (IOException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (SAXException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (ParserConfigurationException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (RepositoryException e)
{
- log.error("Create registry entry failed", e);
+ LOG.error("Create registry entry failed", e);
throw new WebApplicationException(e);
}
}
@@ -230,27 +230,27 @@
}
catch (IllegalArgumentException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (IOException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (SAXException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (ParserConfigurationException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
catch (RepositoryException e)
{
- log.error("Re-create registry entry failed", e);
+ LOG.error("Re-create registry entry failed", e);
throw new WebApplicationException(e);
}
}
@@ -272,7 +272,7 @@
}
catch (Exception e)
{
- log.error("Remove registry entry failed", e);
+ LOG.error("Remove registry entry failed", e);
throw new WebApplicationException(e);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RegistryInitializationEntryPlugin.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -39,7 +39,7 @@
/**
* Class logger.
*/
- private final Log log = ExoLogger.getLogger("exo.jcr.component.ext.RegistryInitializationEntryPlugin");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.RegistryInitializationEntryPlugin");
private HashMap<String, String> appConfiguration = new HashMap<String, String>();
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentationFactory.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -37,7 +37,7 @@
/**
* Logger.
*/
- private static Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NtFileNodeRepresentationFactory");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.NtFileNodeRepresentationFactory");
protected NodeRepresentationService nodeRepresentationService;
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -54,7 +54,7 @@
public class FtpServerImpl implements FtpServer
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServerImpl");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServerImpl");
public static final String COMMAND_PATH = "/conf/ftp-commands.xml";
@@ -96,14 +96,14 @@
if (!PrivilegedFileHelper.exists(cacheFolder))
{
- log.info("Cache folder not exist. Try to create it...");
+ LOG.info("Cache folder not exist. Try to create it...");
PrivilegedFileHelper.mkdirs(cacheFolder);
}
String[] cacheFiles = PrivilegedFileHelper.list(cacheFolder);
if (cacheFiles == null)
{
- log.info("No cache file in cache folder!");
+ LOG.info("No cache file in cache folder!");
return;
}
@@ -132,11 +132,11 @@
try
{
serverSocket = new ServerSocket(port);
- log.info("FTPServer started on port '" + port + "'");
+ LOG.info("FTPServer started on port '" + port + "'");
}
catch (BindException e)
{
- log.warn("Cannot launch the FTPServer on '" + (port++) + "', we try the next port number");
+ LOG.warn("Cannot launch the FTPServer on '" + (port++) + "', we try the next port number");
}
}
@@ -149,7 +149,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
return false;
@@ -174,11 +174,11 @@
}
catch (RepositoryException e)
{
- log.info("Repository exception. " + e.getMessage(), e);
+ LOG.info("Repository exception. " + e.getMessage(), e);
}
catch (RepositoryConfigurationException e)
{
- log.info("Repository configuration exception. " + e.getMessage(), e);
+ LOG.info("Repository configuration exception. " + e.getMessage(), e);
}
return null;
@@ -197,7 +197,7 @@
public boolean unRegisterClient(FtpClientSession clientSession)
{
boolean result = clients.remove(clientSession);
- log.info(">>> Client disconnected. Clients: " + clients.size());
+ LOG.info(">>> Client disconnected. Clients: " + clients.size());
return result;
}
@@ -249,11 +249,11 @@
FtpClientSession clientSession = new FtpClientSessionImpl(ftpServer, incoming);
clients.add(clientSession);
- log.info(">>> New client connected. Clients: " + clients.size());
+ LOG.info(">>> New client connected. Clients: " + clients.size());
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServiceImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -37,7 +37,7 @@
public class FtpServiceImpl implements FtpService, Startable
{
- private Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServiceImpl");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpServiceImpl");
private CommandService commandService = null;
@@ -58,7 +58,7 @@
public void start()
{
- log.info("Start service.");
+ LOG.info("Start service.");
try
{
ftpServer = new FtpServerImpl(config, commandService, repositoryService);
@@ -66,17 +66,17 @@
}
catch (Exception e)
{
- log.info("Unhandled exception. could not get repository!!!! " + e.getMessage(), e);
+ LOG.info("Unhandled exception. could not get repository!!!! " + e.getMessage(), e);
}
}
public void stop()
{
- log.info("Stopping...");
+ LOG.info("Stopping...");
if (ftpServer != null)
ftpServer.stop();
else
- log.warn("Service isn't started");
+ LOG.warn("Service isn't started");
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpTextUtils.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -30,7 +30,7 @@
public class FtpTextUtils
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpTextUtils");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpTextUtils");
public static String getStrached(String strVal, int reqLen)
{
@@ -52,7 +52,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
StringBuilder resStr = new StringBuilder();
for (int i = 0; i < reqLen; i++)
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientCommandThread.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -38,7 +38,7 @@
public class FtpClientCommandThread extends Thread
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientCommandThread");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientCommandThread");
protected FtpClientSession clientSession;
@@ -54,9 +54,9 @@
if (container == null)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("No Portal Container found.");
+ LOG.debug("No Portal Container found.");
}
container = ExoContainerContext.getTopContainer();
}
@@ -116,7 +116,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
break;
}
}
@@ -127,7 +127,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
}
finally
@@ -171,16 +171,16 @@
String encoding = clientSession.getFtpServer().getConfiguration().getClientSideEncoding();
String readyCommand = new String(commandLine, encoding);
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("FTP_CMD:[" + readyCommand + "]");
+ LOG.debug("FTP_CMD:[" + readyCommand + "]");
}
return readyCommand;
}
catch (Exception exc)
{
- log.info("Unahdled exception. " + exc.getMessage(), exc);
+ LOG.info("Unahdled exception. " + exc.getMessage(), exc);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/client/FtpClientSessionImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -54,7 +54,7 @@
public class FtpClientSessionImpl implements FtpClientSession
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientSessionImpl");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpClientSessionImpl");
private FtpServer ftpServer;
@@ -131,7 +131,7 @@
}
catch (UnsupportedEncodingException eexc)
{
- log.info("Unsupported encoding exception. See for CLIENT-SIDE-ENCODING parameter. " + eexc.getMessage(), eexc);
+ LOG.info("Unsupported encoding exception. See for CLIENT-SIDE-ENCODING parameter. " + eexc.getMessage(), eexc);
byte[] data = replyString.getBytes();
clientSocket.getOutputStream().write(data);
// outPrintStream.println(replyString);
@@ -176,7 +176,7 @@
}
catch (IOException exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
getFtpServer().unRegisterClient(this);
@@ -370,7 +370,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
return FtpConst.Replyes.REPLY_550;
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdCdUp.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -33,7 +33,7 @@
public class CmdCdUp extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "CmdCdUp");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "CmdCdUp");
public CmdCdUp()
{
@@ -49,7 +49,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
reply(String.format(FtpConst.Replyes.REPLY_550, FtpConst.Commands.CMD_CDUP));
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowInputStream.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -34,7 +34,7 @@
public class FtpSlowInputStream extends InputStream
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowInputStream");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowInputStream");
private InputStream nativeInputStream;
@@ -58,7 +58,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
}
readed = 0;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpSlowOutputStream.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -34,7 +34,7 @@
public class FtpSlowOutputStream extends OutputStream
{
- private static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowOutputStream");
+ private static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpSlowOutputStream");
private OutputStream nativeOutputStream;
@@ -58,7 +58,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
writed = 0;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/listcode/FtpFileInfoImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -38,7 +38,7 @@
public class FtpFileInfoImpl implements FtpFileInfo
{
- protected static Log log = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpFileInfoImpl");
+ protected static final Log LOG = ExoLogger.getLogger(FtpConst.FTP_PREFIX + "FtpFileInfoImpl");
protected String _name = "";
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -58,7 +58,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger(AclCommand.class);
+ private static final Log LOG = ExoLogger.getLogger(AclCommand.class);
/**
* Applies changes for JCR node's {@link AccessControlList}
@@ -121,22 +121,22 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.INTERNAL_ERROR).entity(exc.getMessage()).build();
}
catch (AccessControlException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.FORBIDDEN).entity(exc.getMessage()).build();
}
catch (IllegalArgumentException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.BAD_REQUEST).entity(exc.getMessage()).build();
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.status(HTTPStatus.BAD_REQUEST).build();
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -73,7 +73,7 @@
/**
* Logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.GetCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.GetCommand");
private Map<String, String> xsltParams;
@@ -236,12 +236,12 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/HeadCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -49,7 +49,7 @@
/**
* Logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.HeadCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.HeadCommand");
/**
* Webdav Head method implementation.
@@ -88,7 +88,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/LockCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -61,7 +61,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.LockCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.LockCommand");
/**
* Resource locks holder.
@@ -157,7 +157,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
@@ -248,7 +248,7 @@
}
catch (Exception e)
{
- log.error(e.getMessage(), e);
+ LOG.error(e.getMessage(), e);
throw new IOException(e.getMessage());
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/OrderPatchCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -53,7 +53,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchCommand");
/**
* Constructor.
@@ -100,7 +100,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
@@ -214,7 +214,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
status = HTTPStatus.INTERNAL_ERROR;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -64,7 +64,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindCommand");
/**
* Webdav Propfind method implementation.
@@ -89,7 +89,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
@@ -136,17 +136,17 @@
}
catch (RepositoryException e1)
{
- log.error(e1.getMessage(), e1);
+ LOG.error(e1.getMessage(), e1);
return Response.serverError().build();
}
catch (URISyntaxException e1)
{
- log.error(e1.getMessage(), e1);
+ LOG.error(e1.getMessage(), e1);
return Response.serverError().build();
}
catch (IllegalResourceTypeException e1)
{
- log.error(e1.getMessage(), e1);
+ LOG.error(e1.getMessage(), e1);
return Response.serverError().build();
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/SearchCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -46,7 +46,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.SearchCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.SearchCommand");
/**
* Webdav search method implementation.
@@ -84,7 +84,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -60,7 +60,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.SearchResultResponseEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.SearchResultResponseEntity");
/**
* Namespace conetext.
@@ -192,7 +192,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/CheckOutCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -45,7 +45,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.CheckOutCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.CheckOutCommand");
/**
* Webdav CheckOut comand implementation.
@@ -79,7 +79,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/ReportCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -55,7 +55,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.ReportCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.ReportCommand");
/**
* Webdav Report method implementation.
@@ -104,12 +104,12 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/UnCheckOutCommand.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -46,7 +46,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.UnCheckOutCommand");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.UnCheckOutCommand");
/**
* Webdav Uncheckout method implementation.
@@ -85,7 +85,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return Response.serverError().entity(exc.getMessage()).build();
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/lock/LockRequestEntity.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -38,7 +38,7 @@
/**
* logger.
*/
- private Log log = ExoLogger.getLogger("exo.jcr.component.webdav.LockRequestEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.LockRequestEntity");
/**
* Lock scope.
@@ -77,7 +77,7 @@
if (!scope.equals(PropertyConstants.EXCLUSIVE))
{
// should we throw PreconditionException here?
- log.warn("Lock is converted to exclusive scope, requested " + scope.getLocalPart());
+ LOG.warn("Lock is converted to exclusive scope, requested " + scope.getLocalPart());
}
lockScope = PropertyConstants.EXCLUSIVE;
}
@@ -87,7 +87,7 @@
if (!type.equals(PropertyConstants.WRITE))
{
// should we throw PreconditionException here?
- log.warn("Lock is converted to exclusive scope, requested " + type.getLocalPart());
+ LOG.warn("Lock is converted to exclusive scope, requested " + type.getLocalPart());
}
lockScope = PropertyConstants.WRITE;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/order/OrderPatchResponseEntity.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -48,7 +48,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchResponseEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.OrderPatchResponseEntity");
/**
* Namespace context.
@@ -127,7 +127,7 @@
}
catch (Exception exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException();
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -55,7 +55,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindResponseEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.PropFindResponseEntity");
/**
* XML writer.
@@ -149,22 +149,22 @@
}
catch (XMLStreamException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
catch (IllegalResourceTypeException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
catch (URISyntaxException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException(exc.getMessage());
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -50,7 +50,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.LnkProducer");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.LnkProducer");
/**
* Default constructor.
@@ -88,7 +88,7 @@
}
catch (IOException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new WebApplicationException(exc);
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/ResourceUtil.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -44,7 +44,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.ResourceUtil");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.ResourceUtil");
/**
* If the node is file.
@@ -64,7 +64,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return false;
}
}
@@ -85,7 +85,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return false;
}
}
@@ -106,7 +106,7 @@
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
return false;
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/MultipartByterangesEntity.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -45,7 +45,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.MultipartByterangesEntity");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.MultipartByterangesEntity");
/**
* resource.
@@ -123,12 +123,12 @@
}
catch (IOException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException("Can't write to stream, caused " + exc);
}
catch (RepositoryException exc)
{
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
throw new IOException("Can't write to stream, caused " + exc);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -54,7 +54,7 @@
/**
* logger.
*/
- private static Log log = ExoLogger.getLogger("exo.jcr.component.webdav.PropstatGroupedRepresentation");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.webdav.PropstatGroupedRepresentation");
/**
* properties statuses.
@@ -163,7 +163,7 @@
catch (AccessDeniedException exc)
{
statname = WebDavConst.getStatusDescription(HTTPStatus.FORBIDDEN);
- log.error(exc.getMessage(), exc);
+ LOG.error(exc.getMessage(), exc);
}
catch (ItemNotFoundException exc)
{
Modified: jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/cli/CliAppContext.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -56,7 +56,7 @@
}
catch (Exception e)
{
- log.error("GetUserName error: " + e);
+ LOG.error("GetUserName error: " + e);
return "Undefined";
}
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/BasicAppContext.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -41,7 +41,7 @@
public class BasicAppContext extends ContextBase implements JCRAppContext
{
- protected static Log log = ExoLogger.getLogger("exo.jcr.framework.command.BasicAppContext");
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.BasicAppContext");
protected final SessionProvider sessionProvider;
Modified: jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.command/src/main/java/org/exoplatform/frameworks/jcr/command/web/GenericWebAppContext.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -48,7 +48,7 @@
public static final String JCR_CONTENT_MAPPING = "org.exoplatform.frameworks.web.repositoryMapping";
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.JCRWebAppContext");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.JCRWebAppContext");
protected final SessionProvider sessionProvider;
@@ -72,7 +72,7 @@
{
String name = (String)en.nextElement();
put(name, servletContext.getInitParameter(name));
- log.debug("ServletContext init param: " + name + "=" + servletContext.getInitParameter(name));
+ LOG.debug("ServletContext init param: " + name + "=" + servletContext.getInitParameter(name));
}
en = servletContext.getAttributeNames();
@@ -80,7 +80,7 @@
{
String name = (String)en.nextElement();
put(name, servletContext.getAttribute(name));
- log.debug("ServletContext: " + name + "=" + servletContext.getAttribute(name));
+ LOG.debug("ServletContext: " + name + "=" + servletContext.getAttribute(name));
}
HttpSession session = request.getSession(false);
@@ -91,7 +91,7 @@
{
String name = (String)en.nextElement();
put(name, session.getAttribute(name));
- log.debug("Session: " + name + "=" + session.getAttribute(name));
+ LOG.debug("Session: " + name + "=" + session.getAttribute(name));
}
}
@@ -107,7 +107,7 @@
{
String name = (String)en.nextElement();
put(name, request.getParameter(name));
- log.debug("Request: " + name + "=" + request.getParameter(name));
+ LOG.debug("Request: " + name + "=" + request.getParameter(name));
}
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/client/FtpClientSessionImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -41,7 +41,7 @@
public class FtpClientSessionImpl implements FtpClientSession
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpClientSessionImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpClientSessionImpl");
protected String host;
@@ -112,7 +112,7 @@
// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> sleeping.........");
}
- log.info("unhandled exception. " + prevExc.getMessage(), prevExc);
+ LOG.info("unhandled exception. " + prevExc.getMessage(), prevExc);
return false;
}
@@ -137,7 +137,7 @@
}
catch (IOException exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCdUp.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdCdUp extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdCdUp");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdCdUp");
public int execute()
{
@@ -43,7 +43,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdCwd.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdCwd extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdCwd");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdCwd");
protected String path;
@@ -50,7 +50,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdList.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -37,7 +37,7 @@
public class CmdList extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdList");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdList");
protected String path = "";
@@ -115,7 +115,7 @@
}
catch (Exception exc)
{
- log.info("CAN'T PARSE FILE LINE: [" + lines[i] + "]");
+ LOG.info("CAN'T PARSE FILE LINE: [" + lines[i] + "]");
}
}
reply = getReply();
@@ -124,7 +124,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdMode.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -31,7 +31,7 @@
public class CmdMode extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdMode");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdMode");
private String mode;
@@ -49,7 +49,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNlst.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -35,7 +35,7 @@
public class CmdNlst extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdNlst");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdNlst");
protected String path = "";
@@ -106,7 +106,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdNoop.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdNoop extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdNoop");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdNoop");
public int execute()
{
@@ -43,7 +43,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPass.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdPass extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdPass");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdPass");
protected String pass;
@@ -50,7 +50,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPasv.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -34,7 +34,7 @@
public class CmdPasv extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdPasv");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdPasv");
protected String host = "";
@@ -78,9 +78,9 @@
}
catch (Exception exc)
{
- log.info("unhandled ecxeption. " + exc.getMessage(), exc);
+ LOG.info("unhandled ecxeption. " + exc.getMessage(), exc);
}
- log.info("SOME ERRORS");
+ LOG.info("SOME ERRORS");
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdPort.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdPort extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdPort");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdPort");
protected String host;
@@ -62,7 +62,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRest.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdRest extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdRest");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdRest");
protected String offset;
@@ -62,7 +62,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnFr.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdRnFr extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnFr");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnFr");
protected String path;
@@ -57,7 +57,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdRnTo.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdRnTo extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnTo");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdRnTo");
protected String path;
@@ -57,7 +57,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStat.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -31,7 +31,7 @@
public class CmdStat extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdStat");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdStat");
public int execute()
{
@@ -42,7 +42,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStor.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -33,7 +33,7 @@
public class CmdStor extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdStor");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdStor");
protected String path;
@@ -89,7 +89,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdStru.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -31,7 +31,7 @@
public class CmdStru extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdStru");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdStru");
private String structureType;
@@ -49,7 +49,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/CmdUser.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -32,7 +32,7 @@
public class CmdUser extends FtpCommandImpl
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.CmdUser");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.CmdUser");
protected String userName;
@@ -50,7 +50,7 @@
}
catch (Exception exc)
{
- log.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
+ LOG.info(FtpConst.EXC_MSG + exc.getMessage(), exc);
}
return -1;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/commands/FtpCommandImpl.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -36,7 +36,7 @@
public abstract class FtpCommandImpl implements FtpCommand
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpCommandImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpCommandImpl");
protected FtpClientSession clientSession;
@@ -59,7 +59,7 @@
public void sendCommand(String command)
{
- log.info(">>> " + command);
+ LOG.info(">>> " + command);
try
{
@@ -70,7 +70,7 @@
}
catch (IOException exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
}
@@ -92,7 +92,7 @@
public int getReply() throws Exception
{
- log.info("try get reply..........");
+ LOG.info("try get reply..........");
StringBuilder reply = new StringBuilder();
String curReply = "";
@@ -122,7 +122,7 @@
descript = reply.toString();
replyCode = FtpUtils.getReplyCode(curReply);
- log.info("<<< " + descript);
+ LOG.info("<<< " + descript);
return replyCode;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowInputStream1.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -27,7 +27,7 @@
public class FtpSlowInputStream1 extends InputStream
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowInputStream");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowInputStream");
protected InputStream nativeInputStream;
@@ -54,7 +54,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception until Thread.sleep(...). " + exc.getMessage(), exc);
}
readed = 0;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.ftpclient/src/main/java/org/exoplatform/frameworks/ftpclient/data/FtpSlowOutputStream.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -27,7 +27,7 @@
public class FtpSlowOutputStream extends OutputStream
{
- private static Log log = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowOutputStream");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.FtpSlowOutputStream");
private OutputStream nativeOutputStream;
@@ -55,7 +55,7 @@
}
catch (Exception exc)
{
- log.info("Unhandled exception. " + exc.getMessage(), exc);
+ LOG.info("Unhandled exception. " + exc.getMessage(), exc);
}
writed = 0;
}
Modified: jcr/branches/1.15.x/exo.jcr.framework.web/src/main/java/org/exoplatform/frameworks/jcr/web/ThreadLocalSessionProviderInitializedFilter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.web/src/main/java/org/exoplatform/frameworks/jcr/web/ThreadLocalSessionProviderInitializedFilter.java 2012-02-14 14:20:26 UTC (rev 5631)
+++ jcr/branches/1.15.x/exo.jcr.framework.web/src/main/java/org/exoplatform/frameworks/jcr/web/ThreadLocalSessionProviderInitializedFilter.java 2012-02-14 14:40:01 UTC (rev 5632)
@@ -54,7 +54,7 @@
private SessionProviderService providerService;
- private static final Log log = ExoLogger.getLogger("exo.jcr.framework.command.ThreadLocalSessionProviderInitializedFilter");
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.framework.command.ThreadLocalSessionProviderInitializedFilter");
/*
* (non-Javadoc)
@@ -80,9 +80,9 @@
HttpSession httpSession = httpRequest.getSession(false);
if (state == null)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Current conversation state is not set");
+ LOG.debug("Current conversation state is not set");
}
if (httpSession != null)
@@ -94,9 +94,9 @@
{
provider = new SessionProvider(state);
}
- else if (log.isDebugEnabled())
+ else if (LOG.isDebugEnabled())
{
- log.debug("WARN: Conversation State is null, id " + httpSession.getId());
+ LOG.debug("WARN: Conversation State is null, id " + httpSession.getId());
}
}
}
@@ -107,9 +107,9 @@
if (provider == null)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Create SessionProvider for anonymous.");
+ LOG.debug("Create SessionProvider for anonymous.");
}
provider = SessionProvider.createAnonimProvider();
}
@@ -135,7 +135,7 @@
}
catch (Exception e)
{
- log.warn("An error occured while removing the session provider from the conversation state", e);
+ LOG.warn("An error occured while removing the session provider from the conversation state", e);
}
}
if (providerService.getSessionProvider(null) != null)
@@ -147,7 +147,7 @@
}
catch (Exception e)
{
- log.warn("An error occured while cleaning the ThreadLocal", e);
+ LOG.warn("An error occured while cleaning the ThreadLocal", e);
}
}
}
12 years, 4 months
exo-jcr SVN: r5631 - in ws/branches/2.3.x: exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy and 1 other directory.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-14 09:20:26 -0500 (Tue, 14 Feb 2012)
New Revision: 5631
Modified:
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java
ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java
ws/branches/2.3.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -49,7 +49,7 @@
class ContentEncodingModule implements HTTPClientModule
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.ContentEncodingModule");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.ContentEncodingModule");
// Methods
@@ -170,8 +170,8 @@
String encoding = ((HttpHeaderElement)pce.firstElement()).getName();
if (encoding.equalsIgnoreCase("gzip") || encoding.equalsIgnoreCase("x-gzip"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing gzip-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing gzip-input-stream");
resp.inp_stream = new GZIPInputStream(resp.inp_stream);
pce.removeElementAt(pce.size() - 1);
@@ -179,8 +179,8 @@
}
else if (encoding.equalsIgnoreCase("deflate"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing inflater-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing inflater-input-stream");
resp.inp_stream = new InflaterInputStream(resp.inp_stream);
pce.removeElementAt(pce.size() - 1);
@@ -188,8 +188,8 @@
}
else if (encoding.equalsIgnoreCase("compress") || encoding.equalsIgnoreCase("x-compress"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing uncompress-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing uncompress-input-stream");
resp.inp_stream = new UncompressInputStream(resp.inp_stream);
pce.removeElementAt(pce.size() - 1);
@@ -197,15 +197,15 @@
}
else if (encoding.equalsIgnoreCase("identity"))
{
- if (log.isDebugEnabled())
- log.debug("Ignoring 'identity' token");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Ignoring 'identity' token");
pce.removeElementAt(pce.size() - 1);
}
else
{
- if (log.isDebugEnabled())
- log.debug("Unknown content encoding '" + encoding + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Unknown content encoding '" + encoding + "'");
}
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -50,7 +50,7 @@
class ContentMD5Module implements HTTPClientModule
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.ContentMD5Module");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.ContentMD5Module");
// Constructors
@@ -107,12 +107,12 @@
if ((md5_digest == null && !md5_tok) || resp.getHeader("Transfer-Encoding") != null)
return;
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
if (md5_digest != null)
- log.debug("Received digest: " + md5_digest + " - pushing md5-check-stream");
+ LOG.debug("Received digest: " + md5_digest + " - pushing md5-check-stream");
else
- log.debug("Expecting digest in trailer " + " - pushing md5-check-stream");
+ LOG.debug("Expecting digest in trailer " + " - pushing md5-check-stream");
}
resp.inp_stream = new MD5InputStream(resp.inp_stream, new VerifyMD5(resp));
}
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -70,7 +70,7 @@
/** Make this compatible with V0.3-2 */
private static final long serialVersionUID = 8599975325569296615L;
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.Cookie");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.Cookie");
protected String name;
@@ -304,8 +304,8 @@
cookie_arr = Util.resizeArray(cookie_arr, cookie_arr.length + 1);
cookie_arr[cookie_arr.length - 1] = curr;
}
- else if (log.isDebugEnabled())
- log.debug("Ignoring cookie: " + curr);
+ else if (LOG.isDebugEnabled())
+ LOG.debug("Ignoring cookie: " + curr);
}
return cookie_arr;
@@ -339,7 +339,7 @@
* throw new ProtocolException("Bad Set-Cookie header: " + set_cookie +
* "\nInvalid date found at " + "position " + beg);
*/
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Invalid date '" + value + "'");
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Invalid date '" + value + "'");
}
}
else if (name.equals("max-age")) // from rfc-2109
@@ -365,7 +365,7 @@
// you get everything these days...
if (value.length() == 0)
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Domain is empty - ignoring domain");
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Domain is empty - ignoring domain");
return true;
}
@@ -379,7 +379,7 @@
// must be the same domain as in the url
if (!cookie.domain.endsWith(value))
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Current domain " + cookie.domain
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Current domain " + cookie.domain
+ " does not match given parsed " + value);
return false;
}
@@ -398,7 +398,7 @@
// two dots
if (!value.equals(".local") && value.indexOf('.', 1) == -1)
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ "isn't .local and doesn't have at " + "least 2 dots");
return false;
}
@@ -416,7 +416,7 @@
int dl = cookie.domain.length(), vl = value.length();
if (dl > vl && cookie.domain.substring(0, dl - vl).indexOf('.') != -1)
{
- log.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ LOG.warn("Bad Set-Cookie header: " + set_cookie + ". Domain attribute " + value
+ "is more than one level below " + "current domain " + cookie.domain);
return false;
}
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -54,7 +54,7 @@
/** Make this compatible with V0.3-2 */
private static final long serialVersionUID = 2208203902820875917L;
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.Cookie2");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.Cookie2");
protected int version;
@@ -341,7 +341,7 @@
// path attribute must be a prefix of the request-URI
if (!Util.getPath(req.getRequestURI()).startsWith(curr.path))
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", path '" + curr.path + "' is not a prefix of the "
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", path '" + curr.path + "' is not a prefix of the "
+ "request uri '" + req.getRequestURI() + "'");
continue;
}
@@ -356,7 +356,7 @@
// domain must be either .local or must contain at least two dots
if (!curr.domain.equals(".local") && curr.domain.indexOf('.', 1) == -1)
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is not '.local' and "
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is not '.local' and "
+ "doesn't contain two '.'s");
continue;
}
@@ -364,7 +364,7 @@
// domain must domain match host
if (!eff_host.endsWith(curr.domain))
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' does not match current"
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' does not match current"
+ "host '" + eff_host + "'");
continue;
}
@@ -372,7 +372,7 @@
// host minus domain may not contain any dots
if (eff_host.substring(0, eff_host.length() - curr.domain.length()).indexOf('.') != -1)
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is more than one '.'"
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", domain '" + curr.domain + "' is more than one '.'"
+ "away from host '" + eff_host + "'");
continue;
}
@@ -386,7 +386,7 @@
break;
if (idx2 == curr.port_list.length)
{
- log.warn("Bad Set-Cookie2 header: " + set_cookie + ", port list " + "does include current port "
+ LOG.warn("Bad Set-Cookie2 header: " + set_cookie + ", port list " + "does include current port "
+ req.getConnection().getPort());
continue;
}
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -125,7 +125,7 @@
/** just ignore all the data if told to do so */
private boolean ignore = false;
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.HttpOutputStream");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.HttpOutputStream");
// Constructors
@@ -172,11 +172,11 @@
if (os == null)
bos = new ByteArrayOutputStream();
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Stream ready for writing");
+ LOG.debug("Stream ready for writing");
if (bos != null)
- log.debug("Buffering all data before sending request");
+ LOG.debug("Buffering all data before sending request");
}
}
@@ -375,8 +375,8 @@
req.setHeaders(hdrs);
}
- if (log.isDebugEnabled())
- log.debug("Sending request");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Sending request");
try
{
@@ -405,11 +405,11 @@
if (length == -1)
{
- if (log.isDebugEnabled() && trailers.length > 0)
+ if (LOG.isDebugEnabled() && trailers.length > 0)
{
- log.debug("Sending trailers:");
+ LOG.debug("Sending trailers:");
for (int idx = 0; idx < trailers.length; idx++)
- log.debug("\t" + trailers[idx].getName() + ": " + trailers[idx].getValue());
+ LOG.debug("\t" + trailers[idx].getName() + ": " + trailers[idx].getValue());
}
os.write(Codecs.chunkedEncode(null, 0, 0, trailers, true));
@@ -417,8 +417,8 @@
os.flush();
- if (log.isDebugEnabled())
- log.debug("All data sent");
+ if (LOG.isDebugEnabled())
+ LOG.debug("All data sent");
}
catch (IOException ioe)
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -54,7 +54,7 @@
class RetryModule implements HTTPClientModule, GlobalConstants
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.RetryModule");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.RetryModule");
// Constructors
@@ -85,7 +85,7 @@
}
catch (RetryException re)
{
- log.error("Caught RetryException");
+ LOG.error("Caught RetryException");
boolean got_lock = false;
@@ -102,7 +102,7 @@
for (RetryException e = re.first; e != null; e = e.next)
{
- log.error("Handling exception ", e);
+ LOG.error("Handling exception ", e);
Request req = e.request;
HTTPConnection con = req.getConnection();
@@ -181,7 +181,7 @@
// now resend the request
- log.info("Retrying request '" + req.getMethod() + " " + req.getRequestURI() + "'");
+ LOG.info("Retrying request '" + req.getMethod() + " " + req.getRequestURI() + "'");
if (e.conn_reset)
req.num_retries++;
Modified: ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java
===================================================================
--- ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -49,7 +49,7 @@
class TransferEncodingModule implements HTTPClientModule
{
- private static final Log log = ExoLogger.getLogger("exo.ws.commons.TransferEncodingModule");
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.TransferEncodingModule");
// Methods
@@ -165,41 +165,41 @@
String encoding = ((HttpHeaderElement)pte.lastElement()).getName();
if (encoding.equalsIgnoreCase("gzip"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing gzip-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing gzip-input-stream");
resp.inp_stream = new GZIPInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("deflate"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing inflater-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing inflater-input-stream");
resp.inp_stream = new InflaterInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("compress"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing uncompress-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing uncompress-input-stream");
resp.inp_stream = new UncompressInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("chunked"))
{
- if (log.isDebugEnabled())
- log.debug("Pushing chunked-input-stream");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Pushing chunked-input-stream");
resp.inp_stream = new ChunkedInputStream(resp.inp_stream);
}
else if (encoding.equalsIgnoreCase("identity"))
{
- if (log.isDebugEnabled())
- log.debug("Ignoring 'identity' token");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Ignoring 'identity' token");
}
else
{
- if (log.isDebugEnabled())
- log.debug("Unknown transfer encoding '" + encoding + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Unknown transfer encoding '" + encoding + "'");
break;
}
Modified: ws/branches/2.3.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java
===================================================================
--- ws/branches/2.3.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java 2012-02-14 14:19:34 UTC (rev 5630)
+++ ws/branches/2.3.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/groovy/GroovyJaxrsPublisher.java 2012-02-14 14:20:26 UTC (rev 5631)
@@ -64,7 +64,7 @@
*/
public class GroovyJaxrsPublisher
{
- private static final Log log = ExoLogger.getExoLogger(GroovyJaxrsPublisher.class);
+ private static final Log LOG = ExoLogger.getExoLogger(GroovyJaxrsPublisher.class);
@SuppressWarnings("rawtypes")
private static final Comparator<Constructor> constructorComparator = new Comparator<Constructor>() {
@@ -134,7 +134,7 @@
@Deprecated
public void setGroovyClassLoader(GroovyClassLoader gcl)
{
- log.warn("Method setGroovyClassLoader is deprecated.");
+ LOG.warn("Method setGroovyClassLoader is deprecated.");
}
/**
12 years, 4 months
exo-jcr SVN: r5630 - in kernel/branches/2.4.x: exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl and 20 other directories.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-14 09:19:34 -0500 (Tue, 14 Feb 2012)
New Revision: 5630
Modified:
kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java
kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java
kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java
kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java
kernel/branches/2.4.x/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java
kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java
kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/MimeTypeResolver.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -36,7 +36,7 @@
public class MimeTypeResolver
{
- protected static Log log = ExoLogger.getLogger("org.exoplatform.commons.utils.MimeTypeResolver");
+ protected static final Log LOG = ExoLogger.getLogger("org.exoplatform.commons.utils.MimeTypeResolver");
static {
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
Modified: kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/AbstractExoLogFactory.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -35,7 +35,7 @@
{
/** . */
- private final ConcurrentMap<String, Log> loggers = new ConcurrentHashMap<String, Log>();
+ private static final ConcurrentMap<String, Log> LOGGERS = new ConcurrentHashMap<String, Log>();
/**
* Obtain a specified logger.
@@ -54,11 +54,11 @@
{
throw new IllegalArgumentException("The logger name cannot be null");
}
- Log exoLogger = loggers.get(name);
+ Log exoLogger = LOGGERS.get(name);
if (exoLogger == null)
{
exoLogger = getLogger(name);
- Log phantom = loggers.putIfAbsent(name, exoLogger);
+ Log phantom = LOGGERS.putIfAbsent(name, exoLogger);
if (phantom != null)
{
exoLogger = phantom;
Modified: kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/future/FutureCache.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -47,7 +47,7 @@
private final ConcurrentMap<K, FutureTask<V>> futureEntries;
/** . */
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.cache.FutureCache");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.cache.FutureCache");
public FutureCache(Loader<K, V, C> loader)
@@ -126,11 +126,11 @@
}
catch (ExecutionException e)
{
- log.error("Computing of resource " + key + " threw an exception", e.getCause());
+ LOG.error("Computing of resource " + key + " threw an exception", e.getCause());
}
catch (Exception e)
{
- log.error("Retrieval of resource " + key + " threw an exception", e);
+ LOG.error("Retrieval of resource " + key + " threw an exception", e);
}
finally
{
Modified: kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/LoggingCacheListener.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -34,46 +34,46 @@
public class LoggingCacheListener implements CacheListener
{
- Log log = ExoLogger.getLogger("exo.kernel.component.cache.LoggingCacheListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.cache.LoggingCacheListener");
public void onClearCache(CacheListenerContext context) throws Exception
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("Cleared region " + context.getCacheInfo().getName());
+ LOG.debug("Cleared region " + context.getCacheInfo().getName());
}
}
public void onExpire(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Expired entry " + key + " on region " + context.getCacheInfo().getName());
+ LOG.trace("Expired entry " + key + " on region " + context.getCacheInfo().getName());
}
}
public void onGet(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Get entry " + key + " on region " + context.getCacheInfo().getName());
+ LOG.trace("Get entry " + key + " on region " + context.getCacheInfo().getName());
}
}
public void onPut(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Put entry " + key + " region " + context.getCacheInfo().getName());
+ LOG.trace("Put entry " + key + " region " + context.getCacheInfo().getName());
}
- if (log.isWarnEnabled())
+ if (LOG.isWarnEnabled())
{
int maxSize = context.getCacheInfo().getMaxSize();
int size = context.getCacheInfo().getSize();
double treshold = maxSize * 0.95;
if (size >= treshold)
{
- log.warn("region " + context.getCacheInfo().getName() + " is 95% full, consider extending maxSize");
+ LOG.warn("region " + context.getCacheInfo().getName() + " is 95% full, consider extending maxSize");
}
}
@@ -81,9 +81,9 @@
public void onRemove(CacheListenerContext context, Serializable key, Object obj) throws Exception
{
- if (log.isTraceEnabled())
+ if (LOG.isTraceEnabled())
{
- log.trace("Removed entry " + key + " region " + context.getCacheInfo().getName());
+ LOG.trace("Removed entry " + key + " region " + context.getCacheInfo().getName());
}
}
}
Modified: kernel/branches/2.4.x/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/CommonsXMLConfigurationPlugin.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -46,7 +46,7 @@
// protected Catalog defaultCatalog;
- private static Log log = ExoLogger.getLogger("exo.kernel.component.cache.CommonsXMLConfigurationPlugin");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.cache.CommonsXMLConfigurationPlugin");
public CommonsXMLConfigurationPlugin(InitParams params, ConfigurationManager configurationManager) throws Exception
{
@@ -70,7 +70,7 @@
res = configurationManager.getResource(path);
if (res == null)
throw new Exception("Resource not found " + path);
- log.info("Catalog configuration found at " + res);
+ LOG.info("Catalog configuration found at " + res);
final URL fRes = res;
SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -46,7 +46,7 @@
*/
private final Map<String, List<Listener>> listeners_;
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.common.ListenerService");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.ListenerService");
/**
* Construct a listener service.
@@ -151,9 +151,9 @@
return;
for (Listener<S, D> listener : list)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("broadcasting event " + name + " on " + listener.getName());
+ LOG.debug("broadcasting event " + name + " on " + listener.getName());
}
try
@@ -163,8 +163,8 @@
catch (Exception e)
{
// log exception and keep broadcast events
- log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
- log.info("Exception occures but keep broadcast events.");
+ LOG.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ LOG.info("Exception occures but keep broadcast events.");
}
}
}
@@ -197,8 +197,8 @@
catch (Exception e)
{
// log exception and keep broadcast events
- log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
- log.info("Exception occures but keep broadcast events.");
+ LOG.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ LOG.info("Exception occures but keep broadcast events.");
}
}
}
@@ -275,7 +275,7 @@
{
// Do not throw exception. Event is asynchronous so just report error.
// Must say that exception will be ignored even in synchronous events.
- log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ LOG.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
}
}
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextInitializer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -69,7 +69,7 @@
public static final String DEFAULT_BINDING_STORE_PATH = PrivilegedSystemHelper.getProperty("java.io.tmpdir")
+ File.separator + "bind-references.xml";
- private static Log LOG = ExoLogger.getLogger("exo.kernel.component.common.InitialContextInitializer");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.InitialContextInitializer");
private List<BindReferencePlugin> bindReferencesPlugins;
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/JobSchedulerServiceImpl.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -62,7 +62,7 @@
public class JobSchedulerServiceImpl implements JobSchedulerService, Startable
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.common.JobSchedulerServiceImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.JobSchedulerServiceImpl");
static final String STANDALONE_CONTAINER_NAME = "$Standalone";
private final Scheduler scheduler_;
@@ -409,7 +409,7 @@
}
catch (SchedulerException e)
{
- log.error("Could not suspend the scheduler", e);
+ LOG.error("Could not suspend the scheduler", e);
}
return false;
}
@@ -425,7 +425,7 @@
}
catch (SchedulerException e)
{
- log.error("Could not resume the scheduler", e);
+ LOG.error("Could not resume the scheduler", e);
}
return false;
}
@@ -441,7 +441,7 @@
}
catch (Exception e)
{
- log.warn("Could not remove the GlobalJobListener " + JobEnvironmentConfigListener.NAME, e);
+ LOG.warn("Could not remove the GlobalJobListener " + JobEnvironmentConfigListener.NAME, e);
}
}
@@ -463,7 +463,7 @@
}
catch (Exception ex)
{
- log.warn("Could not interrupt all the current jobs properly", ex);
+ LOG.warn("Could not interrupt all the current jobs properly", ex);
}
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/scheduler/impl/QuartzSheduler.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -41,7 +41,7 @@
*/
public class QuartzSheduler implements Startable
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.component.common.QuartzSheduler");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.QuartzSheduler");
private final Scheduler scheduler_;
@@ -108,7 +108,7 @@
}
catch (SchedulerException ex)
{
- log.warn("Could not shutdown the scheduler", ex);
+ LOG.warn("Could not shutdown the scheduler", ex);
}
}
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/transaction/impl/jotm/TransactionServiceJotmImpl.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -46,7 +46,7 @@
public class TransactionServiceJotmImpl extends AbstractTransactionService
{
- protected static Log log = ExoLogger.getLogger("exo.kernel.component.common.TransactionServiceJotmImpl");
+ protected static final Log LOG = ExoLogger.getLogger("exo.kernel.component.common.TransactionServiceJotmImpl");
private final int defaultTimeout;
@@ -112,7 +112,7 @@
}
else
{
- log.info("Use externally initialized JOTM: " + current);
+ LOG.info("Use externally initialized JOTM: " + current);
}
return current;
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -121,7 +121,7 @@
return Collections.unmodifiableSet(profiles);
}
- static Log log = ExoLogger.getLogger("exo.kernel.container.ExoContainer");
+ protected static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ExoContainer");
private Map<String, ComponentLifecyclePlugin> componentLifecylePlugin_ =
new HashMap<String, ComponentLifecyclePlugin>();
@@ -217,7 +217,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -300,7 +300,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -323,7 +323,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -346,7 +346,7 @@
}
catch (Exception e)
{
- log.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
+ LOG.warn("An error occurs with the ContainerLifecyclePlugin '" + getPluginName(plugin) + "'", e);
}
}
}
@@ -378,8 +378,8 @@
public <T> T createComponent(Class<T> clazz, InitParams params) throws Exception
{
- if (log.isDebugEnabled())
- log.debug(clazz.getName() + " " + ((params != null) ? params : "") + " added to " + getContext().getName());
+ if (LOG.isDebugEnabled())
+ LOG.debug(clazz.getName() + " " + ((params != null) ? params : "") + " added to " + getContext().getName());
Constructor<?>[] constructors = new Constructor<?>[0];
try
{
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/ExoContainerContext.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -45,7 +45,7 @@
private String name;
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.ExoContainerContext");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ExoContainerContext");
public ExoContainerContext(ExoContainer container)
{
@@ -143,7 +143,7 @@
if (topContainer != null && cont != null)
throw new IllegalStateException("Two top level containers created, but must be only one.");
- log.info("Set the top container in its context");
+ LOG.info("Set the top container in its context");
topContainer = cont;
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PortalContainer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.container;
+import static org.exoplatform.container.ExoContainer.LOG;
+
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.SecurityHelper;
import org.exoplatform.container.RootContainer.PortalContainerInitTask;
@@ -317,13 +319,13 @@
Configuration conf = getConfiguration();
if (conf == null)
{
- log.warn("The configuration of the PortalContainer could not be found");
+ LOG.warn("The configuration of the PortalContainer could not be found");
return null;
}
Configuration result = Configuration.merge(((ExoContainer)parent).getConfiguration(), conf);
if (result == null)
{
- log.warn("The configurations could not be merged");
+ LOG.warn("The configurations could not be merged");
return null;
}
return result.toXML();
@@ -494,7 +496,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.warn("The Servlet Context '" + context.getServletContextName() + "' has not been registered"
+ LOG.warn("The Servlet Context '" + context.getServletContextName() + "' has not been registered"
+ " has a dependency of any PortalContainerDefinitions.");
}
return null;
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -60,7 +60,7 @@
{
/** The logger. */
- private final Log log = ExoLogger.getExoLogger(PropertyConfigurator.class);
+ private static final Log LOG = ExoLogger.getExoLogger(PropertyConfigurator.class);
public PropertyConfigurator(ConfigurationManager confManager)
{
@@ -75,20 +75,20 @@
PropertiesParam propertiesParam = params.getPropertiesParam("properties");
if (propertiesParam != null)
{
- log.debug("Going to initialize properties from init param");
+ LOG.debug("Going to initialize properties from init param");
for (Iterator<Property> i = propertiesParam.getPropertyIterator();i.hasNext();)
{
Property property = i.next();
String name = property.getName();
String value = property.getValue();
- log.debug("Adding property from init param " + name + " = " + value);
+ LOG.debug("Adding property from init param " + name + " = " + value);
PropertyManager.setProperty(name, value);
}
}
ValueParam pathParam = params.getValueParam("properties.url");
if (pathParam != null)
{
- log.debug("Using file path " + path + " found from configuration");
+ LOG.debug("Using file path " + path + " found from configuration");
path = pathParam.getValue();
}
}
@@ -97,14 +97,14 @@
String systemPath = PropertyManager.getProperty(PropertyManager.PROPERTIES_URL);
if (systemPath != null)
{
- log.debug("Using file path " + path + " found from system properties");
+ LOG.debug("Using file path " + path + " found from system properties");
path = systemPath;
}
//
if (path != null)
{
- log.debug("Found property file path " + path);
+ LOG.debug("Found property file path " + path);
try
{
URL url = confManager.getURL(path);
@@ -121,7 +121,7 @@
}
catch (Exception e)
{
- log.error("Cannot load property file " + path, e);
+ LOG.error("Cannot load property file " + path, e);
}
}
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -112,7 +112,7 @@
profiles.addAll(ExoContainer.getProfiles());
// Lof the active profiles
- log.info("Active profiles " + profiles);
+ LOG.info("Active profiles " + profiles);
//
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
@@ -240,7 +240,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("We assume that the ServletContext '" + context.getServletContextName()
+ LOG.info("We assume that the ServletContext '" + context.getServletContextName()
+ "' is not a portal since no portal container definition with the same name has been"
+ " registered to the component PortalContainerConfig. The related portal container"
+ " will be declared as disabled.");
@@ -301,7 +301,7 @@
if (config.isPortalContainerName(portalContainerName))
{
// Unregister name of portal container that doesn't exist
- log.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
+ LOG.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
+ " it has not yet been registered, please check your PortalContainerDefinitions and "
+ "the loading order.");
config.unregisterPortalContainerName(portalContainerName);
@@ -323,7 +323,7 @@
final String portalContainerName = context.getServletContextName();
try
{
- log.info("Trying to create the portal container '" + portalContainerName + "'");
+ LOG.info("Trying to create the portal container '" + portalContainerName + "'");
PortalContainer pcontainer = new PortalContainer(this, context);
PortalContainer.setInstance(pcontainer);
executeInitTasks(pcontainer, PortalContainerPreInitTask.TYPE);
@@ -339,7 +339,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration conf/portal/configuration.xml. ServletContext: " + context, ex);
+ LOG.error("Cannot add configuration conf/portal/configuration.xml. ServletContext: " + context, ex);
}
// Add configuration that depends on the environment
@@ -359,7 +359,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration " + uri + ". ServletContext: " + context, ex);
+ LOG.error("Cannot add configuration " + uri + ". ServletContext: " + context, ex);
}
// add configs from web apps
@@ -373,7 +373,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration war:/conf/configuration.xml. ServletContext: " + ctx, ex);
+ LOG.error("Cannot add configuration war:/conf/configuration.xml. ServletContext: " + ctx, ex);
}
}
@@ -390,7 +390,7 @@
}
catch (Exception ex)
{
- log.error("Cannot add configuration " + overrideConfig + ". ServletContext: " + context, ex);
+ LOG.error("Cannot add configuration " + overrideConfig + ". ServletContext: " + context, ex);
}
cService.processRemoveConfiguration();
@@ -404,11 +404,11 @@
//
executeInitTasks(pcontainer, PortalContainerPostInitTask.TYPE);
executeInitTasks(pcontainer, PortalContainerPostCreateTask.TYPE);
- log.info("The portal container '" + portalContainerName + "' has been created successfully");
+ LOG.info("The portal container '" + portalContainerName + "' has been created successfully");
}
catch (Exception ex)
{
- log.error("Cannot create the portal container '" + portalContainerName + "' . ServletContext: " + context, ex);
+ LOG.error("Cannot create the portal container '" + portalContainerName + "' . ServletContext: " + context, ex);
}
finally
{
@@ -423,7 +423,7 @@
}
catch (Exception e)
{
- log.warn("An error occured while cleaning the ThreadLocal", e);
+ LOG.warn("An error occured while cleaning the ThreadLocal", e);
}
}
}
@@ -480,7 +480,7 @@
}
catch (Exception e)
{
- log.error("Could not build root container", e);
+ LOG.error("Could not build root container", e);
// The logger is not necessary configured so we have to use the standard
// output stream
LOG.error(e.getLocalizedMessage(), e);
@@ -513,13 +513,13 @@
booting = true;
try
{
- log.info("Building root container");
+ LOG.info("Building root container");
long time = -System.currentTimeMillis();
result = buildRootContainer();
if (result != null)
{
time += System.currentTimeMillis();
- log.info("Root container is built (build time " + time + "ms)");
+ LOG.info("Root container is built (build time " + time + "ms)");
singleton_ = result;
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
{
@@ -529,11 +529,11 @@
return null;
}
});
- log.info("Root container booted");
+ LOG.info("Root container booted");
}
else
{
- log.error("Failed to boot root container");
+ LOG.error("Failed to boot root container");
}
}
finally
@@ -563,7 +563,7 @@
Configuration config = getConfiguration();
if (config == null)
{
- log.warn("The configuration of the RootContainer could not be found");
+ LOG.warn("The configuration of the RootContainer could not be found");
return null;
}
return config.toXML();
@@ -599,8 +599,8 @@
final PortalContainer container = getPortalContainer(portalContainer);
if (!task.alreadyExists(container))
{
- if (log.isDebugEnabled())
- log.debug("The portal container '" + portalContainer
+ if (LOG.isDebugEnabled())
+ LOG.debug("The portal container '" + portalContainer
+ "' has not yet been initialized, thus the task can be added");
ConcurrentMap<String, Queue<PortalContainerInitTaskContext>> queues = initTasks.get(portalContainer);
if (queues == null)
@@ -639,8 +639,8 @@
}
else
{
- if (log.isDebugEnabled())
- log.debug("The portal container '" + portalContainer
+ if (LOG.isDebugEnabled())
+ LOG.debug("The portal container '" + portalContainer
+ "' has already been initialized, thus we call onAlreadyExists");
PortalContainer oldPortalContainer = PortalContainer.getInstanceIfPresent();
try
@@ -673,8 +673,8 @@
{
return;
}
- if (log.isDebugEnabled())
- log.debug("Start launching the " + type + " tasks of the portal container '" + portalContainer + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Start launching the " + type + " tasks of the portal container '" + portalContainer + "'");
// Keep the old ClassLoader
final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
PortalContainerInitTaskContext context;
@@ -702,8 +702,8 @@
{
initTasks.remove(portalContainerName);
}
- if (log.isDebugEnabled())
- log.debug("End launching the " + type + " tasks of the portal container '" + portalContainer + "'");
+ if (LOG.isDebugEnabled())
+ LOG.debug("End launching the " + type + " tasks of the portal container '" + portalContainer + "'");
}
static class ShutdownThread extends Thread
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -320,7 +320,7 @@
Configuration config = getConfiguration();
if (config == null)
{
- log.warn("The configuration of the StandaloneContainer could not be found");
+ LOG.warn("The configuration of the StandaloneContainer could not be found");
return null;
}
return config.toXML();
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationManagerImpl.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -51,7 +51,7 @@
{
final static public String WAR_CONF_LOCATION = "/WEB-INF";
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.ConfigurationManagerImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ConfigurationManagerImpl");
protected Configuration configurations_;
@@ -137,7 +137,7 @@
private void addConfiguration(ServletContext context, URL url) throws Exception
{
if (LOG_DEBUG)
- log.info("Add configuration " + url);
+ LOG.info("Add configuration " + url);
if (url == null)
return;
try
@@ -174,7 +174,7 @@
}
catch (Exception ex)
{
- log.error("Cannot process the configuration " + currentURL.get(), ex);
+ LOG.error("Cannot process the configuration " + currentURL.get(), ex);
}
finally
{
@@ -219,7 +219,7 @@
if (urlObject != null)
{
if (LOG_DEBUG)
- log.info(prefix + "import " + urlObject);
+ LOG.info(prefix + "import " + urlObject);
// Set the URL of imported file
currentURL.set(urlObject);
conf = unmarshaller.unmarshall(urlObject);
@@ -228,7 +228,7 @@
}
else
{
- log.warn("Couldn't process the URL for " + uri + " configuration file ignored ");
+ LOG.warn("Couldn't process the URL for " + uri + " configuration file ignored ");
}
}
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -41,7 +41,7 @@
{
/** . */
- private static final Log log = ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
+ private static final Log LOG = ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
/** . */
private static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
@@ -78,14 +78,14 @@
if (Namespaces.isKernelNamespace(uri) || XSI_URI.equals(uri))
{
blackListedPrefixes.add(prefix);
- if (log.isTraceEnabled())
- log.trace("Black listing prefix " + prefix + " with uri " + uri);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Black listing prefix " + prefix + " with uri " + uri);
}
else
{
contentHandler.startPrefixMapping(prefix, uri);
- if (log.isTraceEnabled())
- log.trace("Start prefix mapping " + prefix + " with uri " + uri);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Start prefix mapping " + prefix + " with uri " + uri);
}
}
@@ -93,14 +93,14 @@
{
if (!blackListedPrefixes.remove(prefix))
{
- if (log.isTraceEnabled())
- log.trace("Ending prefix mapping " + prefix);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Ending prefix mapping " + prefix);
contentHandler.endPrefixMapping(prefix);
}
else
{
- if (log.isTraceEnabled())
- log.trace("Removed prefix mapping " + prefix + " from black list ");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Removed prefix mapping " + prefix + " from black list ");
}
}
@@ -113,14 +113,14 @@
if ((attQName.equals("xmlns")) && blackListedPrefixes.contains(""))
{
// Skip
- if (log.isTraceEnabled())
- log.trace("Skipping black listed xmlns attribute");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Skipping black listed xmlns attribute");
}
else if (attQName.startsWith("xmlns:") && blackListedPrefixes.contains(attQName.substring(6)))
{
// Skip
- if (log.isTraceEnabled())
- log.trace("Skipping black listed " + attQName + " attribute");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Skipping black listed " + attQName + " attribute");
}
else
{
@@ -133,14 +133,14 @@
if (XSI_URI.equals(attURI))
{
// Skip
- if (log.isTraceEnabled())
- log.trace("Skipping XSI " + attQName + " attribute");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Skipping XSI " + attQName + " attribute");
continue;
}
else if (Namespaces.isKernelNamespace(attURI))
{
- if (log.isTraceEnabled())
- log.trace("Requalifying prefixed attribute " + attQName + " attribute to " + localName);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Requalifying prefixed attribute " + attQName + " attribute to " + localName);
attURI = null;
attQName = localName;
}
@@ -153,8 +153,8 @@
//
if (Namespaces.isKernelNamespace(uri))
{
- if (log.isTraceEnabled())
- log.trace("Requalifying active profile " + qName + " start element to " + localName);
+ if (LOG.isTraceEnabled())
+ LOG.trace("Requalifying active profile " + qName + " start element to " + localName);
qName = localName;
uri = null;
}
@@ -167,15 +167,15 @@
{
if (Namespaces.isKernelNamespace(uri))
{
- if (log.isTraceEnabled())
- log.trace("Requalifying " + qName + " end element");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Requalifying " + qName + " end element");
qName = localName;
uri = null;
}
//
- if (log.isTraceEnabled())
- log.trace("Propagatting " + qName + " end element");
+ if (LOG.isTraceEnabled())
+ LOG.trace("Propagatting " + qName + " end element");
contentHandler.endElement(uri, localName, qName);
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -64,7 +64,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.PortalContainerConfig");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.PortalContainerConfig");
/**
* The name of the setting corresponding to the portal container name
@@ -237,7 +237,7 @@
else
{
// The nested object is not of the right type, thus it will be ignored
- log.warn("The object parameter 'default.portal.definition' should be of type "
+ LOG.warn("The object parameter 'default.portal.definition' should be of type "
+ PortalContainerDefinition.class);
}
}
@@ -384,7 +384,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal container '" + name + "' will be disabled");
+ LOG.info("The portal container '" + name + "' will be disabled");
}
final Set<String> lPortalContainerNames = new HashSet<String>(portalContainerNamesDisabled.size() + 1);
lPortalContainerNames.add(name);
@@ -561,14 +561,14 @@
// the webapp is ignored since it has not been registered in any portal container dependency list
if (PropertyManager.isDevelopping())
{
- log.warn("The context '" + contextName + "' has not been added as " +
+ LOG.warn("The context '" + contextName + "' has not been added as " +
"dependency of any portal containers");
}
return null;
}
if (PropertyManager.isDevelopping())
{
- log.debug("The context '" + contextName + "' has not been added as " +
+ LOG.debug("The context '" + contextName + "' has not been added as " +
"dependency of any portal containers");
}
// by default we will return the default portal container
@@ -702,7 +702,7 @@
String name = def.getName();
if (name == null || (name = name.trim()).length() == 0)
{
- log.warn("A PortalContainerDefinition cannot have an empty name");
+ LOG.warn("A PortalContainerDefinition cannot have an empty name");
continue;
}
else
@@ -997,14 +997,14 @@
url = file.toURI().toURL();
if (ConfigurationManager.LOG_DEBUG)
{
- log.info("The external settings could be found in the directory ${exo-conf}/portal, "
+ LOG.info("The external settings could be found in the directory ${exo-conf}/portal, "
+ "it will be used as external settings of the "
+ (isPath4DefaultPCD ? "default portal container" : "portal container '" + def.getName() + "'"));
}
}
else if (ConfigurationManager.LOG_DEBUG)
{
- log.info("No external settings could be found in the directory ${exo-conf}/portal for the "
+ LOG.info("No external settings could be found in the directory ${exo-conf}/portal for the "
+ (isPath4DefaultPCD ? "default portal container" : "portal container '" + def.getName() + "'"));
}
}
@@ -1014,7 +1014,7 @@
url = cm.getURL(path);
if (ConfigurationManager.LOG_DEBUG)
{
- log.info("Trying to retrieve the external settings from the url '" + url
+ LOG.info("Trying to retrieve the external settings from the url '" + url
+ "', it will be used as external settings of the "
+ (isPath4DefaultPCD ? "default portal container" : "portal container '" + def.getName() + "'"));
}
@@ -1024,7 +1024,7 @@
}
catch (Exception e)
{
- log.error("Cannot load property file " + path, e);
+ LOG.error("Cannot load property file " + path, e);
}
return null;
}
@@ -1092,9 +1092,9 @@
}
catch (Exception e)
{
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug(
+ LOG.debug(
"The static method valueOf(String) cannot be found for the class " + oldValue.getClass(), e);
}
}
@@ -1113,7 +1113,7 @@
}
catch (Exception e)
{
- log.error("Cannot convert the value '" + propertyValue + "' to an Object of type "
+ LOG.error("Cannot convert the value '" + propertyValue + "' to an Object of type "
+ oldValue.getClass(), e);
// we ignore invalid value
continue;
@@ -1202,7 +1202,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.warn("No portal container definition has been registered, the old behavior is" +
+ LOG.warn("No portal container definition has been registered, the old behavior is" +
" then expected so you cannot disable any portal container. The list of" +
" portal containers to disable will be ignored");
}
@@ -1235,7 +1235,7 @@
}
catch (Exception e)
{
- log.warn("Cannot apply the change " + change, e);
+ LOG.warn("Cannot apply the change " + change, e);
}
}
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/MX4JComponentAdapter.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -53,7 +53,7 @@
private volatile Object instance_;
- private Log log = ExoLogger.getLogger("exo.kernel.container.MX4JComponentAdapter");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.MX4JComponentAdapter");
public MX4JComponentAdapter(Object key, Class<?> implementation)
{
@@ -103,7 +103,7 @@
}
exocontainer.addComponentToCtx(getComponentKey(), instance);
if (debug)
- log.debug("==> create component : " + instance_);
+ LOG.debug("==> create component : " + instance_);
if (component != null && component.getComponentPlugins() != null)
{
addComponentPlugin(debug, instance, component.getComponentPlugins(), exocontainer);
@@ -160,7 +160,7 @@
final Method m = getSetMethod(clazz, plugin.getSetMethod(), pluginClass);
if (m == null)
{
- log.error("Cannot find the method '" + plugin.getSetMethod() + "' that has only one parameter of type '"
+ LOG.error("Cannot find the method '" + plugin.getSetMethod() + "' that has only one parameter of type '"
+ pluginClass.getName() + "' in the class '" + clazz.getName() + "'.");
continue;
}
@@ -176,14 +176,15 @@
});
if (debug)
- log.debug("==> add component plugin: " + cplugin);
+ LOG.debug("==> add component plugin: " + cplugin);
cplugin.setName(plugin.getName());
cplugin.setDescription(plugin.getDescription());
}
catch (Exception ex)
{
- log.error("Failed to instanciate plugin " + plugin.getName() + " for component " + component + ": "
+ LOG.error(
+ "Failed to instanciate plugin " + plugin.getName() + " for component " + component + ": "
+ ex.getMessage(), ex);
}
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/management/ManageableComponentAdapter.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -35,7 +35,7 @@
{
/** . */
- private Log log = ExoLogger.getLogger("exo.kernel.container.ManageableComponentAdapter");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ManageableComponentAdapter");
/** . */
private ComponentAdapter delegate;
@@ -76,7 +76,7 @@
if (container.managementContext != null)
{
// Registry the instance against the management context
- log.debug("==> add " + instance + " to a mbean server");
+ LOG.debug("==> add " + instance + " to a mbean server");
container.managementContext.register(instance);
// Register if it is a management provider
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -38,7 +38,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.kernel.container.MCIntegrationContainer");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.MCIntegrationContainer");
/**
* Constructor that exposes super constructor.
@@ -99,7 +99,8 @@
}
catch(Exception ignored)
{
- log.debug("MC integration failed - maybe not supported in this environment (component: "
+ LOG.debug(
+ "MC integration failed - maybe not supported in this environment (component: "
+ componentAdapter.getComponentKey() + ")", ignored);
}
}
@@ -122,7 +123,8 @@
}
catch (Exception ignored)
{
- log.warn("MC integration failed - maybe not supported in this environment (component: "
+ LOG.warn(
+ "MC integration failed - maybe not supported in this environment (component: "
+ componentAdapter.getComponentKey() + ")", ignored);
}
return false;
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -25,9 +25,10 @@
import org.exoplatform.services.log.Log;
import org.picocontainer.ComponentAdapter;
-import javax.servlet.ServletContext;
import java.lang.reflect.Method;
+import javax.servlet.ServletContext;
+
/**
* This class performs a loosely coupled integration to mc-integration logic.
* MC integration provides the ability to inject JBoss MC configured beans into
@@ -43,7 +44,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.kernel.container.MCIntegrationInvoker");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.MCIntegrationInvoker");
/**
* Reference to actual implementation of mc-integration - the one with hard dependencies on JBoss MC Kernel.
@@ -127,7 +128,7 @@
catch (ClassNotFoundException ignored)
{
permFailure = true;
- log.debug("MC integration not available in this environment (missing class: "
+ LOG.debug("MC integration not available in this environment (missing class: "
+ ignored.getMessage() + ")");
return null;
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/monitor/jvm/AddJVMComponentsToRootContainer.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -34,7 +34,7 @@
public class AddJVMComponentsToRootContainer extends BaseContainerLifecyclePlugin
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.AddJVMComponentsToRootContainer");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.AddJVMComponentsToRootContainer");
public void initContainer(ExoContainer container)
{
@@ -57,9 +57,9 @@
{
if (mxComponent != null)
{
- log.debug("Attempt to register mx component " + mxComponent);
+ LOG.debug("Attempt to register mx component " + mxComponent);
container.registerComponentInstance(mxComponent);
- log.debug("Mx component " + mxComponent + " registered");
+ LOG.debug("Mx component " + mxComponent + " registered");
}
}
@@ -67,9 +67,9 @@
{
if (mxComponent != null)
{
- log.debug("Attempt to register mx component " + mxComponent + " with key " + mxKey);
+ LOG.debug("Attempt to register mx component " + mxComponent + " with key " + mxKey);
container.registerComponentInstance(mxKey, mxComponent);
- log.debug("Mx component " + mxComponent + " registered");
+ LOG.debug("Mx component " + mxComponent + " registered");
}
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpServlet.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -46,7 +46,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.AbstractHttpServlet");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.AbstractHttpServlet");
/**
* Serial Version ID.
@@ -194,7 +194,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal environment could not be set for the webapp '"
+ LOG.info("The portal environment could not be set for the webapp '"
+ config.getServletContext().getServletContextName()
+ "' because this servlet context has not been defined as a "
+ "dependency of any portal container or it is a disabled portal"
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/AbstractHttpSessionListener.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -40,7 +40,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.AbstractHttpSessionListener");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.AbstractHttpSessionListener");
/**
* @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent)
@@ -82,7 +82,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal environment could not be set for the webapp '" + ctxName
+ LOG.info("The portal environment could not be set for the webapp '" + ctxName
+ "' because this servlet context has not been defined as a "
+ "dependency of any portal container or it is a disabled portal"
+ " container, the sessionCreated event will be ignored");
@@ -152,7 +152,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal environment could not be set for the webapp '" + ctxName
+ LOG.info("The portal environment could not be set for the webapp '" + ctxName
+ "' because this servlet context has not been defined as a "
+ "dependency of any portal container or it is a disabled portal"
+ " container, the sessionDestroyed event will be ignored");
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/web/PortalContainerFilter.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -44,7 +44,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.PortalContainerFilter");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.PortalContainerFilter");
/**
* @see javax.servlet.Filter#destroy()
@@ -81,7 +81,7 @@
{
if (PropertyManager.isDevelopping())
{
- log.info("The portal container corresponding to the webapp '" + servletContextName
+ LOG.info("The portal container corresponding to the webapp '" + servletContextName
+ "' is disabled, thus the request is cancelled: target URI was "
+ ((HttpServletRequest)request).getRequestURI());
}
Modified: kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ConfigurationMarshallerUtil.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -38,7 +38,7 @@
/**
* The logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.container.ConfigurationMarshallerUtil");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.container.ConfigurationMarshallerUtil");
/**
* This method adds the given {@link URL} as comment to XML content.
@@ -51,7 +51,7 @@
}
catch (IOException e)
{
- log.warn("Could not add the source into the XML document", e);
+ LOG.warn("Could not add the source into the XML document", e);
}
}
Modified: kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -78,7 +78,7 @@
/**
* Logger.
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int.MCIntConfig");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int.MCIntConfig");
/**
* Configuration for <em>beans</em> specified with <em>name</em>.
@@ -126,7 +126,7 @@
}
if (data != null)
{
- log.warn("Overriding existing mc-int-beans configuration for bean: " + data.data
+ LOG.warn("Overriding existing mc-int-beans configuration for bean: " + data.data
+ " from " + data.deployment.getName() + " with one from " + deployment.getName());
}
addConf(new DeploymentData(deployment, mdata));
@@ -221,10 +221,10 @@
*/
private KernelDeployment parseConfigURL(UnmarshallerFactory factory, MutableSchemaResolver resolver, URL url)
{
- final boolean trace = log.isTraceEnabled();
+ final boolean trace = LOG.isTraceEnabled();
if (trace)
{
- log.trace("Parsing " + url);
+ LOG.trace("Parsing " + url);
}
long start = System.currentTimeMillis();
@@ -248,7 +248,7 @@
if (trace)
{
long now = System.currentTimeMillis();
- log.trace("Parsing " + url + " took " + (now - start) + " milliseconds");
+ LOG.trace("Parsing " + url + " took " + (now - start) + " milliseconds");
}
return deployment;
Modified: kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -32,10 +32,11 @@
import org.jboss.mc.servlet.vdf.api.VDFThreadLocalUtils;
import org.picocontainer.ComponentAdapter;
-import javax.servlet.ServletContext;
import java.lang.annotation.Annotation;
import java.util.Set;
+import javax.servlet.ServletContext;
+
/**
* Implementation of MCIntegration that contains hard dependencies on JBoss Microcontainer.
*
@@ -49,7 +50,7 @@
/**
* Logger
*/
- private static Log log = ExoLogger.getLogger("exo.kernel.mc-int.MCIntegrationImpl");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int.MCIntegrationImpl");
/**
* A singleton MCIntegration implementation
@@ -103,7 +104,7 @@
}
else
{
- log.warn("GateIn - MC integration not available");
+ LOG.warn("GateIn - MC integration not available");
return null;
}
}
Modified: kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -31,7 +31,7 @@
*/
public class InjectedBean
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectedBean");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectedBean");
public static final String SOME_PROPERTY_VALUE = "[This is some property value]";
@@ -39,7 +39,7 @@
public InjectedBean()
{
- log.info("InjectedBean instantiated :: " + this);
+ LOG.info("InjectedBean instantiated :: " + this);
}
public String getSomeString()
@@ -49,7 +49,7 @@
public void start()
{
- log.info("Method start() called on InjectedBean");
+ LOG.info("Method start() called on InjectedBean");
}
public String getAnotherProperty()
Modified: kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -57,7 +57,7 @@
/**
* Logger
*/
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectingBean");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-demo.InjectingBean");
/**
* Field to be injected through setter method by mc kernel.
@@ -113,7 +113,7 @@
*/
public InjectingBean()
{
- log.info("Injecting bean instantiated");
+ LOG.info("Injecting bean instantiated");
}
/**
@@ -133,7 +133,7 @@
public void setBean(InjectedBean bean)
{
this.bean = bean;
- log.info("Received InjectedBean: " + bean);
+ LOG.info("Received InjectedBean: " + bean);
}
/**
@@ -153,7 +153,7 @@
public void setConfigurator(KernelConfigurator configurator)
{
this.configurator = configurator;
- log.info("InjectingBean Received KernelConfigurator: " + configurator);
+ LOG.info("InjectingBean Received KernelConfigurator: " + configurator);
}
/**
@@ -205,7 +205,7 @@
)
public void setBindings(Map<Class<?>, Object> bindings)
{
- log.info("Received a map with bindings: " + bindings);
+ LOG.info("Received a map with bindings: " + bindings);
this.bindingsMap = bindings;
}
@@ -225,7 +225,7 @@
@Inject(bean = "InjectedBean", property = "someString")
public void setSomeStringProperty(String value)
{
- log.info("Received SomeStringProperty value: " + value);
+ LOG.info("Received SomeStringProperty value: " + value);
this.stringValue = value;
}
@@ -234,7 +234,7 @@
*/
public void start()
{
- log.warn("start() called (injectedBean is set to: " + injectedBean + ", transactionManager is setTo: " + tm + ")");
+ LOG.warn("start() called (injectedBean is set to: " + injectedBean + ", transactionManager is setTo: " + tm + ")");
this.startCount++;
}
@@ -243,7 +243,7 @@
*/
public void stop()
{
- log.info("stop() called");
+ LOG.info("stop() called");
}
/**
Modified: kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -31,15 +31,16 @@
import org.junit.Assert;
import org.junit.Test;
-import javax.transaction.TransactionManager;
import java.util.Map;
+import javax.transaction.TransactionManager;
+
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class ExternalMCInjectionTest
{
- protected Log log = ExoLogger.getLogger("exo.kernel.mc-int-tests.ExternalMCInjectionTest");
+ protected static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-tests.ExternalMCInjectionTest");
protected String beanName;
protected ExternallyControlledInjectingBean bean;
@@ -53,13 +54,13 @@
protected void init()
{
- log.info("init() method called");
+ LOG.info("init() method called");
RootContainer rootContainer = RootContainer.getInstance();
bean = (ExternallyControlledInjectingBean) rootContainer.getComponentInstance(beanName);
- log.info("Retrieved " + beanName + ": " + bean);
+ LOG.info("Retrieved " + beanName + ": " + bean);
Assert.assertNotNull(beanName + " not installed", bean);
inJboss = Environment.getInstance().getPlatform() == Environment.JBOSS_PLATFORM;
- log.info("Running inside JBoss? " + inJboss);
+ LOG.info("Running inside JBoss? " + inJboss);
}
@Test
@@ -89,13 +90,13 @@
try
{
int status = tm.getStatus();
- log.info("Status before tx: " + tm.getStatus());
+ LOG.info("Status before tx: " + tm.getStatus());
tm.begin();
Assert.assertFalse("TX status didn't change: ", status == tm.getStatus());
- log.info("Status in tx: " + tm.getStatus());
+ LOG.info("Status in tx: " + tm.getStatus());
tm.commit();
Assert.assertTrue("TX status didn't return to original: ", status == tm.getStatus());
- log.info("Status after tx: " + tm.getStatus());
+ LOG.info("Status after tx: " + tm.getStatus());
}
catch (Exception ex)
{
@@ -106,7 +107,7 @@
{
Assert.assertNull("Injection should not have worked", tm);
}
- log.info("testTransactionManager passed");
+ LOG.info("testTransactionManager passed");
}
protected void testNameLookupMethodInjection()
@@ -120,7 +121,7 @@
{
Assert.assertFalse("Method injection by name lookup should not have worked", found);
}
- log.info("testNameLookupMethodInjection passed");
+ LOG.info("testNameLookupMethodInjection passed");
}
protected void testMapInjection()
@@ -137,7 +138,7 @@
{
Assert.assertFalse("Map injection should not have worked", found);
}
- log.info("testMapInjection passed");
+ LOG.info("testMapInjection passed");
}
protected void testPropertyValueMethodInjection()
@@ -153,7 +154,7 @@
{
Assert.assertFalse("Property value method injection should not have worked", found);
}
- log.info("testPropertyValueMethodInjection passed");
+ LOG.info("testPropertyValueMethodInjection passed");
}
protected void testNestedPropertyInjection()
@@ -169,7 +170,7 @@
{
Assert.assertFalse("Nested property value method injection should not have worked", found);
}
- log.info("testNestedPropertyInjection passed");
+ LOG.info("testNestedPropertyInjection passed");
}
protected void testInstallMethod()
@@ -183,12 +184,12 @@
{
Assert.assertFalse("Install method should not have worked", installOk);
}
- log.info("testInstallMethod passed");
+ LOG.info("testInstallMethod passed");
}
protected void testStarted()
{
Assert.assertEquals("start() method not called exactly once", 1, bean.getStartCount());
- log.info("testStarted passed");
+ LOG.info("testStarted passed");
}
}
Modified: kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2012-02-14 10:22:27 UTC (rev 5629)
+++ kernel/branches/2.4.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2012-02-14 14:19:34 UTC (rev 5630)
@@ -36,7 +36,7 @@
public class JUnitInvokerServlet extends HttpServlet
{
- private static final Log log = ExoLogger.getLogger("exo.kernel.mc-int-tests.JUnitInvokerServlet");
+ private static final Log LOG = ExoLogger.getLogger("exo.kernel.mc-int-tests.JUnitInvokerServlet");
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
@@ -44,7 +44,7 @@
String className = request.getParameter("class");
response.setContentType("text/plain");
OutputStream out = response.getOutputStream();
- final PrintStream fOut = new PrintStream(new TeeOutputStream(out, new LogOutputStream(log)));
+ final PrintStream fOut = new PrintStream(new TeeOutputStream(out, new LogOutputStream(LOG)));
//final PrintStream fOut = new PrintStream(out);
JUnitSystem sys = new JUnitSystem()
{
12 years, 4 months
exo-jcr SVN: r5629 - in jcr/branches/1.15.x: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel and 5 other directories.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-02-14 05:22:27 -0500 (Tue, 14 Feb 2012)
New Revision: 5629
Modified:
jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -161,7 +161,10 @@
}
catch (IllegalPathException e)
{
-
+ if (LOG.isTraceEnabled())
+ {
+ LOG.trace("An exception occurred: " + e.getMessage());
+ }
}
}
return null;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -524,33 +524,4 @@
return path;
}
- /**
- * Parse textual path entry.
- *
- * @param entry - String text
- * @return QPathEntry
- * @throws IllegalPathException if text is not a valid entry
- */
- private static QPathEntry parseEntry(final String entry) throws IllegalPathException
- {
-
- if (!entry.startsWith("["))
- throw new IllegalPathException("Invalid QPath Entry '" + entry + "' Should start of '['");
- final int uriStart = 0;
- final int uriFinish = entry.indexOf("]", uriStart);
- if (uriFinish == -1)
- throw new IllegalPathException("Invalid QPath Entry '" + entry + "' No closed ']'");
- final String uri = entry.substring(uriStart + 1, uriFinish);
-
- final String localName = entry.substring(uriFinish + 1, entry.length());
-
- final int ind = localName.indexOf(PREFIX_DELIMITER);
- if (ind > 1)
- {
- return new QPathEntry(uri, localName.substring(0, ind), Integer.parseInt(localName.substring(ind + 1)));
- }
-
- return new QPathEntry(uri, localName, 1);
- }
-
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -367,19 +367,6 @@
}
}
- private void validate() throws RepositoryException
- {
- if (dataManager == null)
- {
- throw new RepositoryException("Datamanager not initialized");
- }
- if (indexSearcherHolder == null)
- {
- throw new RepositoryException("RepositoryIndexSearcherHolder not initialized");
- }
-
- }
-
private void addPendingNamespaces()
{
for (ComponentPlugin plugin : addNamespacePluginHolder.getAddNamespacesPlugins())
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -24,7 +24,6 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
-import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -106,8 +105,6 @@
/**
* {@inheritDoc}
- *
- * @throws IOException
*/
public void addNodeTypes(List<NodeTypeData> nodeTypes) throws RepositoryException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -89,7 +89,6 @@
public static final int PARAM_RSYNC_PORT_DEFAULT = 873;
- // TODO
public static final String PARAM_RSYNC_USER = "rsync-user";
public static final String PARAM_RSYNC_PASSWORD = "rsync-password";
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -91,10 +91,9 @@
else
{
throw new RepositoryConfigurationException(
- "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. Current RSync Server Entry Path is : "
- + absoluteRsyncEntryPath
- + " but it doesnt hold Index folder, that is : "
- + this.indexPath
+ "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. "
+ + "Current RSync Server Entry Path is : " + absoluteRsyncEntryPath
+ + " but it doesnt hold Index folder, that is : " + this.indexPath
+ ". Please fix configuration according to JCR Documentation and restart application.");
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -95,10 +95,9 @@
else
{
throw new RepositoryConfigurationException(
- "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. Current RSync Server Entry Path is : "
- + absoluteRsyncEntryPath
- + " but it doesnt hold Index folder, that is : "
- + this.indexPath
+ "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. "
+ + "Current RSync Server Entry Path is : " + absoluteRsyncEntryPath
+ + " but it doesnt hold Index folder, that is : " + this.indexPath
+ ". Please fix configuration according to JCR Documentation and restart application.");
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -237,7 +237,7 @@
}
catch (BackupException e)
{
- log.error("Can't rollback changes", e);
+ LOG.error("Can't rollback changes", e);
}
}
@@ -254,7 +254,7 @@
}
catch (BackupException e)
{
- log.error("Can't close restorer", e);
+ LOG.error("Can't close restorer", e);
}
}
@@ -267,7 +267,7 @@
}
catch (RepositoryException e)
{
- log.error("Can't resume repository", e);
+ LOG.error("Can't resume repository", e);
}
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java 2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java 2012-02-14 10:22:27 UTC (rev 5629)
@@ -60,7 +60,7 @@
/**
* The apache logger.
*/
- protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.JobRepositoryRestore");
+ protected static Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobRepositoryRestore");
/**
* REPOSITORY_RESTORE_STARTED. The state of start restore.
@@ -222,7 +222,7 @@
{
restored = false;
- log.error(
+ LOG.error(
"Can not restore workspace \"" + currennWorkspaceName + " in repository \"" + repositoryEntry.getName()
+ "\".", e);
@@ -234,7 +234,7 @@
{
restored = false;
- log.error(
+ LOG.error(
"Can not restore workspace \"" + currennWorkspaceName + " in repository \"" + repositoryEntry.getName()
+ "\".", t);
@@ -252,7 +252,7 @@
}
catch (Throwable thr)
{
- log.error("The partly restored repository \"" + repositoryEntry.getName() + "\" can not be removed.",
+ LOG.error("The partly restored repository \"" + repositoryEntry.getName() + "\" can not be removed.",
thr);
}
}
@@ -283,6 +283,10 @@
catch (RepositoryException e)
{
// The repository not exist.
+ if (LOG.isTraceEnabled())
+ {
+ LOG.trace("An exception occurred: " + e.getMessage());
+ }
}
if (mr != null)
@@ -382,7 +386,7 @@
}
catch (Throwable t)
{
- log.error("The restore was fail", t);
+ LOG.error("The restore was fail", t);
}
}
12 years, 4 months
exo-jcr SVN: r5628 - in kernel/branches/2.4.x: exo.kernel.component.common and 6 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-02-14 04:37:23 -0500 (Tue, 14 Feb 2012)
New Revision: 5628
Modified:
kernel/branches/2.4.x/exo.kernel.component.common/pom.xml
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/net/impl/NetServiceImpl.java
kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java
kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/conf/portal/test-configuration.xml
kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/test.policy
kernel/branches/2.4.x/pom.xml
Log:
EXOJCR-1733: added the ability to send messages via mail service asynchronously
Modified: kernel/branches/2.4.x/exo.kernel.component.common/pom.xml
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/pom.xml 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/pom.xml 2012-02-14 09:37:23 UTC (rev 5628)
@@ -106,6 +106,11 @@
<artifactId>transactions-jta</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>dumbster</groupId>
+ <artifactId>dumbster</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/MailService.java 2012-02-14 09:37:23 UTC (rev 5628)
@@ -18,23 +18,98 @@
*/
package org.exoplatform.services.mail;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
/**
+ * Interface provides basic operations for sending mail messages and mail service
+ * configuration data retrieval. Defines synchronous and asynchronous methods
+ * responsible for sending mail message. They can receive parameters of different types
+ * to create a mail send. You can pass {@link Message}, {@link MimeMessage}
+ * or specify mail message data explicitly via {@String} parameters.
* @author Tuan Nguyen (tuan08(a)users.sourceforge.net)
* @since Oct 13, 2004
* @version $Id: MailService.java 5332 2006-04-29 18:32:44Z geaz $
*/
public interface MailService
{
+ /**
+ * Provides {@link Session} instance, which is to be used throughout {@link MailService} methods
+ * @return {@link Session}
+ */
public Session getMailSession();
+ /**
+ * Provides outgoing server information, which is basically its hostname or ip address.
+ * This server is used as transceiver for mail messages. {@link MailService} should send message
+ * to the server first and than server will resend messages to the receivers.
+ * @return
+ */
public String getOutgoingMailServer();
+ /**
+ * Sends mail message based on passed {@link String} parameters.
+ * @param from - {@link String} identificator of mail sender. For example 'test.sender(a)test.test'
+ * @param to - {@link String} identificator of mail receiver. For example 'test.receiver(a)test.test'
+ * @param subject - {@link String} subject of mail message
+ * @param body - {@link String} contents of mail message
+ * @throws Exception is thrown if something's gone wrong during mail send procedure
+ */
public void sendMessage(String from, String to, String subject, String body) throws Exception;
+ /**
+ * Sends mail message based on {@link Message} instance
+ * @param message - {@link Message} provides mail message related data (e.g. subject, content etc.)
+ * @throws Exception is thrown if something's gone wrong during mail send procedure
+ */
public void sendMessage(Message message) throws Exception;
+ /**
+ * Sends mail message based on {@link MimeMessage} instance
+ * @param message - {@link MimeMessage} provides mail message related data (e.g. subject, content etc.)
+ * @throws Exception is thrown if something's gone wrong during mail send procedure
+ */
public void sendMessage(MimeMessage message) throws Exception;
+
+ /**
+ * Asynchronous variant of {@link MailService#sendMessage(String, String, String, String)}.
+ * Returns {@link Future} object, which allows to track mail sending result. Calling {@link Future#get()}
+ * for this object returns {@link Boolean#TRUE} if mail is sent successfully,
+ * throws {@link ExecutionException} if some exception occured during mail sending.
+ * Calling {@link ExecutionException#getCause()} for the thrown exception object provides the exception,
+ * which indeed occured during sending mail.
+ * @param from - {@link String} identificator of mail sender. For example 'test.sender(a)test.test'
+ * @param to - {@link String} identificator of mail receiver. For example 'test.receiver(a)test.test'
+ * @param subject - {@link String} subject of mail message
+ * @param body - {@link String} contents of mail message
+ * @return {@link Future} object to watch the result of asynchronous calculation
+ */
+ public Future<Boolean> sendMessageAsynch(String from, String to, String subject, String body);
+
+ /**
+ * Asynchronous variant of {@link MailService#sendMessage(Message)}.
+ * Returns {@link Future} object, which allows to track mail sending result. Calling {@link Future#get()}
+ * for this object returns {@link Boolean#TRUE} if mail is sent successfully,
+ * throws {@link ExecutionException} if some exception occured during mail sending.
+ * Calling {@link ExecutionException#getCause()} for the thrown exception object provides the exception,
+ * which indeed occured during sending mail.
+ * @param message - {@link Message} provides mail message related data (e.g. subject, content etc.)
+ * @return {@link Future} object to watch the result of asynchronous calculation
+ */
+ public Future<Boolean> sendMessageAsynch(Message message);
+
+ /**
+ * Asynchronous variant of {@link MailService#sendMessage(MimeMessage)}.
+ * Returns {@link Future} object, which allows to track mail sending result. Calling {@link Future#get()}
+ * for this object returns {@link Boolean#TRUE} if mail is sent successfully,
+ * throws {@link ExecutionException} if some exception occured during mail sending.
+ * Calling {@link ExecutionException#getCause()} for the thrown exception object provides the exception,
+ * which indeed occured during sending mail.
+ * @param message - {@link MimeMessage} provides mail message related data (e.g. subject, content etc.)
+ * @return {@link Future} object to watch the result of asynchronous calculation
+ */
+ public Future<Boolean> sendMessageAsynch(MimeMessage message);
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java 2012-02-14 09:37:23 UTC (rev 5628)
@@ -20,6 +20,7 @@
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
import org.exoplatform.commons.utils.SecurityHelper;
+import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.mail.Attachment;
import org.exoplatform.services.mail.MailService;
@@ -30,6 +31,12 @@
import java.util.Date;
import java.util.List;
import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.ThreadFactory;
import javax.activation.DataHandler;
import javax.mail.Part;
@@ -43,16 +50,39 @@
import javax.mail.util.ByteArrayDataSource;
/**
+ * Basically this is {@link MailService} implementation build on top of javax.mail package.
+ * You may define the behaviour of the service via {@link InitParams}, which can
+ * be set in configuration file of the {@link ExoContainer}.
+ * <p>
+ * Note: To be able to send mails you must provide active SMTP server and
+ * mention it in service configuration.
+ * <p>
* Created by The eXo Platform SAS Author : Phung Hai Nam phunghainam(a)gmail.com
* Dec 23, 2005
*/
public class MailServiceImpl implements MailService
{
+ /**
+ * String mapping of configuration parameter to define maximal number
+ * of threads for asynchronous mail message sending
+ */
+ static final String MAX_THREAD_NUMBER = "mail.max.thread.number";
private Session mailSession_;
private Properties props_;
+ /**
+ * Provides thread pool routines for asynchronous mail message sending
+ */
+ private ExecutorService executorService;
+
+ /**
+ * Track current threads number used for asynchronouys mail send
+ * to set explicit thread names.
+ */
+ private static volatile int mailServiceThreadCounter = 0;
+
public MailServiceImpl(InitParams params) throws Exception
{
props_ = new Properties(PrivilegedSystemHelper.getProperties());
@@ -80,18 +110,38 @@
}
});
}
+ int threadNumber =
+ props_.getProperty(MAX_THREAD_NUMBER) != null ? Integer.valueOf(props_.getProperty(MAX_THREAD_NUMBER))
+ : Runtime.getRuntime().availableProcessors();
+
+ executorService = Executors.newFixedThreadPool(threadNumber, new ThreadFactory()
+ {
+ public Thread newThread(Runnable arg0)
+ {
+ return new Thread(arg0, "MailServiceThread-" + mailServiceThreadCounter++);
+ }
+ });
}
+ /**
+ * {@inheritDoc}
+ */
public Session getMailSession()
{
return mailSession_;
}
+ /**
+ * {@inheritDoc}
+ */
public String getOutgoingMailServer()
{
return props_.getProperty("mail.smtp.host");
}
+ /**
+ * {@inheritDoc}
+ */
public void sendMessage(String from, String to, String subject, String body) throws Exception
{
Message message = new Message();
@@ -102,6 +152,9 @@
sendMessage(message);
}
+ /**
+ * {@inheritDoc}
+ */
public void sendMessage(Message message) throws Exception
{
MimeMessage mimeMessage = new MimeMessage(getMailSession());
@@ -190,17 +243,82 @@
sendMessage(mimeMessage);
}
+ /**
+ * {@inheritDoc}
+ */
public void sendMessage(MimeMessage message) throws Exception
{
Transport.send(message);
}
- private String[] getArrs(String toArray)
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Future<Boolean> sendMessageAsynch(final String from, final String to, final String subject,
+ final String body)
{
+ FutureTask<Boolean> ft = new FutureTask<Boolean>(new Callable<Boolean>()
+ {
+ @Override
+ public Boolean call() throws Exception
+ {
+ sendMessage(from, to, subject, body);
+ return true;
+ }
+ });
+
+ executorService.execute(ft);
+ return ft;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Future<Boolean> sendMessageAsynch(final Message message)
+ {
+ FutureTask<Boolean> ft = new FutureTask<Boolean>(new Callable<Boolean>()
+ {
+ @Override
+ public Boolean call() throws Exception
+ {
+ sendMessage(message);
+ return true;
+ }
+ });
+
+ executorService.execute(ft);
+ return ft;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Future<Boolean> sendMessageAsynch(final MimeMessage message)
+ {
+ FutureTask<Boolean> ft = new FutureTask<Boolean>(new Callable<Boolean>()
+ {
+ @Override
+ public Boolean call() throws Exception
+ {
+ sendMessage(message);
+ return true;
+ }
+ });
+
+ executorService.execute(ft);
+ return ft;
+ }
+
+ protected String[] getArrs(String toArray)
+ {
if (toArray != null && !toArray.equals(""))
{
return toArray.split(",");
}
return null;
}
+
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/net/impl/NetServiceImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/net/impl/NetServiceImpl.java 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/net/impl/NetServiceImpl.java 2012-02-14 09:37:23 UTC (rev 5628)
@@ -47,6 +47,7 @@
}
});
endTime = System.currentTimeMillis();
+ socket.close();
}
catch (PrivilegedActionException e)
{
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/test/java/org/exoplatform/services/mail/test/TestMailService.java 2012-02-14 09:37:23 UTC (rev 5628)
@@ -18,6 +18,9 @@
*/
package org.exoplatform.services.mail.test;
+import com.dumbster.smtp.SimpleSmtpServer;
+import com.dumbster.smtp.SmtpMessage;
+
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.mail.Attachment;
import org.exoplatform.services.mail.MailService;
@@ -26,10 +29,16 @@
import org.exoplatform.test.BasicTestCase;
import java.io.ByteArrayInputStream;
+import java.util.Iterator;
import java.util.Properties;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
import javax.mail.Flags;
+import javax.mail.MessagingException;
import javax.mail.Session;
+import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
@@ -39,14 +48,58 @@
*/
public class TestMailService extends BasicTestCase
{
- static private String EMAIL = "<exo@PC01>";
+ /**
+ * Test email subject used throughout the test cases
+ */
+ static private String MAIL_SUBJECT = "eXo Test Subject";
+
+ /**
+ * Test email contents used throughout the test cases
+ */
+ static private String MAIL_CONTENTS = "eXo Mail Service Test Content";
- static private int MAIL_PORT = 25;
+ /**
+ * Test email attachment used throughout the test cases
+ */
+ static private String ATTACHMENT = "eXo Mail Service Test Attachment";
- private MailService service_;
+ /**
+ * Mime-type corresponding to plain text documents
+ */
+ static private String TEXT_PLAIN = "text/plain";
- private NetService nservice_;
+ /**
+ * Mime-type corresponding to html documents
+ */
+ static private String TEXT_HTML = "text/html";
+ /**
+ * Time we assume to be enough to wait for server to receive sent emails
+ */
+ static private long ONE_SECOND = 1000l;
+
+ /**
+ * SMTP server prot, used for mail session
+ * and {@link SimpleSmtpServer} configuration
+ * Though the default port is 25, to run server
+ * with default port you must have root privilegies
+ */
+ static private int SMTP_PORT = 2525;
+
+ /**
+ * Thread number for asynchronous message send tests
+ */
+ static private int THREAD_NUMBER = 4;
+
+ /**
+ * SMTP mail server instance, to emulate basic SMTP mail server functions
+ */
+ protected SimpleSmtpServer mailServer;
+
+ private MailService service;
+
+ private NetService netService;
+
public TestMailService(String name)
{
super(name);
@@ -54,78 +107,409 @@
public void setUp() throws Exception
{
- if (service_ == null)
+ if (service == null)
{
PortalContainer pcontainer = PortalContainer.getInstance();
- service_ = (MailService)pcontainer.getComponentInstanceOfType(MailService.class);
- nservice_ = (NetService)pcontainer.getComponentInstanceOfType(NetService.class);
+ service = (MailService)pcontainer.getComponentInstanceOfType(MailService.class);
+ netService = (NetService)pcontainer.getComponentInstanceOfType(NetService.class);
}
+ // starting dummy SMTP Server
+ if (mailServer == null)
+ {
+ mailServer = SimpleSmtpServer.start(SMTP_PORT);
+ }
}
- public void testSendMineMessage() throws Exception
+ public void tearDown() throws Exception
{
+ mailServer.stop();
+ }
+
+ public void testSendMimeMessage() throws Exception
+ {
if (!pingMailServer())
- return;
- Properties props = new Properties(System.getProperties());
- Session session = Session.getDefaultInstance(props, null);
- session.setDebug(true);
- MimeMessage message = new MimeMessage(session);
- message.setFrom(new InternetAddress("exo@PC01"));
- message.setRecipients(javax.mail.Message.RecipientType.TO, EMAIL);
- message.setSubject("Test Java Mail Service");
- message.setContent("This is the contents of the Java Mail !", "text/plain");
+ {
+ fail();
+ }
+
+ MimeMessage message = new MimeMessage(service.getMailSession());
+ message.setFrom(new InternetAddress(generateRandomEmailSender()));
+ message.setRecipients(javax.mail.Message.RecipientType.TO, generateRandomEmailRecipient());
+ message.setSubject(MAIL_SUBJECT);
+ message.setContent(MAIL_CONTENTS, TEXT_PLAIN);
Flags flags = new Flags();
flags.add(Flags.Flag.RECENT);
message.setFlags(flags, true);
- service_.sendMessage(message);
+
+ cleanEmailMessages();
+ assertEquals("SMTP server should be now empty", 0, mailServer.getReceivedEmailSize());
+ assertFalse(isEmailMessageSent(MAIL_SUBJECT));
+ service.sendMessage(message);
+ Thread.sleep(ONE_SECOND);
+ assertEquals("SMTP server should have one message", 1, mailServer.getReceivedEmailSize());
+ assertTrue(isEmailMessageSent(MAIL_SUBJECT));
}
public void testSendMessage() throws Exception
{
if (!pingMailServer())
- return;
- ByteArrayInputStream is = new ByteArrayInputStream("===> Attachement text".getBytes());
- String TO = "<exo@PC01>";
- String FROM = TO;
- String CC = "<exo@PC01>, <exo@PC01>";
- String BCC = "<exo@PC01>, <exo@PC01>";
- String subject = "Subject test";
- String contents = "This is test sendMessage method !";
- String mimeType = "text/html";
+ {
+ fail();
+ }
+
Message message = new Message();
- message.setFrom(FROM);
- message.setTo(TO);
- message.setCC(CC);
- message.setBCC(BCC);
- message.setSubject(subject);
- message.setBody(contents);
- message.setMimeType(mimeType);
+ message.setFrom(generateRandomEmailSender());
+ message.setTo(generateRandomEmailRecipient());
+ message.setCC(generateRandomEmailRecipient() + "," + generateRandomEmailRecipient());
+ message.setBCC(generateRandomEmailRecipient() + "," + generateRandomEmailRecipient());
+ message.setSubject(MAIL_SUBJECT);
+ message.setBody(MAIL_CONTENTS);
+ message.setMimeType(TEXT_HTML);
Attachment attachment = new Attachment();
- attachment.setInputStream(is);
- attachment.setMimeType("text/plain");
+ attachment.setInputStream(new ByteArrayInputStream(ATTACHMENT.getBytes()));
+ attachment.setMimeType(TEXT_PLAIN);
message.addAttachment(attachment);
- service_.sendMessage(message);
+
+ cleanEmailMessages();
+ assertEquals("SMTP server should be now empty", 0, mailServer.getReceivedEmailSize());
+ assertFalse(isEmailMessageSent(MAIL_SUBJECT));
+ service.sendMessage(message);
+ Thread.sleep(ONE_SECOND);
+ assertEquals("SMTP server should have one message", 1, mailServer.getReceivedEmailSize());
+ assertTrue(isEmailMessageSent(MAIL_SUBJECT));
}
- public void testSendMessageWithInfo() throws Exception
+ public void testSendSimplMessage() throws Exception
{
if (!pingMailServer())
- return;
- String TO = "<exo@PC01>";
- String FROM = TO;
- String subject = "Subject test";
- String contents = "This is test sendMessage method with 4 parameter !";
- service_.sendMessage(FROM, TO, subject, contents);
+ {
+ fail();
+ }
+
+ cleanEmailMessages();
+ assertEquals("SMTP server should be now empty", 0, mailServer.getReceivedEmailSize());
+ assertFalse(isEmailMessageSent(MAIL_SUBJECT));
+ service.sendMessage(generateRandomEmailSender(), generateRandomEmailRecipient(), MAIL_SUBJECT, MAIL_CONTENTS);
+ Thread.sleep(ONE_SECOND);
+ assertEquals("SMTP server should have one message", 1, mailServer.getReceivedEmailSize());
+ assertTrue(isEmailMessageSent(MAIL_SUBJECT));
}
+ /**
+ * Here we test asynchronous email sending explicitly defined by sender,
+ * recipient, subject and content parameters.
+ * We check if we can get real cause of exception, if that occurs during
+ * message sending process.
+ */
+ public void testSendSimpleMessageAsynchExceptionCause() throws Exception
+ {
+ if (!pingMailServer())
+ {
+ fail();
+ }
+
+ Future<Boolean> future =
+ service.sendMessageAsynch("!@#$%^&*()", generateRandomEmailSender(), MAIL_SUBJECT, MAIL_CONTENTS);
+
+ try
+ {
+ future.get();
+ fail();
+ }
+ catch (ExecutionException ee)
+ {
+ assertEquals("We tried to send mail with malformed sender field,"
+ + " so we expect an AdressException to be the real cause of ExecutionException", ee.getCause().getClass(),
+ AddressException.class);
+ }
+ }
+
+ /**
+ * Here we test asynchronous email sending explicitly defined by sender,
+ * recipient, subject and content parameters.
+ * We check concurrent execution of {@link FutureTask}
+ */
+ public void testSendSimpleMessageAsynch() throws Exception
+ {
+ if (!pingMailServer())
+ {
+ fail();
+ }
+
+ @SuppressWarnings("unchecked")
+ Future<Boolean>[] futures = new Future[THREAD_NUMBER];
+
+ cleanEmailMessages();
+
+ assertEquals("SMTP server should be now empty", 0, mailServer.getReceivedEmailSize());
+ for (int i = 0; i < THREAD_NUMBER; i++)
+ {
+ assertFalse(isEmailMessageSent(MAIL_SUBJECT + i));
+ futures[i] =
+ service.sendMessageAsynch(generateRandomEmailSender(), generateRandomEmailRecipient(), MAIL_SUBJECT + i,
+ MAIL_CONTENTS + i);
+ }
+
+ for (int i = 0; i < THREAD_NUMBER; i++)
+ {
+ assertTrue(futures[i].get());
+ assertTrue(isEmailMessageSent(MAIL_SUBJECT + i));
+ }
+ //we assume that one thread sends one email
+ assertEquals("SMTP server should have" + THREAD_NUMBER + " message (asynchronously sent)", THREAD_NUMBER,
+ mailServer.getReceivedEmailSize());
+ }
+
+
+ /**
+ * Here we test asynchronous email sending of {@link MimeMessage}.
+ * We check if we can get real cause of exception, if that occurs during
+ * message sending process.
+ */
+ public void testSendMimeMessageAsynchExceptionCause() throws Exception
+ {
+ if (!pingMailServer())
+ {
+ fail();
+ }
+
+ Flags flags = new Flags();
+ flags.add(Flags.Flag.RECENT);
+
+ Properties props = new Properties(System.getProperties());
+ props.put("mail.smtp.port", SMTP_PORT + 1);
+ Session session = Session.getDefaultInstance(props, null);
+
+ MimeMessage message = new MimeMessage(session);
+ message.setFrom(new InternetAddress(generateRandomEmailSender()));
+ message.setRecipients(javax.mail.Message.RecipientType.TO, generateRandomEmailRecipient());
+ message.setSubject(MAIL_SUBJECT);
+ message.setContent(MAIL_CONTENTS, TEXT_PLAIN);
+ message.setFlags(flags, true);
+
+ Future<Boolean> future = service.sendMessageAsynch(message);
+
+ try
+ {
+ future.get();
+ fail();
+ }
+ catch (ExecutionException ee)
+ {
+ assertEquals("We tried to send mail with malformed SMTP port (" + SMTP_PORT + 1
+ + "), so we expect a MessagingException to be the real cause of ExecutionException", ee.getCause()
+ .getClass(), MessagingException.class);
+ }
+ }
+
+ /**
+ * Here we test asynchronous email sending of {@link MimeMessage}.
+ * We check concurrent execution of {@link FutureTask}
+ */
+ public void testSendMimeMessageAsynch() throws Exception
+ {
+ if (!pingMailServer())
+ {
+ fail();
+ }
+
+ @SuppressWarnings("unchecked")
+ Future<Boolean>[] futures = new Future[THREAD_NUMBER];
+ MimeMessage message;
+ Flags flags = new Flags(Flags.Flag.RECENT);
+ Session session = service.getMailSession();
+
+ cleanEmailMessages();
+
+ assertEquals("SMTP server should be now empty", 0, mailServer.getReceivedEmailSize());
+
+ for (int i = 0; i < THREAD_NUMBER; i++)
+ {
+ assertFalse(isEmailMessageSent(MAIL_SUBJECT + i));
+
+ message = new MimeMessage(session);
+ message.setFrom(new InternetAddress(generateRandomEmailSender()));
+ message.setRecipients(javax.mail.Message.RecipientType.TO, generateRandomEmailRecipient());
+ message.setSubject(MAIL_SUBJECT + i);
+ message.setContent(MAIL_CONTENTS + i, TEXT_PLAIN);
+ message.setFlags(flags, true);
+
+ futures[i] = service.sendMessageAsynch(message);
+ }
+
+ for (int i = 0; i < THREAD_NUMBER; i++)
+ {
+ assertTrue(futures[i].get());
+ assertTrue(isEmailMessageSent(MAIL_SUBJECT + i));
+ }
+ //we assume that one thread sends one email
+ assertEquals("SMTP server should have" + THREAD_NUMBER + " message (asynchronously sent)", THREAD_NUMBER,
+ mailServer.getReceivedEmailSize());
+ }
+
+ /**
+ * Here we test asynchronous email sending of {@link Message}.
+ * We check if we can get real cause of exception, if that occurs during
+ * message sending process.
+ */
+ public void testSendMessageAsynchExceptionCause() throws Exception
+ {
+ if (!pingMailServer())
+ {
+ fail();
+ }
+
+ Attachment attachment = new Attachment();
+ attachment.setInputStream(new ByteArrayInputStream(ATTACHMENT.getBytes()));
+ attachment.setMimeType(TEXT_PLAIN);
+
+ Message message = new Message();
+ message.setFrom("!@#$%^&*()");
+ message.setTo(generateRandomEmailRecipient());
+ message.setCC(generateRandomEmailRecipient() + "," + generateRandomEmailRecipient());
+ message.setBCC(generateRandomEmailRecipient() + "," + generateRandomEmailRecipient());
+ message.setSubject(MAIL_SUBJECT);
+ message.setBody(MAIL_CONTENTS);
+ message.setMimeType(TEXT_HTML);
+ message.addAttachment(attachment);
+
+ Future<Boolean> future = service.sendMessageAsynch(message);
+
+ try
+ {
+ future.get();
+ fail();
+ }
+ catch (ExecutionException ee)
+ {
+ assertEquals("We tried to send mail with malformed sender field,"
+ + " so we expect an AdressException to be the real cause of ExecutionException", ee.getCause().getClass(),
+ AddressException.class);
+ }
+ }
+
+ /**
+ * Here we test asynchronous email sending of {@link Message}.
+ * We check concurrent execution of {@link FutureTask}
+ */
+ public void testSendMessageInFuture() throws Exception
+ {
+ if (!pingMailServer())
+ {
+ fail();
+ }
+
+ Message message;
+
+ Attachment attachment = new Attachment();
+ attachment.setInputStream(new ByteArrayInputStream(ATTACHMENT.getBytes()));
+ attachment.setMimeType(TEXT_PLAIN);
+
+ @SuppressWarnings("unchecked")
+ Future<Boolean>[] futures = new Future[THREAD_NUMBER];
+
+ cleanEmailMessages();
+
+ assertEquals("SMTP server should be now empty", 0, mailServer.getReceivedEmailSize());
+
+ for (int i = 0; i < THREAD_NUMBER; i++)
+ {
+ assertFalse(isEmailMessageSent(MAIL_SUBJECT + i));
+
+ message = new Message();
+ message.setFrom(generateRandomEmailSender());
+ message.setTo(generateRandomEmailRecipient());
+ message.setCC(generateRandomEmailRecipient() + "," + generateRandomEmailRecipient());
+ message.setBCC(generateRandomEmailRecipient() + "," + generateRandomEmailRecipient());
+ message.setSubject(MAIL_SUBJECT + i);
+ message.setBody(MAIL_CONTENTS + i);
+ message.setMimeType(TEXT_HTML);
+ message.addAttachment(attachment);
+
+ futures[i] = service.sendMessageAsynch(message);
+ assertFalse(futures[i].isDone());
+ }
+
+ for (int i = 0; i < THREAD_NUMBER; i++)
+ {
+ assertTrue(futures[i].get());
+ assertTrue(isEmailMessageSent(MAIL_SUBJECT + i));
+ }
+ //we assume that one thread sends one email
+ assertEquals("SMTP server should have" + THREAD_NUMBER + " message (asynchronously sent)", THREAD_NUMBER,
+ mailServer.getReceivedEmailSize());
+ }
+
private boolean pingMailServer() throws Exception
{
- String mailServer = service_.getOutgoingMailServer();
- if (nservice_.ping(mailServer, MAIL_PORT) < 0)
+ String mailServerName = service.getOutgoingMailServer();
+ if (netService.ping(mailServerName, SMTP_PORT) < 0)
{
- System.out.println("======>MailServer:" + mailServer + " and on port:" + MAIL_PORT + " is not connected");
+ System.out.println("======>MailServer:" + mailServerName + " and on port:" + SMTP_PORT + " is not connected");
return false;
}
return true;
}
+
+ /**
+ * Utility method to clean mail server.
+ * Removes all stored messages one by one.
+ */
+ private void cleanEmailMessages()
+ {
+ if (mailServer.getReceivedEmailSize() > 0)
+ {
+ @SuppressWarnings("unchecked")
+ Iterator<SmtpMessage> it = mailServer.getReceivedEmail();
+ while (it.hasNext())
+ {
+ it.next();
+ it.remove();
+ }
+ }
+ }
+
+ /**
+ * Utility method to check if you really sent message
+ * to dummy mail server. Basically it simply checks if
+ * there is an email with defined 'subject' header.
+ * @param subject
+ * @return
+ */
+ private boolean isEmailMessageSent(String subject)
+ {
+ if (mailServer.getReceivedEmailSize() > 0)
+ {
+ @SuppressWarnings("unchecked")
+ Iterator<SmtpMessage> it = mailServer.getReceivedEmail();
+ SmtpMessage message;
+ while (it.hasNext())
+ {
+ message = it.next();
+ if (message.getHeaderValue("Subject") != null && message.getHeaderValue("Subject").equals(subject))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Utility method to generate random email sender String
+ * @return {@link String} random email sender
+ */
+ private String generateRandomEmailSender()
+ {
+ return "<exo-sender" + System.currentTimeMillis() + "@localhost>";
+ }
+
+ /**
+ * Utility method to generate random email recipient String
+ * @return {@link String} random email recipient
+ */
+ private String generateRandomEmailRecipient()
+ {
+ return "<exo-recipient" + System.currentTimeMillis() + "@localhost>";
+ }
}
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/conf/portal/test-configuration.xml 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/conf/portal/test-configuration.xml 2012-02-14 09:37:23 UTC (rev 5628)
@@ -57,13 +57,16 @@
<init-params>
<properties-param>
<name>config</name>
- <property name="mail.smtp.host" value="PC01" />
- <property name="mail.smtp.port" value="25" />
+ <property name="mail.smtp.host" value="localhost" />
+ <property name="mail.smtp.port" value="2525" />
<property name="mail.transport.protocol" value="smtp" />
<property name="mail.smtp.auth" value="false" />
<property name="mail.smtp.auth.username" value="exo" />
<property name="mail.smtp.auth.password" value="exo" />
+
+ <property name="mail.max.thread.number" value="4" />
+
</properties-param>
</init-params>
</component>
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/test.policy
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/test.policy 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/test/resources/test.policy 2012-02-14 09:37:23 UTC (rev 5628)
@@ -12,6 +12,8 @@
grant codeBase "@TEST_CLASSES@-"{
permission java.lang.RuntimePermission "manageContainer";
+ permission java.net.SocketPermission "127.0.0.1:2526", "connect, resolve";
+ permission java.net.SocketPermission "127.0.0.1:2525", "connect, resolve";
};
grant codeBase "@MAIN_CLASSES@../../../exo.kernel.commons.test/-"{
Modified: kernel/branches/2.4.x/pom.xml
===================================================================
--- kernel/branches/2.4.x/pom.xml 2012-02-13 15:35:28 UTC (rev 5627)
+++ kernel/branches/2.4.x/pom.xml 2012-02-14 09:37:23 UTC (rev 5628)
@@ -240,6 +240,12 @@
<artifactId>transactions-jta</artifactId>
<version>3.7.0</version>
</dependency>
+ <dependency>
+ <groupId>dumbster</groupId>
+ <artifactId>dumbster</artifactId>
+ <version>1.6</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
12 years, 4 months