how to execute the stored procedure in hibernate 3 <p>I am new in hibernate. I am using hibernate 3 in my application using hibernate annotations , I am developing application in struts 1.3. </p> <p>My question is : I have googled a lot but could not understand how to call a stored procedure in <strong>hibernate using annotations</strong> , I have a simple scenario : suppose I have 2 fields in my jsp say 1) code 2) name , I have created a stored procedure in database for inserting those records into table. Now my problem is that how to execute it</p> <pre><code> List&lt;MyBean&gt; list = sessionFactory.getCurrentSession() .getNamedQuery("mySp") .setParameter("code", code) .setParameter("name", name) </code></pre> <p>I don't know the exact code how to do this. But I guess something like that actually I come from jdbc background therefore have no idea how to do this and same thing I want when <strong>selecting</strong> the data from database using stored procedure.</p>