我正在尝试使用IRONJACAMAR在JBoss上部署CXF JCA资源适配器,并使用以下ironjacamar.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<p:ironjacamar xmlns:p="http://www.jboss.org/ironjacamar/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema ">
<p:connection-definitions>
<p:connection-definition jndi-name="java:/CXFConnector" class-name="org.apache.cxf.jca.outbound.CXFConnectionFactory">
<p:pool>
<p:min-pool-size>10</p:min-pool-size>
<p:max-pool-size>100</p:max-pool-size>
</p:pool>
<p:security>
<p:application/>
</p:security>
</p:connection-definition>
</p:connection-definitions>
</p:ironjacamar>
此XML文件位于我们耳中的CXFResourceAdapter.rar / META-INF内。
我得到的是:
16:27:25,468 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.ra.deployer."OURServer.ear#CXFResourceAdapter": org.jboss.msc.service.StartException in service jboss.ra.deployer."OURServer.ear#CXFResourceAdapter": JBAS010446: Failed to start RA deployment [OURServer.ear#CXFResourceAdapter]
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:116)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
Caused by: org.jboss.jca.deployers.common.DeployException: org.apache.cxf.jca.cxf.AssociatedManagedConnectionFactoryImpl not a valid connection definition
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.findConnectionDefinitions(AbstractResourceAdapterDeployer.java:476)
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1847)
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1104)
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:197)
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:112)
... 5 more
我很高兴有两个名为CXFConnectionFactory
的班级位于包org.apache.cxf.jca.outbound
和org.apache.cxf.connector
。
我们在JBoss 5上使用了org.apache.cxf.connector.CXFConnectionFactory
,它运行良好。
我做错了什么?
答案 0 :(得分:0)
所以我找到了解决方案。错误在于连接定义部分的class-name
属性。
正确的类是org.apache.cxf.jca.cxf.AssociatedManagedConnectionFactoryImpl
。