[jboss-user] [JBoss Seam] - Re: Seam and plain old JDBC code

christian.bauer@jboss.com do-not-reply at jboss.com
Thu Mar 1 06:12:46 EST 2007


Depends what the API of your persistence code is. If you call loadThatStuff() and an instance of some domain object is returned, that should work just fine. JSF, Seam, and so on are really based on domain objects with property accessor methods and collections. It will be a bit more work for you to implement saveModifiedData(object) of course (this is what an ORM can do automatically, generate the SQL). 

On the other hand, if your persistence code only returns tabular resultsets, and expects handwritten UPDATE, DELETE, and INSERT statements, or if it uses a Java RowSet to capture modifications, things become more difficult. You'd need to copy stuff manually between domain objects and resultsets. You could also consider using Hibernate as a resultset-to-object-mapper, and migrate your own SQL:

http://blog.hibernate.org/cgi-bin/blosxom.cgi/2004/08/23#customsql
http://blog.hibernate.org/cgi-bin/blosxom.cgi/2004/06/23#comparingpersistence


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

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



More information about the jboss-user mailing list