fixed untyped actor parsing

This commit is contained in:
Michael Kober 2010-08-13 12:27:46 +02:00
parent b269142f12
commit 5bdbfd7e49
3 changed files with 4 additions and 4 deletions

View file

@ -177,7 +177,7 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="timeout" type="xsd:long" use="required">
<xsd:attribute name="timeout" type="xsd:long">
<xsd:annotation>
<xsd:documentation>
The default timeout for '!!' invocations.

View file

@ -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))

View file

@ -10,8 +10,7 @@ http://www.akkasource.org/schema/akka
http://scalablesolutions.se/akka/akka-0.10.xsd">
<akka:untyped-actor id="simple-untyped-actor"
implementation="se.scalablesolutions.akka.spring.foo.PingActor"
timeout="1000"/>
implementation="se.scalablesolutions.akka.spring.foo.PingActor"/>
<akka:untyped-actor id="simple-untyped-actor-long-timeout"
implementation="se.scalablesolutions.akka.spring.foo.PingActor"