From 5bdbfd7e49faab74353cbe10bd3034d63b47d49d Mon Sep 17 00:00:00 2001 From: Michael Kober Date: Fri, 13 Aug 2010 12:27:46 +0200 Subject: [PATCH] fixed untyped actor parsing --- .../resources/se/scalablesolutions/akka/spring/akka-0.10.xsd | 2 +- akka-spring/src/main/scala/ActorParser.scala | 3 ++- akka-spring/src/test/resources/untyped-actor-config.xml | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd b/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd index 5bd18e3c44..2a42ec0900 100644 --- a/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd +++ b/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd @@ -177,7 +177,7 @@ - + The default timeout for '!!' invocations. diff --git a/akka-spring/src/main/scala/ActorParser.scala b/akka-spring/src/main/scala/ActorParser.scala index 9858c1fad4..69073bd52f 100644 --- a/akka-spring/src/main/scala/ActorParser.scala +++ b/akka-spring/src/main/scala/ActorParser.scala @@ -48,7 +48,8 @@ trait ActorParser extends BeanParser with DispatcherParser { } try { - objectProperties.timeout = mandatory(element, TIMEOUT).toLong + val timeout = element.getAttribute(TIMEOUT) + objectProperties.timeout = if ((timeout != null) && (!timeout.isEmpty)) timeout.toLong else -1L } catch { case nfe: NumberFormatException => log.error(nfe, "could not parse timeout %s", element.getAttribute(TIMEOUT)) diff --git a/akka-spring/src/test/resources/untyped-actor-config.xml b/akka-spring/src/test/resources/untyped-actor-config.xml index 55e49e4707..aea5e86d44 100644 --- a/akka-spring/src/test/resources/untyped-actor-config.xml +++ b/akka-spring/src/test/resources/untyped-actor-config.xml @@ -10,8 +10,7 @@ http://www.akkasource.org/schema/akka http://scalablesolutions.se/akka/akka-0.10.xsd"> + implementation="se.scalablesolutions.akka.spring.foo.PingActor"/>