0
我在jboss 7.1.0.final中部署了一個資源適配器(XADisk),現在在JNDI查找中得到一個異常。在jboss 7.1中JNDI查找資源適配器的異常
我配置了ra.xml並部署了XADisk.rar。 然後我說下面我standalone.xml:
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
XADisk.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<connection-definitions>
<connection-definition
class-name="org.xadisk.connector.outbound.XADiskConnectionFactory"
jndi-name="java:/XADiskCF"
pool-name="XADiskConnectionFactory">
<xa-pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>10</max-pool-size>
</xa-pool>
<security>
<application/>
</security>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
現在我試圖從一個簡單的servlet使用它:
XADiskConnectionFactory cf1 =
(XADiskConnectionFactory) new InitialContext().lookup("java:/XADiskCF");
,如果我可以調用下面升起在servlet:
javax.naming.NameNotFoundException: XADiskCF -- service jboss.naming.context.java.XADiskCF at
org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97) at
org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177) at
org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113) at
org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213) at
...
我希望能更好地理解jndi和jboss的人能幫助我。