2 Replies Latest reply: Oct 10, 2013 10:31 AM by rp0428 RSS

    Commit with Java

    975791


      Hi,

       

      As a DBA,I don't have knowledge in java.I would like to know few things about commit,connectvity.

      When developing java based application,how does commit work?ie For each row commited or bulk row commited.

       

      For Ex :

      In a batch job,today few rows( 5) are inserted in a table, Tommorow 1000 rows are inserted in that table.

      How many commit for 1000 rows and 5 rows?

       

      For understanding purpose,asking.....

       

      please share types of connectivity in java with example?

       

       

      Br,

      Raj

        • 1. Re: Commit with Java
          PhHein

          For Ex :

          In a batch job,today few rows( 5) are inserted in a table, Tommorow 1000 rows are inserted in that table.

          How many commit for 1000 rows and 5 rows?

           

          It all depends on settings, frameworks used, transactions.

           

          You can commit each row individually, or one commit for all rows , one commit every x rows. It all depends on your requirements.

          • 2. Re: Commit with Java
            rp0428
            As a DBA,I don't have knowledge in java.I would like to know few things about commit,connectvity.

            When developing java based application,how does commit work?ie For each row commited or bulk row commited.

             

            For Ex :

            In a batch job,today few rows( 5) are inserted in a table, Tommorow 1000 rows are inserted in that table.

            How many commit for 1000 rows and 5 rows?

             

            For understanding purpose,asking.....

             

            please share types of connectivity in java with example?

            You will need to review the Oracle JDBC Developer's Guide. It answers your 'commit' question and has sections that explain the types of connectivity with examples.

            http://docs.oracle.com/cd/B28359_01/java.111/b31224.pdf

             

            Committing Changes

             

            By default, data manipulation language (DML) operations are committed

             

            automatically as soon as they are run. This is known as the auto-commit mode.

             

            However, you can disable auto-commit mode with the following method call

            That doc has entire chapters (Part III - connection and security) about connectivity, the different drivers that are available and how to use them.

            This part consists of chapters that discuss the use of data sources and URLs to connect

             

            to the database. It also includes chapters that discuss the security features supported

             

            by the Oracle Java Database Connectivity (JDBC) Oracle Call Interface (OCI) and Thin

             

            drivers, Secure Sockets Layer (SSL) support in JDBC Thin driver, and middle-tier

             

            authentication through proxy connections.

             

            The connection URLs specify the driver type and database specifiers and there are too many possible options to explain here when the doc covers them all.

             

            If, after reviewing that doc, you still have questions then you need to ask specific questions about what type of connectivity you are asking about.