logo       


Re: Connection pool mechanism in iBATIS.: msg#00325

Subject: Re: Connection pool mechanism in iBATIS.
You have configured iBATIS to NOT use the application server's connection pool - you've asked iBATIS to use it's own connection pool (DBCP).
 
If you mean that you want to call setRollBackOnly() in an EJB method, then this will not work with your current configuration.  If you want to use EJB's container managed transactions, you'll need to do the data source lookup from JNDI and configure iBATIS like this:
 
  <transactionManager type="EXTERNAL">
    <property name="SetAutoCommitAllowed" value="false"/>
   
    <dataSource type="JNDI">
      <property name="DataSource" value="java:comp/env/jdbc/hsdb"/>
    </dataSource>
  </transactionManager>

However, I remember from your previous posts that you need to use local credentials to create the database connection.  If that requirement remains, then you'll have to keep it the way it is and manage transactions with iBATIS code - rather than letting the container do it for you.
 
For this, and many other, reasons it would be best if you did not have to use local credentials to connect to your database.  It would be much better to pass the USER as a parameter to the procedures, rather than relying on the logon credential of the connection.
 
Jeff Butler
 
 
On 9/30/05, Vijai Senthil Padmanabhan Kalaiyarasi <vijaisenthil.padmanabhan@xxxxxxxxxxx> wrote:
Hi,
 
    I have a doubt whether the iBATIS will use the connection pool of the Application server's or its own mechanism.
    Because I need to so a sesionContext.setRollBackOnly()
   
    My SQLMapConfig for connection info goes like this.
    I am not using any JNDI look up to the Application server to get the datasource.
 
SQLMapconfig.xml
---------------------------
 
<transactionManager type="JDBC">
    <dataSource type="SIMPLE">
        <property name="JDBC.Driver" value="oracle.jdbc.driver.OracleDriver "/>
        <property name="JDBC.ConnectionURL" value="jdbc:oracle:thin:@machname:1521:sid"/>
        <property name="JDBC.Username" value="${ username}"/>
        <property name="JDBC.Password" value="${password}"/>
        <property name="JDBC.DefaultAutoCommit " value="true" />
        <property name="Pool.MaximumActiveConnections" value="10"/>
        <property name="Pool.MaximumIdleConnections" value="5"/>
        <property name="Pool.MaximumCheckoutTime" value="120000"/>
    </dataSource>
  </transactionManager>
 
 
Thanks in advance...
Vijai Senthil P K


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe