[jboss-user] [JBoss Seam] - Seam + stored procs: what's the recommendation?
do-not-reply at jboss.com
Wed Sep 26 08:06:35 EDT 2007
Just wondering what the official Seam recommendation/stance is regarding using sprocs with Seam web apps?
Other than being tied down to a particular DB vendor due to differences in the SQL syntax, we are aware of this problem.
I've read Gavin King and Martin Fowler stating a good reason to use sprocs is for maximum performance. Assume that this is not an issue for us.
I've done this with a simple use case recently and found resultsets cumbersome to use (dataTables and looping, etc) esp. with dynamic columns. Also, you can't use the Hibernation Validator annotations on the getter methods of the entity bean class (and in JSF using s:validate or s:validateAll tags). Any other Seam/JSF/EJB3 advantages we'd lose out on? Yes, I know about caching and lazy-loading.
The three Seam books I have did not mention sprocs or resultsets at all, as I recall.
So is it basically recommended to convert legacy sprocs to entity beans or POJOs? Not to create new sprocs at all for Seam app use?
And obviously, thanks to a reply on here, we learned it's best to use DataSource (connection-pooled) rather than DriverManager to get DB connections to minimize overhead.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088798#4088798
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088798
More information about the jboss-user