Hi all,
I went through this discussion earlier, regarding
startup of services. I have been using turbine with
this patch, which synchronizes the Turbine.init() function.
The patch is neccessary for me, I have been unable to come up with
alternatives, and it should not pose any problems,
since this function is only run once or twice for each time
the server is started.
Index: src/java/org/apache/turbine/Turbine.java
===================================================================
RCS file:
/products/cvs/turbine/turbine/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.33
diff -u -r1.33 Turbine.java
--- src/java/org/apache/turbine/Turbine.java 2001/01/04 02:28:27 1.33
+++ src/java/org/apache/turbine/Turbine.java 2001/01/05 14:39:43
@@ -183,21 +183,24 @@
public final void init(ServletConfig config)
throws ServletException
{
- try
+ synchronized ( this.getClass() )
{
- super.init(config);
- this.localServletConfig = config;
+ try
+ {
+ super.init(config);
+ this.localServletConfig = config;
- TurbineConfig.init(config);
+ TurbineConfig.init(config);
+ }
+ catch ( Exception e )
+ {
+ // this exception will be handled later
+ initFailure = e;
+ log ("Turbine: init() failed: " + e.getMessage());
+ return;
+ }
+ log ("Turbine: init() Ready to Rumble!");
}
- catch ( Exception e )
- {
- // this exception will be handled later
- initFailure = e;
- log ("Turbine: init() failed: " + e.getMessage());
- return;
- }
- log ("Turbine: init() Ready to Rumble!");
}
/**
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]