Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring Transaction with Sybase
    primarykey
    data
    text
    <p>I am using Spring in my Web Application , with the underlying database as Sybase.</p> <p>I have 3 complex stored procedures to be executed. The procs , have <strong>create table</strong> and <strong>drop table</strong> commands to hold temporary result sets.</p> <p>The tables are created in the user db space , rather that in the tempdb space. Hence, I am faced with the need to ensure that the entire service operation from the service bean , that would have DAO objects calling the stored procs, to be serialized. Does simply making the service bean method a Spring Transaction, ensure a solution to potential concurrency related problems in my case? </p> <p>Another thing that I noticed is that, annotating my service method as @Transactional , made the sybase database throw an error : "Create table command cannot be executed within a transaction". Does this mean that Spring makes the entire database operation a transaction? I am really not clear about this , and any explanation would be welcome. Meaning if I have a stored proc named <strong>myproc</strong> . The sybase statement would be <strong>exec myproc</strong>. This,say, is executed by the DAOobject from the service method, annotated as @Transactional. Now does Spring make the database operation as "<strong>begin tran exec myproc end tran</strong>". My observation seems to suggest that. Please explain.</p> <p>And also explain, if just annotation of @Transactional , will solve my concurrency issues. I , actually don't want 2 instances of my stored proc to be running on the database , at a time.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload