Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC database connection Cache

 
JP Bar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!, I've a big project with WAS 6.1-JAVA 1.5-oracle with the next structure
-40 Projects (forms) very similar with similar querys, they only read from database (only select, nor update neither insert)
-1 Common project that manages all the database connections and is a shared library for the 40 projects.

My question is, which is the best method to cache those database connections?. I've one shared library for a lot of similar projects.
I've read a lot about cachedrowset, OSCache, spring, hibernate, JDBC Connection... but I think AOP like hibernate is not necessary, all the queries always return a pair value-key objects, what do you recommend me? I'm looking something that permits optimize database conection access more than object caching.

Thanks in advance!
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use IBATIS persistance framework. It supports caching for select queries, it supports many features for caching. It can be configured via SQLMAP.xml file.


Cheers!!!

Ujjwal B Soni
<baroda>
<gujarat>
<india>
<919998971048>
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It also supports native SQL & it returns in java.util.List or hashmap. I think it would be much reliable & easy if you use it in your project.

XML-based Object/Relational mapping and persistence framework as well as a data access abstraction layer. [Open source]
ibatis.apache.org

Cheers!!!

Ujjwal B Soni
<baroda>
<gujarat>
<india>
<919998971048>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic