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
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
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
#!/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
#! /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
<!-- 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
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
trait TemplateBindings extends ScalateSupport { | |
self: ScalatraServlet => | |
override protected def defaultTemplatePath: List[String] = List("/webTmpl/views") | |
override protected def createTemplateEngine(config: ConfigT) = { | |
val engine = super.createTemplateEngine(config) | |
engine.layoutStrategy = new DefaultLayoutStrategy(engine, | |
TemplateEngine.templateTypes.map("/webTmpl/layouts/default." + _): _*) |
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
ivyXML := | |
<dependencies> | |
<exclude org="org.eclipse.jetty.orbit" /> | |
</dependencies> | |
libraryDependencies ++= Seq( | |
"org.scalatra" % "scalatra" % "2.1.0-SNAPSHOT", | |
"org.scalatra" % "scalatra-specs2" % "2.1.0-SNAPSHOT" % "test", | |
"ch.qos.logback" % "logback-classic" % "1.0.0" % "runtime", | |
"org.eclipse.jetty" % "jetty-webapp" % "8.1.4.v20120524" % "container", |
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
16:38:32.716 [qtp2112864060-76] WARN o.a.w.protocol.SimpleHttpProtocol - org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: java.io.InvalidClassException: scala.collection.mutable.HashSet; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -693344176634852721 Status 500 Message Server Error | |
16:38:50.381 [qtp2112864060-73 Selector0] WARN o.a.websocket.WebSocketProcessor - AsynchronousProcessor.AsynchronousProcessorHook was null | |
16:38:50.775 [qtp2112864060-76] WARN o.a.websocket.WebSocketProcessor - Failed invoking AtmosphereFramework.doCometSupport() | |
org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: java.io.InvalidClassException: scala.collection.mutable.HashSet; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -693344176634852721 | |
at org.apache.shiro.cache.ehcache.EhCache.put(EhCache.java:105) ~[shiro-ehcache-1.2.0.jar:1.2.0] | |
at org.apache.shiro.session.mgt.eis.CachingSessionD |