Skip to Content.
Sympa Menu

notify-dpml - r1274 - in trunk/main: metro/runtime/src/main/net/dpml/metro/runtime station/server/etc/prefs/xmls station/server/src/main/net/dpml/station/server

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1274 - in trunk/main: metro/runtime/src/main/net/dpml/metro/runtime station/server/etc/prefs/xmls station/server/src/main/net/dpml/station/server
  • Date: Mon, 27 Mar 2006 16:09:16 +0200

Author: mcconnell
Date: 2006-03-27 16:09:15 +0200 (Mon, 27 Mar 2006)
New Revision: 1274

Modified:

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
trunk/main/station/server/etc/prefs/xmls/registry.xml

trunk/main/station/server/src/main/net/dpml/station/server/LoggingServer.java

trunk/main/station/server/src/main/net/dpml/station/server/RemoteStation.java
Log:
housekeeping

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-03-27 12:03:15 UTC (rev 1273)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-03-27 14:09:15 UTC (rev 1274)
@@ -601,6 +601,8 @@
m_parts.decommission();

m_active = false;
+
+ getLogger().debug( "decommissioned" );
}

/**

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-03-27 12:03:15 UTC (rev 1273)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-03-27 14:09:15 UTC (rev 1274)
@@ -329,7 +329,6 @@
return;
}

- getLogger().debug( "decommissioning" );
Component[] components = getComponents();
decommission( components );
}
@@ -409,7 +408,7 @@
String message =
getAction( event )
+ "["
- + event.getSource()
+ + getName( event )
+ "]";
getLogger().debug( message );
}
@@ -424,7 +423,7 @@
String message =
getAction( event )
+ "["
- + event.getSource()
+ + getName( event )
+ "] completed in "
+ event.getDuration()
+ " milliseconds";
@@ -442,7 +441,7 @@
String message =
getAction( event )
+ "of ["
- + event.getSource()
+ + getName( event )
+ "] interrupted after "
+ event.getDuration()
+ " milliseconds";
@@ -464,7 +463,7 @@
String message =
getAction( event )
+ "of ["
- + event.getSource()
+ + getName( event )
+ "] terminated after "
+ event.getDuration()
+ " milliseconds";
@@ -519,5 +518,26 @@
return "decommissioning ";
}
}
+
+ private String getName( CommissionerEvent event )
+ {
+ Object source = event.getSource();
+ if( source instanceof DefaultComponentHandler )
+ {
+ try
+ {
+ DefaultComponentHandler handler =
(DefaultComponentHandler) source;
+ return handler.getComponentModel().getName();
+ }
+ catch( Exception e )
+ {
+ return source.toString();
+ }
+ }
+ else
+ {
+ return source.toString();
+ }
+ }
}
}

Modified: trunk/main/station/server/etc/prefs/xmls/registry.xml
===================================================================
--- trunk/main/station/server/etc/prefs/xmls/registry.xml 2006-03-27
12:03:15 UTC (rev 1273)
+++ trunk/main/station/server/etc/prefs/xmls/registry.xml 2006-03-27
14:09:15 UTC (rev 1274)
@@ -9,7 +9,7 @@
<shutdown>6</shutdown>
<properties>
<property name="org.mortbay.log.class"
value="net.dpml.http.LogAdapter"/>
- <property name="dpml.logging.level" value="FINE"/>
+ <!--<property name="dpml.logging.level" value="FINE"/>-->
</properties>
</jvm>


Modified:
trunk/main/station/server/src/main/net/dpml/station/server/LoggingServer.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/LoggingServer.java
2006-03-27 12:03:15 UTC (rev 1273)
+++
trunk/main/station/server/src/main/net/dpml/station/server/LoggingServer.java
2006-03-27 14:09:15 UTC (rev 1274)
@@ -18,12 +18,13 @@

package net.dpml.station.server;

-import java.net.ServerSocket;
-import java.net.Socket;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.BufferedInputStream;
+import java.net.Socket;
+import java.net.ServerSocket;
+import java.net.SocketException;
import java.util.logging.Logger;
import java.util.logging.LogRecord;
import java.util.logging.Formatter;
@@ -76,6 +77,7 @@
}
catch( Throwable e )
{
+ e.printStackTrace();
m_count++;
}
}
@@ -86,19 +88,6 @@
return m_count;
}

- private Logger getNamedLogger( LogRecord record )
- {
- String name = record.getLoggerName();
- if( null != name )
- {
- return Logger.getLogger( name );
- }
- else
- {
- return Logger.getAnonymousLogger();
- }
- }
-
class RequestHandler implements Runnable
{
private final Socket m_socket;
@@ -134,16 +123,21 @@
}
}
}
+ //System.out.println( "## DONE" );
//input.close();
//m_socket.close();
}
catch( ClassNotFoundException e )
{
- System.out.println( e.toString() );
+ e.printStackTrace();
}
+ catch( SocketException ioe )
+ {
+ //
+ }
catch( IOException ioe )
{
- System.out.println( "read failed: " + ioe.toString() );
+ ioe.printStackTrace();
}
}


Modified:
trunk/main/station/server/src/main/net/dpml/station/server/RemoteStation.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/RemoteStation.java
2006-03-27 12:03:15 UTC (rev 1273)
+++
trunk/main/station/server/src/main/net/dpml/station/server/RemoteStation.java
2006-03-27 14:09:15 UTC (rev 1274)
@@ -239,7 +239,11 @@
}
try
{
- getLogger().info( "issues: " + m_server.getErrorCount() );
+ int n = m_server.getErrorCount();
+ if( n > 0 )
+ {
+ getLogger().warn( "logging issues: " + n );
+ }
m_thread.interrupt();
}
catch( Exception e )




  • r1274 - in trunk/main: metro/runtime/src/main/net/dpml/metro/runtime station/server/etc/prefs/xmls station/server/src/main/net/dpml/station/server, mcconnell at BerliOS, 03/27/2006

Archive powered by MHonArc 2.6.24.

Top of Page