Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Hibernate ?

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are developping an application available through internet.
Client is an application Swing and to connect to the database i wrote a servlet. I created only 1 connection to the databse.
I want to improve the performance with the database conenction.
When i click 'Show all users', i must wait for a time.
I wanted to use EJB ? What do you think about ? Or Hibernate as there is already a connection pool with Hibernate.
If i use Hibernate then it means i don't need EJB ? is right ?
thanks very much.
 
author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like you will have very few users on you application. The only reason I would use CMP EJBs would be for their transactional capabilities and the caching capabilities. Otherwise I would stick with an ORM tool like Hibernate or OJB.

Hibernate shit with a simple connection pooling algorithm which is not intended for production use. Hibernate also ships with C3P0 and also supports Jakarta's DBCP and Proxool.

With hibernate you can work with POJOs and a simple web container. Unless you need the transactional capabilities of EJBs I would stay away from adding the complexity of a full fledge J2EE server into the mix.

Brian
 
Brian Sam-Bodden
author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...Hibernate sh*t... (boy I'm sounding like Ted Neward now! ;-) Sorry for the typo (two left hands)
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
LOL. Brian, you can edit your posts with one of the buttons next to "reply-to", "quote", etc.
That is, unless you want to leave it like that -- it is one of those funnier typos
 
Paper beats rock. Scissors beats tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic