tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Newgro <per.new...@gmx.ch>
Subject Why is the container managing the autocommit state in BMTs?
Date Wed, 06 Dec 2006 07:16:10 GMT
Hi *,

afaik BMT means bean managed transactions. 

I use SFSB defined in the following way:

  <session>
    <ejb-name>ExportDatabaseUC</ejb-name>
    <home>my.common.ejb.UseCaseHome</home>
    <remote>my.common.ejb.UseCaseRemote</remote>
    <ejb-class>my.misc.backup.ejb.ExportDatabaseUcEJB</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Bean</transaction-type>
    <resource-ref>
      <res-ref-name>APPLDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
      <res-ref-name>APPLDBnoTx</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
  </session>

If i get a connection from the APPLDBnoTx i try to set the autoCommit flag to 
false. But then i get a SQLException from openejbs JdbcConnection "The commit 
state is managed by container" (not the exact words). But this confuses me a 
little because i use BMT. It would realy be great if someone could explain 
this to me (maybe i'm completely wrong).

Cheers
Per

Mime
View raw message