-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Pros and Cons of Using Hibernate for invoking Procedures
PostPosted: Thu May 04, 2006 9:06 am 
Newbie

Joined: Thu Apr 27, 2006 9:56 am
Posts: 14
Location: Hyderabad
Hi

Can anyone explain what will be the disadvantages invoking stored procedurs using hibernate.
Please explain me the pros and cons of Hibernate for stored procedure and the best way to invoke stored Procedures in Java.

Thanks & REgards


Top
 Profile  
 
 Post subject: Re: Pros and Cons of Using Hibernate for invoking Procedures
PostPosted: Thu May 04, 2006 9:26 am 
Regular
Regular

Joined: Wed Feb 22, 2006 11:28 am
Posts: 65
Location: Santiago, Chile
[quote="kalramadevi03"]Hi

Can anyone explain what will be the disadvantages invoking stored procedurs using hibernate.
Please explain me the pros and cons of Hibernate for stored procedure and the best way to invoke stored Procedures in Java.

Thanks & REgards[/quote]

Hello:

I have did one process that i invoke Store Procedure.

According to my experience, I can do my Store Procedure in which I specific any "columns names" from a "select" sentence. But, some time i have to invoke other store procedured did by other, and i found some Store Procedure is no "column name" specific, so... in my Hibernate Mapping SQL-Query context, when i Put:

<return-scalar column="someColumnName" type="string"/>
<return-scalar column="" type="string"/> --> Columns wich has no column name
<return-scalar column="" type="string"/> --> Columns wich has no column name

The Store Procedure Context is like:

select "ssss" as 'someColumnName', 3+5,5+6 from Table x

So... Did you see, that was a great "Cons" using Hibernate to invoke Store Procedure (when it was not did by yourself), because for Hibernate, you must specific properties to return.

Requests for comments.


Last edited by neketsushonen on Thu May 04, 2006 9:37 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 9:35 am 
Newbie

Joined: Thu Apr 27, 2006 9:56 am
Posts: 14
Location: Hyderabad
But I think the same can be acheived using JDBC too right? I mean invoking a procedure using callableStatement and obtaining a resultset.

Can you help me out in explaing how hibernate is better that using JDBC for store Procedures?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 9:41 am 
Regular
Regular

Joined: Wed Feb 22, 2006 11:28 am
Posts: 65
Location: Santiago, Chile
[quote="kalramadevi03"]But I think the same can be acheived using JDBC too right? I mean invoking a procedure using callableStatement and obtaining a resultset.

Can you help me out in explaing how hibernate is better that using JDBC for store Procedures?[/quote]

I am sorry... i wanted to say that is "great Const" for Hibernate Calling to Store Procedure.


I my enterprise, the developer team has did a great scalar test for calling Store Procedure with Hibernate, and with JDBC.

The results shows that using Hibernate the performance is 40% less than JDBC.

So, i think, if you use Hibernate, you can do your HQL, because, that is faster than JDBC. But, if you use Store Procedure to doing a Query, i suggest you use JDBC to invoke it.

Requests for comments.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 10:21 am 
Newbie

Joined: Thu Apr 27, 2006 9:56 am
Posts: 14
Location: Hyderabad
OK

Thanks a lot you had made my task lighter.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.