From 76f0bf86ee7e6c8f5409f553472637726771869e Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Tue, 9 Nov 2010 13:25:59 -0600 Subject: [PATCH] Check that either implementation or ref are specified --- akka-spring/src/main/scala/ActorParser.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/akka-spring/src/main/scala/ActorParser.scala b/akka-spring/src/main/scala/ActorParser.scala index 7785d469ef..8466995dc2 100644 --- a/akka-spring/src/main/scala/ActorParser.scala +++ b/akka-spring/src/main/scala/ActorParser.scala @@ -55,6 +55,12 @@ trait ActorParser extends BeanParser with DispatcherParser { objectProperties.timeoutStr = element.getAttribute(TIMEOUT) objectProperties.target = if (element.getAttribute(IMPLEMENTATION).isEmpty) null else element.getAttribute(IMPLEMENTATION) objectProperties.beanRef = if (element.getAttribute(BEANREF).isEmpty) null else element.getAttribute(BEANREF) + + if (objectProperties.target == null && objectProperties.beanRef == null) { + throw new IllegalArgumentException("Mandatory attribute missing, you need to provide either implementation or ref ") + } + + objectProperties.transactional = if (element.getAttribute(TRANSACTIONAL).isEmpty) false else element.getAttribute(TRANSACTIONAL).toBoolean if (element.hasAttribute(INTERFACE)) {