2006/unicorn/src/org/w3c/unicorn/action Action.java,1.9,1.10 ObserveAction.java,1.40,1.41

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv13938/src/org/w3c/unicorn/action

Modified Files:
	Action.java ObserveAction.java 
Log Message:
automatically tries to initialize Unicorn if it isn't already

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- ObserveAction.java	23 Sep 2009 09:14:27 -0000	1.40
+++ ObserveAction.java	23 Sep 2009 14:08:46 -0000	1.41
@@ -76,8 +76,11 @@
 		
 		// Protects the action in case that Framework is not initialized
 		if (!Framework.isUcnInitialized) {
-			resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
-			return;
+			Framework.init();
+			if (!Framework.isUcnInitialized) {
+				resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+				return;
+			}
 		}
 		
 		// Objects initialization

Index: Action.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/Action.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Action.java	14 Sep 2009 10:09:38 -0000	1.9
+++ Action.java	23 Sep 2009 14:08:46 -0000	1.10
@@ -26,8 +26,11 @@
 			throws ServletException, IOException {
 		
 		if (!Framework.isUcnInitialized) {
-			resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
-			return;
+			Framework.init();
+			if (!Framework.isUcnInitialized) {
+				resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+				return;
+			}
 		}
 	}
 

Received on Wednesday, 23 September 2009 14:08:58 UTC