HSQL In-memory database hibernate maven config example

maven dependency <properties> <!– PROJECT DEPENDENCIES BEGIN –> <hsqldb.version>2.3.4</hsqldb.version> <!– PROJECT DEPENDENCIES END –> </properties> <dependencies> <dependency> <groupId>org.hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>${hsqldb.version}</version> </dependency> </dependencies> hibernate configuration <?xml version=”1.0″ encoding=”utf-8″?> <!DOCTYPE hibernate-configuration PUBLIC “-//Hibernate/Hibernate Configuration DTD 3.0//EN” “http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”> <hibernate-configuration> <session-factory> <property name=”hibernate.archive.autodetection”>class,hbm</property> <property name=”hibernate.dialect”>org.hibernate.dialect.HSQLDialect</property> <property name=”hibernate.show_sql”>true</property> <property name=”hibernate.connection.driver_class”>org.hsqldb.jdbcDriver</property> <property name=”hibernate.connection.username”>sa</property> <property name=”hibernate.connection.password”>1</property> <property name=”hibernate.connection.url”>jdbc:hsqldb:mem:testdb</property> <property name=”hibernate.hbm2ddl.auto”>create</property> <mapping class=”de.gameduell.entity.User”

Cohesion, Coupling and Composition

Cohesion Cohesion indicates that the depth of the relation in between to sources or dependencies. This is not related to a practical coding, but a mentality that helps to write a better maintainable code. High Cohesion means clear separation of concerns, low cohesion is the reverse. To provide high cohesion in an application, we shall separate

IS-A and HAS-A Relationships

IS-A Relationship in OOP this sort of relationship refers to inheritance, both class and interface types. In the hierarchy tree, traversing up to determine whether the relation corresponds to IS-A. Assume the situation simply; Class A implements Interface B, then we can say Class A IS-A Interface B, this is to traverse up, and the reverse

The strictfp keyword in java

Today while I was preparing for OCP, I’ve come to meet a new non access modifier keyword called strictfp. Simply the keyword Strictfp ensures that you retrieve the same results of the floating point calculations on every platform X86 or AMD64. in case of not utilizing the keyword strictfp, the JVM implementation you use will result in using extra precision where

JSF a closable div

In this sample I’ve achieved one of demanded tasks at work regarding a closable mobile app pane, when the site is visited on mobile devices This is a good example also to study how to pass and set values in the backbean. Because we know what JSF is more of action based although there are