Akka和弹簧配置 [英] Akka and spring configuration
问题描述
我正在尝试将akka与spring结合在一起(没有成功)。基本上,似乎我的应用程序不知道如何读取Akka模式
I am trying to combine akka with spring (without success). Basically it seems that somehow my application doesn't wont to read akka schema
带有模式的service-context.xml的一部分:
Part of service-context.xml with schema:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:akka="http://akka.io/schema/akka"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://akka.io/schema/akka http://repo.akka.io/akka-1.3.1.xsd">
接下来有一些bean和akka演员定义:
Next there are some beans and akka actor definition:
<akka:untyped-actor id="pushManager" autostart="false" implementation="com.myspace.messaging.PushManager"> </akka:untyped-actor>
正在运行服务器时,我收到消息:
While running server i receive message:
org.xml.sax.SAXParseException; lineNumber: 55; columnNumber: 143; schema_reference.4: Failed to read schema document 'http://repo.akka.io/akka-1.3.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
还有例外:
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 55 in XML document from class path resource [service-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 55; columnNumber: 143; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'akka:untyped-actor'.
模式位于url下: http://repo.akka.io/akka-1.3.1.xsd -我可以在网络浏览器中轻松打开它。
Schema is located under url: http://repo.akka.io/akka-1.3.1.xsd - I can easily open it inside web browser.
任何线索都可能有所帮助,
感谢
Marek。
Any clue may help, Thanks Marek.
推荐答案
如果您移至新版本的Akka 2.2,则已删除了Spring集成包(您确实不需要它)。您应该实现UntypedActorFactory,Creator函数或IndirectActorProducer。
If you move to the new version of Akka 2.2, the Spring integration package has been removed (you really don't need it). You should implement a UntypedActorFactory, a Creator function or an IndirectActorProducer.
有关更多信息,请参阅此博客文章; http://blog.nemccarthy.me/?p=272
See this blog post for more info; http://blog.nemccarthy.me/?p=272
这篇关于Akka和弹簧配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!