Integrating Hibernate and jPOS Framework

Today i want to share about Integrating Hibernate and jPOS Framework. The implementation will based on my old post about Implementation jPOS Transaction Manager you can read the jPOS project on these post. The jPOS System is look like: i will add new participant for FinancialTransaction group called FinancialTransactionLogging, the participant is responsible for inserting the FinancialTransactionQueryRemoteHost response into database using Hibernate framework. First, For integrating Hibernate and jPOS, i create new qbean called HibernateManager that extends org.jpos.q2.QBeanSupport the initService methods will buildSessionFactory for init the hibernate SessionFactory object.

Continue reading

Implementation Template Methods Design Pattern

Today i want to share about Implementation Template Methods Design Pattern for hibernate session management. Based on javapapers website, Template pattern is: Template method design pattern is to define an algorithm as skeleton of operations and leave the details to be implemented by the child classes. The overall structure and sequence of the algorithm is preserved by the parent class. you can read more about Template method design pattern on javapapers site. This post will explain the Implementation Template Methods Design Pattern for hibernate session management. this methods is ensure

Continue reading