leif 02/02/06 23:05:06
Modified: src/java/org/apache/avalon/phoenix/components/embeddor
DefaultEmbeddor.java Resources.properties
Log:
Add some log messages to explain why the server stops when there
are no running applications. Important on startup.
Revision Changes Path
1.45 +26 -8
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java
Index: DefaultEmbeddor.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- DefaultEmbeddor.java 4 Feb 2002 09:57:55 -0000 1.44
+++ DefaultEmbeddor.java 7 Feb 2002 07:05:06 -0000 1.45
@@ -187,17 +187,35 @@
throws Exception
{
deployDefaultApplications();
-
- // loop until <code>Shutdown</code> is created.
- while( true )
+
+ // If the kernel is empty at this point, it is because the server
was
+ // started without supplying any applications, display a message to
+ // give the user a clue as to why the server is shutting down
+ // immediately.
+ if ( emptyKernel() )
{
- // wait() for shutdown() to take action...
- if( m_shutdown ||
- ( emptyKernel() && !m_persistent ) )
+ final String message = REZ.getString(
"embeddor.error.start.no-apps" );
+ getLogger().fatalError( message );
+ }
+ else
+ {
+ // loop until <code>Shutdown</code> is created.
+ while( true )
{
- break;
+ // wait() for shutdown() to take action...
+ if( m_shutdown ||
+ ( emptyKernel() && !m_persistent ) )
+ {
+ // The server will shut itself down when all
applications are disposed.
+ if ( emptyKernel() )
+ {
+ final String message = REZ.getString(
"embeddor.shutdown.all-apps-disposed" );
+ getLogger().info( message );
+ }
+ break;
+ }
+ gotoSleep();
}
- gotoSleep();
}
}
1.5 +2 -0
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/Resources.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Resources.properties 2 Feb 2002 11:50:10 -0000 1.4
+++ Resources.properties 7 Feb 2002 07:05:06 -0000 1.5
@@ -1,6 +1,8 @@
embeddor.error.start.failed=There was a fatal error while starting Embeddor.
+embeddor.error.start.no-apps=Unable to start because there are not any
applications in the apps directory.
embeddor.error.shutdown.failed=There was an unexpected error while shutting
down Embeddor.
embeddor.notice.no-restart=Phoenix was not started by the daemon thus it
will not be possible to restart the JVM via the Management interface.
+embeddor.shutdown.all-apps-disposed=Shutting down because there are not any
applications running.
bad-type.error=Object {0} is not an instance of {1}.
bad-ctor.error=Non-public constructor for {0} {1}.
no-instantiate.error=Error instantiating class for {0} {1}.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>