From 42bd9a98b7cf537c87cb24de0e37f61037c184d0 Mon Sep 17 00:00:00 2001 From: Timothy Perrett Date: Mon, 29 Aug 2011 16:02:28 +0100 Subject: [PATCH] fixed some stuff in the chp 13 bootup --- chapter-13/src/main/resources/akka.conf | 2 +- .../main/scala/bootstrap/liftweb/Boot.scala | 2 +- .../scala/sample/actor/RemoteAkkaSample.scala | 2 +- .../main/scala/sample/comet/Calculator.scala | 5 +++-- .../main/scala/sample/snippet/Authors.scala | 4 ++-- chapter-13/src/main/webapp/jee/jta.html | 7 ------- database/chapter_13.h2.db | Bin 1077248 -> 1077248 bytes 7 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 chapter-13/src/main/webapp/jee/jta.html diff --git a/chapter-13/src/main/resources/akka.conf b/chapter-13/src/main/resources/akka.conf index 962eb92..15e3c83 100644 --- a/chapter-13/src/main/resources/akka.conf +++ b/chapter-13/src/main/resources/akka.conf @@ -6,7 +6,7 @@ # Modify as needed. akka { - version = "1.0-RC6" # Akka version, checked against the runtime version of Akka. + version = "1.0" # Akka version, checked against the runtime version of Akka. enabled-modules = [] # Comma separated list of the enabled modules. Options: ["remote", "camel", "http"] diff --git a/chapter-13/src/main/scala/bootstrap/liftweb/Boot.scala b/chapter-13/src/main/scala/bootstrap/liftweb/Boot.scala index 17af054..c75bf3b 100644 --- a/chapter-13/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/chapter-13/src/main/scala/bootstrap/liftweb/Boot.scala @@ -23,7 +23,7 @@ class Boot extends LazyLoggable { * Build the sitemap */ LiftRules.setSiteMap(SiteMap( - Menu("Home") / "index" >> EarlyResponse(() => Full(RedirectResponse("/localization/"))) >> Hidden, + Menu("Home") / "index" >> EarlyResponse(() => Full(RedirectResponse("/jee/"))) >> Hidden, Menu("Java Enterprise Integration") / "jee" / "index" submenus( Menu("JPA: Authors: List") / "jee" / "authors" / "index", Menu("JPA: Authors: Add") / "jee" / "authors" / "add", diff --git a/chapter-13/src/main/scala/sample/actor/RemoteAkkaSample.scala b/chapter-13/src/main/scala/sample/actor/RemoteAkkaSample.scala index 7a028d0..d6ea51d 100644 --- a/chapter-13/src/main/scala/sample/actor/RemoteAkkaSample.scala +++ b/chapter-13/src/main/scala/sample/actor/RemoteAkkaSample.scala @@ -12,4 +12,4 @@ object HelloWorldRemoteCaller { import akka.actor.Actor.remote private val actor = remote.actorFor("hello-service", "localhost", 2552) def welcome = actor ! "Hello" -} \ No newline at end of file +} diff --git a/chapter-13/src/main/scala/sample/comet/Calculator.scala b/chapter-13/src/main/scala/sample/comet/Calculator.scala index b6939bf..5d19d29 100644 --- a/chapter-13/src/main/scala/sample/comet/Calculator.scala +++ b/chapter-13/src/main/scala/sample/comet/Calculator.scala @@ -57,8 +57,9 @@ class CalculatorDisplay extends AkkaCometActor { def render = "#value_one" #> doubleInput(one = _) & "#value_two" #> doubleInput(two = _) & - "#operation" #> SHtml.select(Seq("+","/","*").map(x => (x -> x)), - operation, v => operation = Full(v)) & + "#operation" #> SHtml.select(Seq("+","/","*") + .map(x => (x -> x)), operation, + v => operation = Full(v)) & "type=submit" #> SHtml.ajaxSubmit("Submit", () => { registry.actorFor[Calculator].map { _ ! Compute(one,two,operation.openOr("+")) diff --git a/chapter-13/src/main/scala/sample/snippet/Authors.scala b/chapter-13/src/main/scala/sample/snippet/Authors.scala index 4ff1870..0b14d5c 100644 --- a/chapter-13/src/main/scala/sample/snippet/Authors.scala +++ b/chapter-13/src/main/scala/sample/snippet/Authors.scala @@ -25,8 +25,8 @@ class Authors { } def add = { - val currentId = author.id - "type=hidden" #> SHtml.hidden(() => author.id = currentId) & + val current = author + "type=hidden" #> SHtml.hidden(() => authorVar(current)) & "type=text" #> SHtml.text(author.name, author.name = _) & "type=submit" #> SHtml.onSubmitUnit(() => tryo(Model.mergeAndFlush(author)) match { diff --git a/chapter-13/src/main/webapp/jee/jta.html b/chapter-13/src/main/webapp/jee/jta.html deleted file mode 100644 index bc41483..0000000 --- a/chapter-13/src/main/webapp/jee/jta.html +++ /dev/null @@ -1,7 +0,0 @@ - -

JTA

-

Please check the code for information on JTA implementation

- - - -
diff --git a/database/chapter_13.h2.db b/database/chapter_13.h2.db index e1631fdbee8454d71f2b0c6842c57dfaf3818e2b..c4f3a3e4f8b199491f85527fd5042f71eec4441d 100755 GIT binary patch delta 1558 zcmZ{kZ)_7~9LJyMxw}2rYqzy*tQ!vYyLBrYPS!tTV@6}|uGj9`(vJ2DY(cNEtwW~B z#ANWQ6`~m98))=(H%TCY7!zLL5=jaggD=!*d?WheV8%ZYqZmzyM)BzYeKRii$vt^4 z_k6#<@9&o@+e+D1s-pY-U2mO6t5@tcd$=yT#b49!`x_B@68lTm& zx?<{((|6|ew5G#&UQHR=*4#vnGxZ%-t*xu_&J^IT%BNFMYEn}=-vPai2b7elXQAM( z9c)oFEt5~1phTmfWzsn_s~FH!ea*%mWI?bcYwS?66Ohy=`iy8l80o0Kr`BKXWG_3Z zrSt6|H$GYYrrHr1wp{}RGU=MP`bOmG2EGlT@dT-Af~II=dekntmPwxkfCM87su7PY zw?*}sl24h?m)7@~uuDnhb%IbFWaWepa^F=tAdfNg;Q-wOV0#7nePzI&^fh0T+j`4;f+DXdcl zo2{HNsY7r$ynTpY2mZa0_UfhMtxn6F7}p`dd%(ZX<~lv8jFz-aV~3u}n-B^F0$aMz zql1gD+uqya$Z#kS)WfPJpY&Ev4YZeTa_8~zwwvMw)B}gmoW1FgOVeY~m@>58iiVV+ zZ$ryy*c#oY#4J@+m61_B5E_a_ZSD{W4hL=V1Y@K$s|{rHaKI+U`&Yx zMinI%0))cqG^ZQ!wEDf+r{vACOx7}1Xs=C&P|2Fos1<~)9@Dc?f^t`lvZ_hl&hEd7 zmK^k%D7M&E7^!Ws-T4(f5xHigH*vHdI|n)9aG@$99SDOX(u9RaK>UB!{u?^BcpG7a z8Zhb+FnWBR?_nc2_h1Ao=ZoX=Xc$yIl}X2QmYK0kg-sm6Sb7C>o*&L2KwT9&4ja*B z@U1Pd6LnNB@7_=XfnN|5V?KgJL5`>O-C^UU2*RNR_<_)1;>f<|4?i~}5N;7WiLi(h zxz!EqnCDuTCz((yMGpEG{f+)aSLoODOZpl8n0^4>wPmM}cpS%%9zCj!Edav%#^S&e zt}e-w#F6PD5DDMcTs6hLj1$uZFTZMy5aweEi$qw$@wvGy_Z1L|MdSEJ8`$K?(8QaaI6s$a1Zjck6P^Ozt1n#5?p4*2rJzE&3z< z?qPDTqK;lc?h$04Aa@J0EXcedvjVXobD?^R9BKW-VT7>%Zv8sZ mUOw4g#tg#X7(7E@G%zSbWH=ZS!^vI}mdKF((jn0Wmia^8hg~5c6%n*vGH`aPxz{ GqkI5u$~lMt