donaldp 2002/11/06 21:20:09
Modified: datasource/examples/src/java/org/apache/avalon/examples/jdbcdatasource
Main.java
Log:
Whitespace.
Revision Changes Path
1.3 +19 -19
jakarta-avalon-excalibur/datasource/examples/src/java/org/apache/avalon/examples/jdbcdatasource/Main.java
Index: Main.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/datasource/examples/src/java/org/apache/avalon/examples/jdbcdatasource/Main.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Main.java 3 Oct 2002 03:36:06 -0000 1.2
+++ Main.java 7 Nov 2002 05:20:09 -0000 1.3
@@ -40,12 +40,12 @@
* Constructors
*-------------------------------------------------------------*/
private Main() {}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
/**
- * Creates and initializes the component manager using config files.
+ * Creates and initializes the component m_manager using config files.
*
* @return the ECM for use.
*
@@ -58,43 +58,43 @@
DefaultContext context = new DefaultContext();
// Add any context variables here.
context.makeReadOnly();
-
+
// Create a ConfigurationBuilder to parse the config files.
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-
+
// Load in the configuration files
Configuration logKitConfig = builder.build( "../conf/logkit.xml" );
Configuration rolesConfig = builder.build( "../conf/roles.xml" );
Configuration componentsConfig = builder.build( "../conf/components.xml" );
-
+
// Setup the LogKitManager
DefaultLogKitManager logManager = new DefaultLogKitManager();
Logger lmLogger = Hierarchy.getDefaultHierarchy().
getLoggerFor( logKitConfig.getAttribute( "logger", "lm" ) );
- lmLogger.setPriority(
+ lmLogger.setPriority(
Priority.getPriorityForName( logKitConfig.getAttribute( "log-level",
"INFO" ) ) );
logManager.setLogger( lmLogger );
logManager.configure( logKitConfig );
-
+
// Setup the RoleManager
DefaultRoleManager roleManager = new DefaultRoleManager();
- roleManager.setLogger(
+ roleManager.setLogger(
logManager.getLogger( rolesConfig.getAttribute( "logger", "rm" ) ) );
roleManager.configure( rolesConfig );
-
+
// Set up the ComponentManager
ExcaliburComponentManager manager = new ExcaliburComponentManager();
- manager.setLogger(
+ manager.setLogger(
logManager.getLogger( componentsConfig.getAttribute( "logger", "cm" ) )
);
manager.setLogKitManager( logManager );
manager.contextualize( context );
manager.setRoleManager( roleManager );
manager.configure( componentsConfig );
manager.initialize();
-
+
return manager;
}
-
+
/**
* Loop and handle requests from the user.
*
@@ -105,7 +105,7 @@
System.out.println();
System.out.println( "Please enter a title to be added to the database" );
System.out.println( " (RESET deletes all titles, LIST lists all titles,
QUIT or EXIT to quit)" );
-
+
BufferedReader in = new BufferedReader( new InputStreamReader( System.in )
);
String title;
boolean quit = false;
@@ -120,7 +120,7 @@
{
title = "";
}
-
+
if ( title.length() > 0 )
{
if ( title.equalsIgnoreCase( "RESET" ) )
@@ -145,10 +145,10 @@
}
}
while ( !quit );
-
+
System.out.println();
}
-
+
/*---------------------------------------------------------------
* Main method
*-------------------------------------------------------------*/
@@ -163,7 +163,7 @@
throws Exception
{
System.out.println( "Running the JdbcDataSource Example Application" );
-
+
// Create the ComponentManager
ExcaliburComponentManager manager = createComponentManager();
try
@@ -186,7 +186,7 @@
// Dispose the ComponentManager
manager.dispose();
}
-
+
System.out.println();
System.out.println( "Exiting..." );
System.exit(0);
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>