mcconnell 02/03/02 04:28:33
Modified: apps/enterprise/orb/src/examples/hello/java/hello
HelloDemo.java
Removed: apps/enterprise/orb .cvsignore build.properties build.xml
local.properties.example
apps/enterprise/orb/lib avalon-framework.jar logkit.jar
openorb-1.2.2.jar openorb_tools-1.2.2.jar
phoenix-client.jar
apps/enterprise/orb/src/java/org/apache/orb
CascadingConfiguration.java DefaultORBContext.java
DefaultORBFactory.java DefaultORBFactory.xinfo
DefaultORBFactory.xml ORB.java ORBContext.java
ORBFactoryRuntimeException.java
ORBFactoryService.java package.html
apps/enterprise/orb/src/java/org/apache/orb/CORBA/kernel
DefaultLoader.java DefaultLoader.xml orb.properties
package.html
Log:
transfered to apache-avalon-apps/enterprise
Revision Changes Path
1.4 +13 -5
jakarta-avalon-cornerstone/apps/enterprise/orb/src/examples/hello/java/hello/HelloDemo.java
Index: HelloDemo.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-cornerstone/apps/enterprise/orb/src/examples/hello/java/hello/HelloDemo.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HelloDemo.java 23 Feb 2002 17:44:11 -0000 1.3
+++ HelloDemo.java 2 Mar 2002 12:28:33 -0000 1.4
@@ -56,11 +56,16 @@
//=================================================================
private static final String DEFAULT_FORMAT = "[%7.7{priority}]
(%{category}): %{message}\\n%{throwable}";
- private static OutputStream m_out = System.out;
+
private static String m_priority = "DEBUG";
+ private static String[] m_args = new String[0];
+
public static void main( String[] args )
{
+
+ m_args = args;
+
//
// create a new instance of the demo
//
@@ -87,11 +92,13 @@
try
{
- demo.enableLogging( createBootstrapLogger( "hello" ) );
+ Logger logger = createBootstrapLogger( System.out, "hello" );
+ demo.enableLogging( logger );
demo.configure( loadDefaultConfiguration() );
demo.contextualize( new DefaultContext() );
demo.initialize();
demo.dispose();
+
}
catch( Throwable e )
{
@@ -163,13 +170,14 @@
try
{
- m_orb = ORB.init( new String[0], properties );
+ m_orb = ORB.init( m_args, properties );
org.omg.CORBA.Object object =
m_orb.resolve_initial_references("HELLO");
Hello hello = HelloHelper.narrow( object );
getLogger().info( hello.get_welcome_message() );
}
catch( Throwable e)
{
+ getLogger().error( "intialization failure", e );
throw new HelloException( "Client initization failed.", e);
}
}
@@ -235,13 +243,13 @@
}
}
- private static Logger createBootstrapLogger( String catagory )
+ private static Logger createBootstrapLogger( OutputStream out, String
catagory )
{
try
{
Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
hierarchy.setDefaultLogTarget(
- new StreamTarget( m_out, new AvalonFormatter( DEFAULT_FORMAT
) ) );
+ new StreamTarget( out, new AvalonFormatter( DEFAULT_FORMAT )
) );
hierarchy.setDefaultPriority( Priority.getPriorityForName(
m_priority ) );
return new LogKitLogger( hierarchy.getLoggerFor( catagory ) );
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>