Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Bean Re-initialization  RSS feed

 
javare java
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to java and need some help regarding java bean re-initialization.

I have a java bean that i use to show data (from a database) on a webpage. I want to show fresh records on the page every time the page is visited. Do i need to re-initialize the bean on each page load? if yes, how can i do that?

I am using hibernate for database connection, should i re-open the connection on each page load?


Thanks.
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Javare java",

We don't have many rules here at the JavaRanch, but we do insist that you use your Real Name and not some sort of "handle" or obvious alias. If you're not sure about this, see
http://www.javaranch.com/name.jsp .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!