Перенос веб-сайта в Jboss eap 7, у меня есть требование настроить JBoss WorkManager в соответствии с настройками в веб-интерфейсе. сделал это, но получил ошибку NameNotFoundException. ниже приведен код:
Контекст приложения. xml
<bean id="defaultWorkManager" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton">
<property name="resourceRef" value="true" />
<property name="jndiName" value="wm/DefaultWorkManager"/>
</bean>
web. xml
<resource-ref id="ResourceRef_123456">
<description>
</description>
<res-ref-name>wm/DefaultWorkManager</res-ref-name>
<res-type>commonj.work.WorkManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Jboss-web. xml
<resource-ref id="ResourceRef_123456">
<description>
</description>
<res-ref-name>wm/DefaultWorkManager</res-ref-name>
<res-type>commonj.work.WorkManager</res-type>
<jndi-name>wm/DefaultWorkManager</jndi-name>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
автономно. xml
<subsystem xmlns="urn:jboss:domain:jca:4.0">
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="true"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
<cached-connection-manager/>
</subsystem>
Журнал исключений
Cannot resolve reference to bean 'defaultWorkManager' while setting bean property
'workManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'defaultWorkManager' defined in ServletContext resource [/WEB-INF/spring/application-context.xml]: Invocation of init method failed;
nested exception is javax.naming.NameNotFoundException: wm/DefaultWorkManager -- service jboss.naming.context.java.wm.DefaultWorkManager
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeployService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
застрял с проблемой выше, пожалуйста, помогите мне исправить.