The Artima Developer Community
Sponsored Link

Web Buzz Forum
Learning Scala - Code Update without Redeployment via JRebel

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chee Seng Chua

Posts: 62
Nickname: quai83
Registered: Nov, 2006

Chee Seng Chua is Senior Application Developer for KZEN Solutions Berhad
Learning Scala - Code Update without Redeployment via JRebel Posted: May 8, 2011 1:42 AM
Reply to this message Reply

This post originated from an RSS feed registered with Web Buzz by Chee Seng Chua.
Original Post: Learning Scala - Code Update without Redeployment via JRebel
Feed Title: Chee Seng Tech Blog
Feed URL: http://chuacheeseng.blogspot.com/atom.xml
Feed Description: When you think you are superior, you are being an idiot...
Latest Web Buzz Posts
Latest Web Buzz Posts by Chee Seng Chua
Latest Posts From Chee Seng Tech Blog

Advertisement
Scala Developer entitles to free license from JRebel, just request it from ZeroTurnaround (http://sales.zeroturnaround.com/), the license will be emailed to you in minutes. You'll need to download and install JRebel as well.

Having done so, you are only 2 steps away from code update without redeployment.

Step 1
Changed your sbt launch script, I have changed mine to:-


#!/bin/sh
java -Xmx1512M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -noverify -javaagent:/opt/ZeroTurnaround/JRebel/jrebel.jar -jar /opt/sbt/sbt-launch-0.7.5.jar "$@"


Note that I installed my sbt jar in /opt/sbt/ and JRebel in /opt/ZeroTurnaround/JRebel/.

Step 2
Change your Web Project build class:-


import sbt._
class WebAppBuild(info: ProjectInfo) extends DefaultWebProject(info) {

val jetty6 = "org.mortbay.jetty" % "jetty" % "6.1.14" % "test"
val servletApi = "javax.servlet" % "servlet-api" % "2.5"

override def jettyWebappPath = webappPath
override def scanDirectories = Nil
}


That's all for the setup, now you can launch sbt in your project directory and test:-


jetty-run
~ prepare-webapp


Go ahead and change your Servlet source file, upon saving, you can refresh your web browser to see your changes immediately, without the need to redeploy the whole web app.

Read: Learning Scala - Code Update without Redeployment via JRebel

Topic: How To Hard Reset HTC Cha Cha Previous Topic   Next Topic Topic: Sprint’s Nexus S 4G Goes On Sale For $199 From Tomorrow, May 8

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use