Browse Source

Add an ephemeral Fortune that is added to the list at request time.

Brian Hauer 12 years ago
parent
commit
f542e4750e

+ 0 - 15
gemini/Docroot/WEB-INF/GeminiHello-Base.conf

@@ -414,21 +414,6 @@ MailServerCount = 1
 
 EmailerThreadsDaemon = yes
 
-# StartupMailAuthor
-#   Specifies the email address to use when sending out the startup
-#   email.  This just needs to be specified so that the mail server
-#   won't reject it due to anti-spam measures.
-
-StartupMailAuthor = [email protected]
-
-# StartupMailRecipients
-#   When this Gemini application starts, Gemini will send an e-mail notice
-#   to the provided comma-separated list of recipients.  This notice can
-#   be useful for tracking when the site has been restarted.  If set to
-#   empty string, this functionality is disabled.
-
-StartupMailRecipients =
-
 # Mail Server blocks (where 'X' is a sequential ID of the mail servers
 # used by the application).
 #

+ 4 - 2
gemini/Docroot/WEB-INF/GeminiHello-Inverness.conf

@@ -11,6 +11,8 @@
 # baseline configuration.
 Extends = GeminiHello-Prod.conf
 
+DeploymentDescription = Production/${Servlet.MachineName}
+
 # Now set any attributes that are specific to this machine.
 
 db.ConnectString = 172.16.98.98:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts=true&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true
@@ -18,5 +20,5 @@ db.ConnectString = 172.16.98.98:3306/hello_world?jdbcCompliantTruncation=false&e
 Log.Console.On = yes
 Log.Console.LogDebugThreshold = 50
 
-#db.Driver.Pooling = 30
-#db.Driver.MaxPooling = 30
+db.Driver.Pooling = 30
+db.Driver.MaxPooling = 30

+ 0 - 15
gemini/Docroot/WEB-INF/GeminiHello.conf

@@ -413,21 +413,6 @@ MailServerCount = 1
 
 EmailerThreadsDaemon = yes
 
-# StartupMailAuthor
-#   Specifies the email address to use when sending out the startup
-#   email.  This just needs to be specified so that the mail server
-#   won't reject it due to anti-spam measures.
-
-StartupMailAuthor = [email protected]
-
-# StartupMailRecipients
-#   When this Gemini application starts, Gemini will send an e-mail notice
-#   to the provided comma-separated list of recipients.  This notice can
-#   be useful for tracking when the site has been restarted.  If set to
-#   empty string, this functionality is disabled.
-
-StartupMailRecipients =
-
 # Mail Server blocks (where 'X' is a sequential ID of the mail servers
 # used by the application).
 #

BIN
gemini/Docroot/WEB-INF/lib/techempower.jar


+ 4 - 0
gemini/Docroot/WEB-INF/mustache/fortunes.mustache

@@ -1,6 +1,10 @@
 {{<layout}}
 {{$body}}
 <table>
+<tr>
+<th>id</th>
+<th>message</th>
+</tr>
 {{#.}}
 <tr>
 <td>{{id}}</td>

+ 10 - 1
gemini/Source/hello/home/entity/Fortune.java

@@ -14,12 +14,21 @@ public class   Fortune
 
   private String message;
   
+  /**
+   * Default Constructor.
+   */
+  public Fortune()
+  {
+    // Does nothing.
+  }
+  
   /**
    * Set the message.  
    */
-  public void setMessage(String message)
+  public Fortune setMessage(String message)
   {
     this.message = message;
+    return this;
   }
   
   /**

+ 1 - 0
gemini/Source/hello/home/handler/HelloHandler.java

@@ -69,6 +69,7 @@ public class HelloHandler
   public boolean fortunes()
   {
     final List<Fortune> fortunes = store.list(Fortune.class);
+    fortunes.add(new Fortune().setMessage("Additional fortune added at request time."));
     Collections.sort(fortunes);
     return mustache("fortunes", fortunes);
   }