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"/>