problem with CMP and oracle stored proc


EJB programming & troubleshooting: problem with CMP and oracle stored proc

  1. problem with CMP and oracle stored proc (3 messages)

    In my program, Im calling a stateless session bean's method1().
    Now method1() starts a user transaction (the transaction is fully bean managed) and after calling a stored proc(using jdbc), calls method2() of the same session bean(this is just a simple java call).

    method2 creates a CMP for table 1. After that, it calls a stored proc which accesses table 1. but this stored proc is not getting executed. it is going into an endless wait cycle.
    Before calling the stored proc (the one that hangs), I have not updated any values in the CMP.

    The CMP will use a separate connection to the DB than the one used for running the stored procs. But they are still in the same user transaction.
    (I wish I cud post the code here, but I cant due to IPR reasons)

    My question is , does just creating the CMP lock that row of the table??
  2. Hi,
    Which DataSource are you using , Tx-DataSource or non - Tx DataSource.
  3. Hi

    I was using the non TX data source. Switching to a Tx data source solved the problem.

    But I was unable to find enough documentation about transactional datasources. As far as I had analyzed, mine was not a distributed transaction. And Tx Datasources are required for distributed transactions only.

    Can you tell me more about it, or give me links for some documentation?

  4. Hi,
       Does stored procedure in method1 works on table 1. Because the container will ask the database to unlock the record only after the transaction is over.