How can I do "2PC"  WLS6.0 + oracle 8.1.6 (thin driver )

 

Access oracle db by sys user and execute initjvm.sql and initxa.sql.
And then grant "select" priviledge on dba_pending_transactions to users that you
want to use to make dbpool.
"jongho cha" <[email protected]> wrote:
>
Hi gurus ^^
I'm trying to do two phase commit with wls6.0 and oracle 8.1.6.
and I used oracle thin driver ( supports jdbc2.0 )
part from my config.xml --
<JDBCTxDataSource EnableTwoPhaseCommit="true"
JNDIName="testTXDataSource" Name="testTXDataSource"
PoolName="testPool" Targets="myserver"/>
<JDBCConnectionPool CapacityIncrement="2"
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="1"
LoginDelaySeconds="0"
MaxCapacity="10"
Name="testPool" Properties="user=uskeic;password=dba;url=jdbc:oracle:thin:@remote_oracle_db_ip:1521:dbname;dataSourceName=testPool"
ShrinkPeriodMinutes="15" ShrinkingEnabled="false"
Targets="myserver" TestConnectionsOnReserve="true"
TestTableName="dual" URL="jdbc:oracle:thin:@remote_oracle_db_ip:1521:dbname"/>
is it right configuration ?
basically , it looks like there's no problem when the WLS starts.
but if I get Conncetion from txDatasource and createStatement from the
connection
, I got some Exception
it tells like ..
java.sql.SQLException: ORA-06550: column 1, row14:PLS-00201: 'JAVA_XA.XA_START'
specifier must be defined
ORA-06550: column 1, row8:PL/SQL: Statement ignored
and blah blah blah...
my code starts here ,,
Connection con = null ;
XAConnection xaCon = null ;
Statement stmt = null ;
UserTransaction tx = (UserTransaction)ctx.lookup("javax.transaction.UserTransaction");
tx.begin();
Context jndiContext = JNDIService.getInitialContext();
XADataSource xaDataSource = (XADataSource)jndiContext.lookup( txDataSourceName
xaCon = xaDataSource .getXAConnection();
con = xaCon.getConnection(); // OK so far
stmt = con.createStatement() ; // Error HERE !!!
// ..... and do another DB works for testing 2PC
tx.commit();
you know, it's not a complete code . actually , it's like a psuedo code
but the way of getting connection and create statement follows my entire
code.
Can any one help me ? ^^;
Thanks in advance .

Similar Messages

  • How can I code this in Oracle Forms?

    I have a master-detail form. In the detail block, I have several records. Here is my name table.
    ID Name_Type Name
    1 old Mike
    2 Current John
    3 old Peter
    4 old Andrew
    I would like to create a button trigger which shall perform the following:
    1) insert a record into database with a copy of current value. In the above case it will insert create a record for John as name_type = 'OLD'. So we have total of 5 records. Commit the transaction.
    2) Scroll through my detail records (5) and go to one specific record and erase the values from it. In the above case, it should find John's record with name_type = 'Current' and erase John from it.
    How can I accomplish this in Oracle forms using a button-pressed trigger?

    Hi,
    Simple, using current values you can create new id , 'old' and name so oracle will create record, now refresh block, next using next_record in loop you can find record,erase one and refresh block.
    Adinath Kamode

  • How can i connect asp to oracle db

    how can i connect asp to oracle db
    when i go to odbc to make dsn the message say " the oracle(tm) client and networking components were not found thes components are supplied by oracle corporation and are part of the oracle version7.3 or greater client software installation
    you will be unable to use this driver until thess components have been installed "
    where can i get oracle(tm) and how can what is all steps to make asp connect to oracle db
    thanks for you .

    Probably best to ask the Windows specific lists that best fits your problem:
    ODBC: http://forums.oracle.com/forums/forum.jsp?id=763957
    .NET Data Provider: http://forums.oracle.com/forums/forum.jsp?id=1015160
    Oracle Objects for OLE: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Objects for OLE and Wizards: http://forums.oracle.com/forums/forum.jsp?id=763961
    Mike.

  • How can i attach files in oracle applications

    Hi,
    How can i attach files in oracle applications ? Is there any thing like open dialogue box?
    krishna

    Hi Naveen,
    While I am searching for attaching files to oracle forms in forum, I found you. I have a question; probably you could help me out. I have a custom form which needs to have the facility to open the text files from C drive and load the data into Oracle tables.
    The custom form will be attached to Oracle apps responsibility... We are currently using forms6i.
    Could you help me out to open a dialog box which provides the users to open the text files from C drive when user clicks on a button
    I have attached d2kcomm and d2kwutil to the form. It complies at the form level
    but still it is not showing the dialog box.
    I would appreciate if you can help me in this regard.
    Thanks in Advance
    Ravi.
    Message was edited by:
    ravipampana

  • How can I change SGA_TARGET IN Oracle 10G.

    Dear Experts,
    Please tell me
    How can I change SGA_MAX_SIZE IN Oracle 10G.
    How can I change SGA_TARGET IN Oracle 10G.
    How Can i recreate SPFILE IN Oracle 10G.

    Dear Experts,
    Please tell me
    How can I change SGA_MAX_SIZE IN Oracle 10G.
    How can I change SGA_TARGET IN Oracle 10G.
    How Can i recreate SPFILE IN Oracle 10G.SGA_MAX_SIZE and SGA_TARGET are all to be changed by alter system statement.
    The difference is, you can't make change to SGA_MAX_SIZE effective while instance is running. Need restart database to make change effective.
    Your can change SGA_TARGET while instance is running, as long as it's smaller than SGA_MAX_SIZE
    to recreate a spfile,
    you can shutdown your database,
    find a copy of valid pfile,
    startup pfile=/directory/yourpfile
    and
    create spfile from pfile;

  • How can I control updating in Oracle ADF

    I have been using Oracle Forms for many years and am trying to learn Jdeveloper and Oracle ADF. In Oracle Forms, we base all of out blocks on views and control all updating in on-insert, on-update, and on-delete triggers. How can I control updating in Oracle ADF in a similar manner?

    Hi,
    Hope following will helpful
    http://www.pitssamerica.com/files/101102_WP%20FormsToADF.pdf
    http://www.exploreoracle.com/2010/08/24/oracle-application-development-framework-adf-and-oracle-forms-developers/
    http://www.google.lk/url?sa=t&rct=j&q=adf%20sample%20for%20oracle%20form%20developer&source=web&cd=7&ved=0CEAQFjAG&url=http%3A%2F%2Forclsamples.googlecode.com%2Ffiles%2FThe%2520Challenges%2520Oracle%2520forms%2520Migration%2520to%2520ADF.pdf&ei=0FzWToaUI4_JrQe0oommDg&usg=AFQjCNEdpho2uVqhSCEugw1svza6zc9iSg&cad=rja

  • How can i Convet String to oracle.jbo.domain.Date

    Hi all,
    How can i Convet String to oracle.jbo.domain.Date ?
    Pls help its urgent?
    Thanks
    Amit

    Hi
    Try this hope this helps.
            oracle.jbo.domain.Date current_date = null;
            oracle.jbo.domain.Date current_date1 = null;
            String date = null;
            try{
                PreparedStatement st = getDBTransaction().createPreparedStatement("select trunc(sysdate) from dual",1);
                ResultSet result = st.executeQuery();
                while (result.next()) {
                   date = result.getString(1);
                   System.out.println("Sysdate:"+date);
                current_date = current_date1.toDate(date);
                System.out.println("Date Format:"+current_date);
            }catch(SQLException sqle){
                sqle.printStackTrace();
            }

  • How can I change SGA_MAX_SIZE IN oRACLE 10G.

    Dear Experts,
    Please tell me
    How can I change SGA_MAX_SIZE IN Oracle 10G.
    How can I change SGA_TARGET IN Oracle 10G.
    How Can i recreate SPFILE.

    another copy of dup How can I change SGA_TARGET IN Oracle 10G.

  • How can i return object from oracle in my java code using pl/sql procedure?

    How can i return object from oracle in my java code using pl/sql procedure?
    And How can i returned varios rows fron a pl/sql store procedure
    please send me a example....
    Thank you
    null

    yes, i do
    But i can't run this examples...
    my problem is that i want recive a object from a PL/SQL
    //procedure callObject(miObj out MyObject)
    in my java code
    public static EmployeeObj callObject(Connection lv_con,
    String pv_idEmp)
    EmployeeObj ret = new EmployeeObj();
    try
    CallableStatement cstmt =
    lv_con.prepareCall("{call admin.callObject(?)}");
    cstmt.registerOutParameter(1, OracleTypes.STRUCT); // line ocurr wrong
    //registerOutParameter(int parameterIndex, int sqlType,String sql_name)
    cstmt.execute();
    ret = (EmployeeObj) cstmt.getObject(1);
    }//try
    catch (SQLException ex)
    System.out.println("error SQL");
    System.out.println ("\n*** SQLException caught ***\n");
    while (ex != null)
    System.out.println ("SQLState: " + ex.getSQLState ());
    System.out.println ("Message: " + ex.getMessage ());
    System.out.println ("Vendor: " + ex.getErrorCode ());
    ex = ex.getNextException ();
    System.out.println ("");
    catch (java.lang.Exception ex)
    System.out.println("error Lenguaje");
    return ret;
    Do you have any idea?

  • How can i extract data from oracle table  to flat file or excel spread shee

    Hello,
    DB Version is 10.1.0.3.0
    How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
    Regards,
    D

    Here what I did
    SET NEWPAGE 0
    SET SPACE 0
    SET LINESIZE 80
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET VERIFY OFF
    SET HEADING OFF
    SET MARKUP HTML OFF SPOOL OFF
    Sql> SPOOL bing
    select * from -------;
    SPOOL OFF;
    I do not see file.
    I also tried
    Sql> SPOOL /tmp/bing
    select * from -------;
    SPOOL OFF;
    But still not seeing the fie,

  • HOW CAN WE TRANSFER SAP DATA ---- ORACLE ERP

    HI MASTERS
    HOW CAN WE TRANSFER SAP DATA <----> ORACLE ERP
    BY USING LSMW . OK BUT IN REAL TIME HOW IS IT . WAY OF PROCESSING PLEASE TELL ME . AND ALSO PLEASE REPLY ABOOUT
    SCATT PROGRAM

    Also, when are we going to use the ff. when extracting SAP Data to BO:
    a. INFOSET
    b. Function Module
    c. Direct Table Query
    d. Unix Directory
    What are the advantages/disadvantages of choosing one over the other?
    Currently, we are using BO XI 3.0, can we have a direct connection between SAP & BO?
    Thanks in advance for any helpful information.
    Regards,
    Bale

  • How can I move photos from my computer to a Thumb drive?

    How can I move photos from my computer to a Thumb drive?

    https://discussions.apple.com/message/16881894#16881894
    2 way to get the icon...
    Finder>Preferences>General, check what you want to show on Desktop.
    Finder>Preferences>Sidebar, check what you want to show in the Sidebar of all windows.

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • How can I download my iMac iTunes library to an external drive and reload the library to iTunes on a PC?

    How can I download my iMac iTunes library to an external drive and reload the library to iTunes on a PC?

    Hi Niel.  Can you be move specific for those of us not tech savy?   1 - Can you provide steps to back up the library?  2 - How do you organize the library?  3 - When you move the entire iTunes folder, does it include iTunes paid for music along with downloaded music from CDs?  Thanks

  • How can I export my iTunes Library to an external hard drive?

    How can I export my iTunes Library to an external hard drive? and once i do that how can i play the library through the external drive? I basically want to be able to delete all my music on itunes once it is on my external hard drive so i can have more internal hard drive space.

    Follow this guide very carefully: http://support.apple.com/kb/HT1364?viewlocale=en_US
    It's very easy to do....

Maybe you are looking for

  • Adobe Creative Cloud app, No response to commands.

    I've done almost everything I can think of to get the creative cloud app that was put on my desktop to do ANYTHING. I will click it, and it will do absolutely nothing. Nor will anything download from the Download Center. Please help! I need these pro

  • MacBook Pro is glitching after downloading OS 10.8.2

    Okay so I upgraded to OS 10.8.2 a couple days ago and now Messages is glitchy (grabs texts form a couple days ago and puts them where the most recent texts should go, so i'll be reading through my texts and realize they're completely out of order and

  • GPS SIGNSL LOST FOR LUMIA620 in Egypt

    I have Lumia 620 and Here drive was working very well and offline in Egypt but after less than 2 month from purchasing my phone it starts to shutdown without any reason and finally it refuses to turn on again after 3 weeks in Nokia care point I recei

  • How clear customer

    Dear All, I booked customer invoice in FB70 in currency PKR. but payment received in us Dollars. now i want to clear the customer account in f-32 but it doesnt allow me to do so......... while the dr and cr amount is equal and balance is zero but it

  • Change calling plan

    We are on a 1400 minute calling plan and are not using nearly as many minutes as we used to. We want to scale back down to 750 minutes. I have been told repeatedly by Verizon I can do this online, but I cannot find where. Under the Plan area of My Ve