colus 02/01/23 01:25:31
Modified: apps/db/src/java/org/apache/avalon/db/actioncache
package.html
apps/demo/src/conf avalon-rmidemo-config.xml
apps/overlord/src/java/org/apache/avalon/overlord
Overlord.java
src/java/org/apache/avalon/cornerstone/blocks/rmification
DefaultRMIfication.java
Log:
Use default rmi registry port.
Revision Changes Path
1.2 +19 -19
jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/actioncache/package.html
Index: package.html
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/actioncache/package.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- package.html 9 Nov 2001 13:55:33 -0000 1.1
+++ package.html 23 Jan 2002 09:25:31 -0000 1.2
@@ -1,19 +1,19 @@
-<html>
-<body>
-<p>
-What we are hoping will exist here is a cache that can be used for retrieval
of Actions that are suitable for given SQL statements.</p>
-<p>
-E.g.<br/>
-<br/>
- SELECT * FROM Flintstones WHERE surname = 'Rubble'</p>
-<p>
-The idea is that an Action may be created for that, albeit simple, statement
and that suitable candidates in the future may shortcut the parsing process and
retrieve the action from the cache.</p>
-<p>
-The white-space cleaned statement would be used as the key for the cache.</p>
-<p>
-As a second possibility, we could could remove the "Rubble" and substitute
"?" (just like prepared statements) and have that more general case cached.</p>
-<p>
-- Paul H
-</p>
-</body>
-</html>
+<html>
+<body>
+<p>
+What we are hoping will exist here is a cache that can be used for retrieval
of Actions that are suitable for given SQL statements.</p>
+<p>
+E.g.<br/>
+<br/>
+ SELECT * FROM Flintstones WHERE surname = 'Rubble'</p>
+<p>
+The idea is that an Action may be created for that, albeit simple, statement
and that suitable candidates in the future may shortcut the parsing process and
retrieve the action from the cache.</p>
+<p>
+The white-space cleaned statement would be used as the key for the cache.</p>
+<p>
+As a second possibility, we could could remove the "Rubble" and substitute
"?" (just like prepared statements) and have that more general case cached.</p>
+<p>
+- Paul H
+</p>
+</body>
+</html>
1.2 +1 -1
jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-config.xml
Index: avalon-rmidemo-config.xml
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-config.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- avalon-rmidemo-config.xml 11 Jan 2002 11:22:12 -0000 1.1
+++ avalon-rmidemo-config.xml 23 Jan 2002 09:25:31 -0000 1.2
@@ -11,7 +11,7 @@
</rmification-listener>
<rmification>
- <port>9999</port>
+ <port>1099</port>
</rmification>
</config>
1.5 +32 -35
jakarta-avalon-cornerstone/apps/overlord/src/java/org/apache/avalon/overlord/Overlord.java
Index: Overlord.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/overlord/src/java/org/apache/avalon/overlord/Overlord.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Overlord.java 1 Dec 2001 06:28:03 -0000 1.4
+++ Overlord.java 23 Jan 2002 09:25:31 -0000 1.5
@@ -21,13 +21,11 @@
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.excalibur.component.ComponentHandler;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.phoenix.Block;
@@ -44,16 +42,16 @@
extends AbstractLogEnabled
implements Contextualizable, Composable, Configurable, Initializable,
Disposable, Block, GatheringServer
{
- private static final Resources REZ =
+ private static final Resources REZ =
ResourceManager.getPackageResources( Overlord.class );
- private BlockContext m_context;
- private ComponentManager m_componentManager;
- private Configuration m_configuration;
- private TimeScheduler m_scheduler;
- private TimeTriggerFactory m_triggerFactory;
- private Map m_collectors;
- private List m_taskNames;
+ private BlockContext m_context;
+ private ComponentManager m_componentManager;
+ private Configuration m_configuration;
+ private TimeScheduler m_scheduler;
+ private TimeTriggerFactory m_triggerFactory;
+ private Map m_collectors;
+ private List m_taskNames;
public void contextualize( final Context context )
{
@@ -75,13 +73,24 @@
m_configuration = configuration;
}
- private void initializeCollectors( final Configuration configuration )
+ public void initialize()
throws Exception
{
- final Logger logger = getLogger().getChildLogger( "collectors" );
+ m_triggerFactory = new TimeTriggerFactory();
+
+ initializeCollectors( m_configuration.getChild( "collectors" ) );
+ initializeTasks( m_configuration.getChild( "tasks" ) );
+ getLogger().info( REZ.getString( "overlord.notice.ready" ) );
+ }
+
+ private void initializeCollectors( final Configuration configuration )
+ throws Exception
+ {
m_collectors = new HashMap();
+ final Logger logger = getLogger().getChildLogger( "collectors" );
+
final Configuration[] confs = configuration.getChildren( "collector"
);
for ( int i = 0; i < confs.length; i++ )
{
@@ -119,17 +128,6 @@
}
}
- public void initialize()
- throws Exception
- {
- m_triggerFactory = new TimeTriggerFactory();
-
- initializeCollectors( m_configuration.getChild( "collectors" ) );
- initializeTasks( m_configuration.getChild( "tasks" ) );
-
- getLogger().info( REZ.getString( "overlord.notice.ready" ) );
- }
-
public void dispose()
{
disposeTasks();
@@ -138,12 +136,11 @@
private void disposeTasks()
{
- final Iterator taskNames = m_taskNames.iterator();
- while ( taskNames.hasNext() )
+ final String[] taskNames = (String[])m_taskNames.toArray( new
String[] );
+ for ( int i = 0; i < taskNames.length; i++ )
{
- removeTask( (String)taskNames.next() );
+ removeTask( taskNames[ i ] );
}
- m_taskNames.clear();
m_taskNames = null;
}
@@ -188,7 +185,7 @@
/**
* Add task.
*
- * @param taskName the name of task to add
+ * @param taskName the name of task to add
* @param trigger trigger
* @param collector collector to invoke
*/
@@ -266,33 +263,33 @@
private void setupComponent( final Component component,
final Logger logger,
final Context context,
- final ComponentManager componentManager,
+ final ComponentManager componentManager,
final Configuration configuration )
throws Exception
{
if ( component instanceof LogEnabled )
{
- ((LogEnabled)component).enableLogging( logger );
+ ( (LogEnabled)component ).enableLogging( logger );
}
if ( component instanceof Contextualizable )
{
- ((Contextualizable)component).contextualize( context );
+ ( (Contextualizable)component ).contextualize( context );
}
if ( component instanceof Composable )
{
- ((Composable)component).compose( componentManager );
+ ( (Composable)component ).compose( componentManager );
}
if ( component instanceof Configurable )
{
- ((Configurable)component).configure( configuration );
+ ( (Configurable)component ).configure( configuration );
}
if ( component instanceof Initializable )
{
- ((Initializable)component).initialize();
+ ( (Initializable)component ).initialize();
}
}
@@ -300,7 +297,7 @@
{
if ( component instanceof Disposable )
{
- ((Disposable)component).dispose();
+ ( (Disposable)component ).dispose();
}
}
}
1.4 +2 -2
jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/rmification/DefaultRMIfication.java
Index: DefaultRMIfication.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/rmification/DefaultRMIfication.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultRMIfication.java 14 Jan 2002 11:08:05 -0000 1.3
+++ DefaultRMIfication.java 23 Jan 2002 09:25:31 -0000 1.4
@@ -30,7 +30,7 @@
* Default implementation of <code>RMIfication</code>.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Eung-ju Park</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class DefaultRMIfication
extends AbstractLogEnabled
@@ -43,7 +43,7 @@
public void configure( final Configuration configuration )
throws ConfigurationException
{
- m_port = configuration.getChild( "port" ).getValueAsInteger();
+ m_port = configuration.getChild( "port", true ).getValueAsInteger(
Registry.REGISTRY_PORT );
}
public void initialize()
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>