1 Reply Latest reply on Jul 15, 2009 7:24 AM by anil kumar

    EJB invocation in JBOSS

    anil kumar Newbie

      I am invoking EJBs. the same thing is working fine in Glassfish but not in JBOSS. The error is "java.sql.SQLException: You cannot set autocommit during a managed transaction!"

      the datasource file is as below.

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <local-tx-datasource>
      <jndi-name>jdbc/PersonDataSource</jndi-name>
      <rar-name>jboss-local-jdbc.rar</rar-name>
      <use-java-context>false</use-java-context>
      <connection-definition>javax.sql.DataSource</connection-definition>
      <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
      <min-pool-size>1</min-pool-size>
      <max-pool-size>10</max-pool-size>
      <blocking-timeout-millis>30000</blocking-timeout-millis>
      <idle-timeout-minutes>30</idle-timeout-minutes>
      false
      <background-validation>false</background-validation>
      <background-validation-millis>0</background-validation-millis>
      <validate-on-match>true</validate-on-match>
      <statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
      <isSameRM-override-value>false</isSameRM-override-value>
      <allocation-retry>0</allocation-retry>
      <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
      <security-domain-and-application xsi:type="securityMetaData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

      <type-mapping>Oracle9i</type-mapping>

      <type-mapping>Oracle9i</type-mapping>
      <local-transaction/>
      <user-name>person</user-name>
      person
      <check-valid-connection-sql>SELECT * FROM DUAL</check-valid-connection-sql>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <prepared-statement-cache-size>0</prepared-statement-cache-size>
      <share-prepared-statements>false</share-prepared-statements>
      <set-tx-query-timeout>false</set-tx-query-timeout>
      <query-timeout>0</query-timeout>
      <use-try-lock>60000</use-try-lock>
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
      </local-tx-datasource>



      Please suggest me on this solution.