Home » Author Archives: Boris Lam

Author Archives: Boris Lam

Boris Lam
Boris is an experienced Java developer with in Hong Kong. His expertise is in Java EE technology, object-oriented application development, and the use of open source frameworks (e.g. Spring , Apache MyFaces). In recent years, he is primarily involved in framework development and architectural design in serveral Government related software development projects.

Spring Data, MongoDB and JSF Integration tutorial

spring-data-logo

Introduction to sample application (MongoShop Product Catalog) After this tutorial, a sample application (MongoShop Product Catalog) with the following functional requirement will be built:               1. Searching product with different criteria (e.g. sku, product type, title, stc) 2. Create a new product with different category. 3. Edit selected product details 4. Delete selected product ...

Read More »

Lightweight Web Application Framework: PrimeFaces (JSF) + Guice + MyBatis (Part 2)

apache-myfaces-logo

In this part, I will continue to demonstrate the integration of JSF, Guice and MyBatis. DBCP connection pool and MYSQL database is used in persistence layer. Take a look at Part 1. Integrate Google Guice with MyBatis In the previous post, we have created a ServletContextListener. Now, we just bind the BasicDataSourceProvider and JdbcTransactionFactory in the contextInitialized method. GuiceContextListener.java package ...

Read More »

Lightweight Web Application: PrimeFaces (JSF) + Guice + MyBatis (Part 1)

apache-myfaces-logo

Recently, my friend asks me how to build a lightweight java web application. Many Java web developer would choose Spring and hibernate to build a traditional web application. However, it may not be lightweight enough. I suggested him try to use Guice and MyBatis to build the application framework. Although Spring is more feature-riched than Guice, I admitted that Guice ...

Read More »

Session Timeout Handling on JSF AJAX request

jsf-logo

Session Timeout Handling on JSF AJAX request When we develop JSF application with AJAX behaviour, we may experience the problem in handling timeout scenario of Ajax request. For example, if you are using J2EE Form-based authentication, a normal request should be redirected to the login page after session timeout. However, if your request is AJAX, the response could not be ...

Read More »

Customizing Spring Data JPA Repository

spring-data-logo

Spring Data is a very convenient library. However, as the project as quite new, it is not well featured. By default, Spring Data JPA will provide implementation of the DAO based on SimpleJpaRepository. In recent project, I have developed a customize repository base class so that I could add more features on it. You could add vendor specific features to ...

Read More »

Hibernate native SQL features into your Spring Data Repository

spring-data-logo

JPA provides @NamedNativeQuery for you to use native SQL. However, the usage is not so convenient, especially when you need to map multiple entities in your native SQL. You have to define a set of SqlResultSetMapping mapping which is quite error prone. For those who have used Hibernate native SQL features before, you will find that it is much more ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close