[rhmessaging-commits] rhmessaging commits: r4022 - in store/trunk/java/bdbstore/src: tools/java/org/apache/qpid/server/util and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Jun 14 08:52:39 EDT 2010


Author: ritchiem
Date: 2010-06-14 08:52:38 -0400 (Mon, 14 Jun 2010)
New Revision: 4022

Removed:
   store/trunk/java/bdbstore/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java
Modified:
   store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
QPID-2652 : Logging Update

Modified: store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java	2010-06-11 19:43:00 UTC (rev 4021)
+++ store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java	2010-06-14 12:52:38 UTC (rev 4022)
@@ -179,7 +179,7 @@
                                      LogSubject logSubject) throws Exception
     {
         _logSubject = logSubject;
-        CurrentActor.get().message(_logSubject, ConfigStoreMessages.CFG_1001(this.getClass().getName()));
+        CurrentActor.get().message(_logSubject, ConfigStoreMessages.CREATED(this.getClass().getName()));
 
         if(_configured)
         {
@@ -200,7 +200,7 @@
                                       Configuration storeConfiguration,
                                       LogSubject logSubject) throws Exception
     {
-        CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_CREATED(this.getClass().getName()));
+        CurrentActor.get().message(_logSubject, MessageStoreMessages.CREATED(this.getClass().getName()));
 
         if(!_configured)
         {
@@ -213,7 +213,7 @@
     public void configureTransactionLog(String name, TransactionLogRecoveryHandler recoveryHandler,
             Configuration storeConfiguration, LogSubject logSubject) throws Exception
     {
-        CurrentActor.get().message(_logSubject, TransactionLogMessages.TXN_1001(this.getClass().getName()));
+        CurrentActor.get().message(_logSubject, TransactionLogMessages.CREATED(this.getClass().getName()));
 
         if(!_configured)
         {
@@ -253,7 +253,7 @@
             }
         }
 
-        CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_STORE_LOCATION(environmentPath.getAbsolutePath()));
+        CurrentActor.get().message(_logSubject, MessageStoreMessages.STORE_LOCATION(environmentPath.getAbsolutePath()));
 
         _version = storeConfig.getInt(DATABASE_FORMAT_VERSION_PROPERTY, DATABASE_FORMAT_VERSION);
 
@@ -499,7 +499,7 @@
 
         _state = State.CLOSED;
         
-        CurrentActor.get().message(_logSubject,MessageStoreMessages.MST_CLOSED());
+        CurrentActor.get().message(_logSubject,MessageStoreMessages.CLOSED());
     }
 
     private void closeEnvironment() throws DatabaseException
@@ -519,7 +519,7 @@
     {
         stateTransition(State.CONFIGURED, State.RECOVERING);
 
-        CurrentActor.get().message(_logSubject,MessageStoreMessages.MST_RECOVERY_START());
+        CurrentActor.get().message(_logSubject,MessageStoreMessages.RECOVERY_START());
 
         try
         {

Deleted: store/trunk/java/bdbstore/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java
===================================================================
--- store/trunk/java/bdbstore/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java	2010-06-11 19:43:00 UTC (rev 4021)
+++ store/trunk/java/bdbstore/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java	2010-06-14 12:52:38 UTC (rev 4022)
@@ -1,118 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.util;
-
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.server.configuration.VirtualHostConfiguration;
-import org.apache.qpid.server.logging.NullRootMessageLogger;
-import org.apache.qpid.server.logging.actors.CurrentActor;
-import org.apache.qpid.server.logging.actors.BrokerActor;
-import org.apache.qpid.server.management.NoopManagedObjectRegistry;
-import org.apache.qpid.server.plugins.PluginManager;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-//import org.apache.qpid.server.security.access.ACLManager;
-import org.apache.qpid.server.security.access.plugins.AllowAll;
-import org.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabaseManager;
-import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Properties;
-import java.util.NoSuchElementException;
-
-public class NullApplicationRegistry extends ApplicationRegistry
-{
-    public NullApplicationRegistry() throws ConfigurationException
-    {
-        super(new ServerConfiguration(new PropertiesConfiguration()));
-    }
-
-    public void initialise(int instanceID) throws Exception
-    {
-        _logger.info("Initialising NullApplicationRegistry");
-
-        _rootMessageLogger = new NullRootMessageLogger();
-
-        //We should use a Test Actor Here not the Broker Actor
-        CurrentActor.set(new BrokerActor(_rootMessageLogger));
-
-        _configuration.setHousekeepingExpiredMessageCheckPeriod(200);
-
-        Properties users = new Properties();
-
-        users.put("guest", "guest");
-
-        _databaseManager = new PropertiesPrincipalDatabaseManager("default", users);
-
-        // FIXME _accessManager = new ACLManager(_configuration.getSecurityConfiguration(), _pluginManager, AllowAll.FACTORY);
-
-        _authenticationManager = new PrincipalDatabaseAuthenticationManager(null, null);
-
-        _managedObjectRegistry = new NoopManagedObjectRegistry();
-        _virtualHostRegistry = new VirtualHostRegistry(this);
-        PropertiesConfiguration vhostProps = new PropertiesConfiguration();
-        VirtualHostConfiguration hostConfig = new VirtualHostConfiguration("test", vhostProps);
-        VirtualHost dummyHost = new VirtualHostImpl(hostConfig,null);
-        _virtualHostRegistry.registerVirtualHost(dummyHost);
-        _virtualHostRegistry.setDefaultVirtualHostName("test");
-        // FIXME _pluginManager = new PluginManager("");
-        _startup = new Exception("NAR");
-
-    }
-       private Exception _startup;
-    public Collection<String> getVirtualHostNames()
-    {
-        String[] hosts = {"test"};
-        return Arrays.asList(hosts);
-    }
-
-    @Override
-    public void close()
-    {
-        CurrentActor.set(new BrokerActor(_rootMessageLogger));
-
-        try
-        {
-            super.close();                                                  
-        }
-        finally
-        {
-            try
-            {
-                CurrentActor.remove();
-            }
-            catch (NoSuchElementException npe)
-            {
-                _startup.printStackTrace();
-                _startup.printStackTrace(System.err);
-            }
-
-        }
-    }
-}
-
-
-



More information about the rhmessaging-commits mailing list