-->
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.  [ 6 posts ] 
Author Message
 Post subject: Simple Jdbc
PostPosted: Fri Oct 24, 2003 1:33 am 
Hello,

I am looking to use Hibernate at work. However, as it does not cover stored procedures and very complex sql, I am looking to create a very simple library that handles the


Top
  
 
 Post subject: Simple JDBC
PostPosted: Fri Oct 24, 2003 1:35 am 
Beginner
Beginner

Joined: Thu Aug 28, 2003 7:05 pm
Posts: 20
Hello,

Note: The above post was from me. Sorry, but I was not logged into the forum.

Cheers
Gavin Las


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2003 2:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Did you look at iBatis?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2003 4:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sounds all good....


...but just to inform ya' ;)

Stored procedures is now very possible to use by making a Custom ClassPersister (and the new possibility a Custom CollectionPersister)....at least to persist stuff (not query stuff ;)

To query stuff via stored procedures (or by other means) we are very interested in making this possible/easier in hibernate.

createSQLQuery() is one of those "other means". (we are also going to make the actual sql externalizable in the hbm.xml - got patches for it)

The "returning multiple result sets" stuff I'm not an expert in - since it sounds very hard to standardize on - many ways to structure it...but any suggestions are welcome ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: SQLExecutor
PostPosted: Thu Dec 18, 2003 5:36 pm 
Newbie

Joined: Thu Dec 18, 2003 3:20 pm
Posts: 6
I just came across this library

http://sourceforge.net/projects/sqlexecutor/

There is an article about it on theServerSide.

http://www.theserverside.com/resources/article.jsp?l=SQLExecutor

-- Don


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 1:32 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 6:04 am
Posts: 161
Location: Linz, Austria
The Spring Framework (http://www.springframework.org) provides a JDBC abstraction framework that simplifies working at the plain JDBC level, including stored procedure support. It is typically used with SQL kept in Java classes, though. Spring's JDBC support also provides goodies like translation of SQLExceptions into Spring's generic DataAccessException hierarchy etc. In typical Spring style, all of this can be used as individual library or within a Spring application context.

If you want to externalize SQL statements in combination with simple O/R mapping (without transparent persistence), I recommend iBATIS Database Layer (http://www.ibatis.com). It's a simple but nice alternative to a transparent persistence tool, if you want to work at the SQL level and don't need dirty detection and implicit updating. Note that as of the upcoming 1.0 M4, the Spring Framework features ibatis-db support, analogous to the existing JDBC, Hibernate, and DAO support.

In general, Spring provides the abstraction and integration means for all kinds of data access technologies. Its generic transaction management can work with all sorts of strategies, be it JtaTransactionManager, HibernateTransactionManager, or DataSourceTransactionManager for a single JDBC DataSource. You can easily let transactions span multiple data access operations, even when implemented with different tools. Spring also provides convenient factories for the involved resources.

In the particular case of HibernateTransactionManager, the transaction can be exposed to plain JDBC access code or ibatis-db access code by a simple configuration setting. The JDBC respectively ibatis-db access code does not have to be aware of working within a Hibernate transaction! Spring provides all the glue that makes this work behind the scenes. The data access objects are just concerned with the actual data access logic: They implicitly participate in an existing transaction, if any.

Juergen


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.