问题处在jndi的获取上,你有没有配置这个名字的jndi源java:/TransactionManager ?

解决方案 »

  1.   

    TransactionManager 是Jboss提供的,在E:\jboss-4.0.2\server\default\conf目录下有Jboss-service.xml文件,上面有
    <mbean code="org.jboss.management.j2ee.LocalJBossServerDomain"
          name="jboss.management.local:j2eeType=J2EEDomain,name=Manager">
          <attribute name="MainDeployer">jboss.system:service=MainDeployer</attribute>
          <attribute name="SARDeployer">jboss.system:service=ServiceDeployer</attribute>
          <attribute name="EARDeployer">jboss.j2ee:service=EARDeployer</attribute>
          <attribute name="EJBDeployer">jboss.ejb:service=EJBDeployer</attribute>
          <attribute name="RARDeployer">jboss.jca:service=RARDeployer</attribute>
          <attribute name="CMDeployer">jboss.jca:service=ConnectionFactoryDeployer</attribute>
          <attribute name="WARDeployer">jboss.web:service=WebServer</attribute>
          <attribute name="MailService">jboss:service=Mail</attribute>
          <attribute name="JMSService">jboss.mq:service=DestinationManager</attribute>
          <attribute name="JNDIService">jboss:service=Naming</attribute>
          <attribute name="JTAService">jboss:service=TransactionManager</attribute>      <attribute name="UserTransactionService">jboss:service=ClientUserTransaction</attribute>
          <attribute name="RMI_IIOPService">jboss:service=CorbaORB</attribute>
       </mbean>