This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bowlingx.model | |
import net.liftweb.mongodb.record.{MongoMetaRecord, MongoRecord} | |
import net.liftweb.mongodb.record.field.StringPk | |
import com.hazelcast.core.MapStore | |
import java.util | |
import com.bowlingx.util.Logging | |
import net.liftweb.record.field.{StringField, DateTimeField, BinaryField} | |
import java.io._ | |
import util.Calendar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Session Storage: --> | |
<map name="shiro-activeSessionCache"> | |
<backup-count>1</backup-count> | |
<!-- Delete Sessions after one Hour if no access --> | |
<!-- https://groups.google.com/forum/?fromgroups=#!topic/hazelcast/iScOrTaSJbA --> | |
<max-idle-seconds>3600</max-idle-seconds> | |
<eviction-policy>LRU</eviction-policy> | |
<map-store enabled="true"> | |
<!-- | |
Name of the class implementing MapLoader and/or MapStore. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: YourApp | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: YourShortDescription | |
# Description: YourDescription | |
### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
XNAME="YourApp" | |
SCALATRA_ENV="production" | |
TMP_DIR="tmp/$XNAME/" | |
JAVA_OPTIONS=(-Xmx3024M -XX:MaxPermSize=512M) | |
LOGDIR="/usr/share/YourApp/logs/$XNAME" | |
PORT="9090" | |
JAVA_OPTIONS=("${JAVA_OPTIONS[@]}" "-Djava.io.tmpdir=$TMP_DIR") | |
JAVA_OPTIONS=("${JAVA_OPTIONS[@]}" "-Dorg.scalatra.environment=$SCALATRA_ENV") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bowlingx.run | |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.webapp.WebAppContext | |
import com.bowlingx.util.Logging | |
/** | |
* This describes our Main Entry point to launch YourApp | |
* Launches an embedded Jetty Server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait MyFlashMapSupport extends Handler { | |
this: CoreDsl with DynamicScope with SessionSupport => | |
import FlashMapSupport._ | |
abstract override def handle(req: HttpServletRequest, res: HttpServletResponse) { | |
withRequest(req) { | |
val f = getFlash(req) | |
val isOutermost = !req.contains(lockKey) | |
if (isOutermost) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AssemblyKeys._ | |
assemblySettings | |
mainClass in assembly := Some("com.yourCompany.YourMainClass") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project/plugins.sbt | |
======================================================== | |
libraryDependencies <+= sbtVersion(v => v match { | |
case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8" | |
case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10" | |
case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11" | |
case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1" | |
case x if (x.startsWith("0.12")) => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1" | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yourcompany | |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.webapp.WebAppContext | |
/** | |
* This describes our Main Entry point to launch YourApp | |
* Launches an embedded Jetty Server | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) => | |
{ | |
case PathList("javax", "servlet", xs @ _*) => (xs map {_.toLowerCase}) match { | |
case ("about.html" :: Nil) => MergeStrategy.discard | |
case _ => MergeStrategy.deduplicate | |
} | |
case x => old(x) | |
} | |
} |