Showing posts from June, 2013

Clearing ADF Faces Table row section when change persistence is ON

Clearing af:table row section when change persistence is ON involves two steps: 1. Clearing the selected rows using table API 2. Call the change manager API to replace the current change persistence with an empty set  Here is the code snippet for the above tasks: public void clearRowSelection ( RichTable table ) { //Clearing the selected rows using table API table . getSelectedRowKeys (). clear (); //Call change manager API to replace the //current change persistence with an empty set RowKeySetAttributeChange rks = new RowKeySetAttributeChange ( table . getClientId (), "selectedRowKeys" , new RowKeySetImpl ()); RequestContext . getCurrentInstance (). getChangeManager (). addComponentChange ( FacesContext . getCurrentInstance (), table , rks ); }

Smart database connection pooling with new jbo.ampool.connection_threshold parameter

Updated this post on 21-June-2013 to avoid further confusion on this topic If you have seen application module configuration parameter editor in JDeveloper release, you might have noticed a new property jbo.ampool.connection_threshold . Wondering what is it? Well, this in an 'internal' property( NOT for public use at this moment) which has been introduced to avoid the overhead associated with normal connection pooling. In normal case when connection pooling is ON, framework will close all opened cursors at the end of a request and then will restore the state during next request. This creates some sort of overhead especially when you have partially fetched result set( for example data fetch caused by UI like scrollable table). The new parameter provides a way for users to strike an ideal balance by releasing JDBC connections only when a certain threshold is reached. This property defines maximum number of JDBC connections that all AM instances can hold wit

Book review - Beginning EJB 3 (Java EE 7 Edition)

The book "Beginning EJB 3 Java EE 7 Edition" is one of the best book for a Java developer who wants to get in to Java EE programming. The contents are well structured and you may find smooth flow of topics as you move forward. The book also contains many useful code samples which may help you to grasp the concepts quickly. The book start off with an introduction to EJB3. You will get a chance to learn all necessary things related to EJB in the first two chapters. Then the book discusses the Java Persistence API in simple terms. This is followed by MDB and Web Services. A full chapter is dedicated to discuss interaction between various Java EE components such as session beans, entities, MDB and web services. This book also discusses transaction management in great detail which is good enough to meet most of the generic use cases. Another interesting topic that you may find in this book is Context and Dependency Injection. This is presented in a very simple and easy to follow