Merge lp:~peter-kovac11/play/play-scala-console-improvements into lp:play/1.1

Proposed by Guillaume Bort
Status: Merged
Merged at revision: not available
Proposed branch: lp:~peter-kovac11/play/play-scala-console-improvements
Merge into: lp:play/1.1
Diff against target: 43 lines (+5/-2)
2 files modified
modules/scala/commands.py (+1/-0)
modules/scala/src/play/console/Console.scala (+4/-2)
To merge this branch: bzr merge lp:~peter-kovac11/play/play-scala-console-improvements
Reviewer Review Type Date Requested Status
pk11 (community) Approve
play framework developers Pending
Review via email: mp+15146@code.launchpad.net
To post a comment you must log in.
Revision history for this message
pk11 (peter-kovac11) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/scala/commands.py'
2--- modules/scala/commands.py 2009-11-13 16:12:44 +0000
3+++ modules/scala/commands.py 2009-11-23 10:10:31 +0000
4@@ -9,6 +9,7 @@
5 do_java()
6 # replace last element with the console app
7 java_cmd[len(java_cmd)-1]="play.console.Console"
8+ java_cmd.insert(2, '-Xmx256M -Xms32M')
9 subprocess.call(java_cmd, env=os.environ)
10 print
11 sys.exit(0)
12
13=== modified file 'modules/scala/src/play/console/Console.scala'
14--- modules/scala/src/play/console/Console.scala 2009-11-13 16:12:44 +0000
15+++ modules/scala/src/play/console/Console.scala 2009-11-23 10:10:31 +0000
16@@ -2,16 +2,17 @@
17 import scala.tools.nsc.MainGenericRunner
18 import java.io.File
19 import play.Play
20-
21+import play.db.jpa.JPAPlugin
22 object Console {
23 def main(args : Array[String]) {
24 val root = new File(System.getProperty("application.path"));
25 Play.init(root, System.getProperty("play.id", ""));
26 println("~")
27 println("~ Starting up, please be patient")
28- println("~ Ctrl+C to stop")
29+ println("~ Ctrl+D to stop")
30 println("~")
31 Play.start()
32+ JPAPlugin.startTx(false)
33 //TODO:fix readline support
34 //now that the app is ready, launch scala REPL
35 try {
36@@ -20,6 +21,7 @@
37 case e:Exception=>
38 }
39 // After the repl exits, kill the scala script
40+ JPAPlugin.closeTx(false)
41 exit(0)
42 }
43 }

Subscribers

People subscribed via source and target branches