Displaying a “No records found” message for an empty JSF HtmlDataTable September 23, 2007
Posted by essamabdelaziz in JSF.add a comment
you want to display a “No records found” message when you have an empty HtmlDataTable in JSF
<h:dataTable var="row" value="#{mybean.rows}" rendered="#{mybean.rows.rowCount > 0}">
<h:column><f:facet name="header"><h:outputText value="row title 1" /></f:facet><h:outputText value="#{row.firstColumn}" /></h:column><h:column><f:facet name="header"><h:outputText value="row title 2" /></f:facet><h:outputText value="#{row.secondColumn}" /></h:column><h:column><f:facet name="header"><h:outputText value="row title 3" /></f:facet><h:outputText value="#{row.thirdColumn}" /></h:column></h:dataTable><h:outputText value="No records found" rendered="#{mybean.rows.rowCount == 0}" />
Connection Pool September 21, 2007
Posted by essamabdelaziz in DataBase.add a comment
Connection Pool
|
connection pool |
| A set of connections maintained so that the connections can be reused when there is a future need for the conneciton. |
Connection pools are used to reduce the overhead of using a database. Establishing a connection to the database is a costly operation. A connection pool keeps a pool of open connections, each connection can be used for a time as needed, and then released back to the pool. A connection that has been released back to the pool can then be reused.
Connection pooling is especially important in server applications. The overhead of opening a new connection for each new client request is too costly. Instead, the database pool allows for a connection to be opened once and then reused for many requests.
DataSource
|
DataSource |
| A JDBC term (and interface name) used for a factory that is used to obtain connections. |
What’s Hibernate September 15, 2007
Posted by essamabdelaziz in Hibernate.add a comment
Hibernate is an open source object/relational mapping tool for Java.
Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC.
Hibernates goal is to relieve the developer from 95 percent of common data persistence related programming tasks.
The Hibernate Query Language, designed as a “minimal” object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries. Hibernate is now the most popular object/relational
Hibernates goal is to relieve the developer from 95 percent of common data persistence related programming tasks.
Hibernate is Free Software. The LGPL license is sufficiently flexible to allow the use of Hibernate in both open source and commercial projects (see the LicenseFAQ for details). Hibernate is available for download at http://www.hibernate.org/.