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