Chain Of Responsibility Pattern In Java

java-thumbnail

Chain Of Responsibility Pattern Overview: A method called in one class will move up a class hierarchy until a method is found that can properly handle the call.It consists of a source of command objects and a series of processing objects.Each processing object contains a set of logic that describes the types of command objects […]

EJB 3.0 and WebServices

java-ee-thumbnail

This article discusses how an enterprise bean can act as a Web-Service component. Since Web-Services itself is a vast technology, the first part of the article discusses more about Web-Services. Specifically, the first part of the article discusses what Web-Services are, its unique features among other related technologies, its architecture, and the various base components […]

Comparing Objects in Java

java-thumbnail

Comparing Objects in Java In Java comparing two value object is not straight forward. Here we will see how we can compare two value objects in Java. For that first we will create a value object called “MyValueObject”. This value object contains two properties. firstName lastName. Both the properties are of type string. also read: […]

How to use datasource in Hibernate application?

wildfly-thumbnail

This article explains how to configure datasource in the JBoss application server and how to use the same datasource in the hibernate configuration file.Before looking into the hibernate configuration, we will start with creating datasource inside JBoss application server. also read: WebLogic Interview Questions JBoss Portal Server Development Tomcat Interview Questions Create MySql datasource in […]

Hibernate Criteria Query API / HQL Example

hibernate-thumbnail

Hibernate Criteria Example Criteria APIs in the hibernate framework is useful for creating the dynamic query to execute.It is an alternative way to write the queries without using HQL. The queries are generated at runtime and excuted on the fly. Application developer need not worry about writing the query in hand, he/she just need to […]

Types of Managed Bean scopes in Spring Framework

spring-thumbnail

This article presents the different scopes on Spring managed beans. This is one of the greatest advantage using spring’s managed beans. Every bean definition can be declared with different scopes. If you are the beginner learning the Spring Framework first time, please read our introduction articles on the Spring Framework : also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions […]

How to lazy initialize Spring beans?

spring-thumbnail

Lazy Initiation in Spring IOC As we know Spring’s bean factory is pre-initiate all the beans when first time creating the factory. This is good practice because if there is any dependency error everything can be resolved at the time of start up. This is not case in all the application scenarios. The following are the few drawbacks […]

Inner beans in Spring IOC

spring-thumbnail

Inner beans Spring IOC allows Inner Beans declaration. We can declare a bean inside a beans. But, it has few restriction. Inner Beans are like annonymous beans where it is created and used on the fly. this beans cannot be used outside the enclosing beans. So, it is wise to avoid declaring the ‘ID‘ or […]

Setter Injection in Spring IOC

spring-thumbnail

Setter Injection This article presents how to write the Setter Injection in Spring IOC. There are two types of Dependency Injection(DI) techniques we can use. 1) Setter Injection and 2) Constructor Injection. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions As the name implies, using setter methods in a bean class the Spring […]

Constructor Injection in Spring IOC

spring-thumbnail

Constructor Injection This article presents how to write the Constructor Injection in Spring IOC. There is two types of Dependency Injection(DI) techniques we can use. 1) Setter Injection and 2) Constructor Injection. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions As the name implies, using constructor the Spring IOC container will inject the […]