You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/01/19 21:44:47 UTC
svn commit: r497951 - in
/webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core:
Messages.properties SimpleResource.java
Author: danj
Date: Fri Jan 19 12:44:46 2007
New Revision: 497951
URL: http://svn.apache.org/viewvc?view=rev&rev=497951
Log:
added sanity check to make sure that resources experiencing shutdown() have actually been initialized in the past.
Modified:
webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/Messages.properties
webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/SimpleResource.java
Modified: webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/Messages.properties
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/Messages.properties?view=diff&rev=497951&r1=497950&r2=497951
==============================================================================
--- webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/Messages.properties (original)
+++ webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/Messages.properties Fri Jan 19 12:44:46 2007
@@ -43,3 +43,4 @@
NullWsdlPath=The resource's WSDL path is null.
NullWsdlPortType=The resource's WSDL portType name is null.
NoContextPath=The resource's context path must be set with setContextPath() before it can be initialized (via initialize()). Make sure that the context path is provided right after the resource is instantiated.
+ResourceNotInitialized=The resource is being shutdown even though it has never been initialized (via initialize()). You cannot shutdown a resource that was not up in the first place.
Modified: webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/SimpleResource.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/SimpleResource.java?view=diff&rev=497951&r1=497950&r2=497951
==============================================================================
--- webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/SimpleResource.java (original)
+++ webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/SimpleResource.java Fri Jan 19 12:44:46 2007
@@ -479,6 +479,12 @@
//
if (hasBeenShutdown())
throw new SoapFault(_MESSAGES.get("ResourceAlreadyDestroyed"));
+
+ //
+ // error - never initialized, why are we shutting down?
+ //
+ if (!hasBeenInitialized())
+ throw new SoapFault(_MESSAGES.get("ResourceNotInitialized"));
//
// set this flag early so that code that is invoked because of
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org