You can use stored procs using the NamedNativeQuery syntax. Check out 
http://docs.jboss.org/ejb3/app-server/HibernateEntityManager/reference/en/html_single/index.html#query_native.

Most devs that are dead set against stored procs do not have an open mind. 
Stored procs offer an interface into the db that is consistent. They also let 
your dba/dbd do his job and ensure correct operation/isolation of the 
underlying schema as well as give him the control that he requires to do his 
job optimally. You do not need to use out parameters, you'd just return 
resultsets that you'll map onto an object. It's a fine choice for those 
companies that require fine grained control over database access, query 
optimization, blah, blah... At my company we run a lot (I mean a lot) of 
simultaneous transactions. We appreciate the control that we have using stored 
procs. We've had trouble with giving over complete control to ORMs with 
deadlocking. Of course, this won't happen for most applications, but most 
applications are not highly concurrent. The point is that when you knock (or 
see someone knocking) a technology like stored procs, they usually don't really 
understand the uses (good and/or bad) of the technology. Just think of it as 
another tool that you'll be better off understanding even if you never use it 
again.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927660#3927660

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927660


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to