Home » Author Archives: Siva Reddy (page 2)

Author Archives: Siva Reddy

Katamreddy Siva Prasad is a Senior Software Engineer working in E-Commerce domain. His areas of interest include Object Oriented Design, SOLID Design principles, RESTful WebServices and OpenSource softwares including Spring, MyBatis and Jenkins.

MyBatis Tutorial – CRUD Operations and Mapping Relationships – Part 1

mybatis-logo

CRUD Operations MyBatis is an SQL Mapper tool which greatly simplifies the database programing when compared to using JDBC directly.                   Step1: Create a Maven project and configure MyBatis dependencies.   <project xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd'> <modelVersion>4.0.0</modelVersion> <groupId>com.sivalabs</groupId> <artifactId>mybatis-demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>mybatis-demo</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> ...

Read More »

Spring3 + JPA2 + Java EE6 App Server = Confusion Over Configuration

java-logo

Spring is great, JavaEE6 is great and latest JavaEE6 Application servers are also great. This post is not a rant on Spring Vs JavaEE6, but my experience of porting a Spring3+JPA2(Hibernate) application on JBoss AS-7.1 App Server. My application requirement is very simple: Developing a couple of SOAP based webservices using Spring3.1 and JPA2(Hibernate) and host it on JBoss AS ...

Read More »

Keep The Code Clean: WatchDog & SpotTheBug Approach

software-development-2-logo

Before going to discuss ‘ WatchDog & SpotTheBug Approach‘, let me give a brief context on what is the needs for this. Three months back I was asked to write core infrastructure code for our new application which uses all the latest and greatest technologies. I have written the infrastructure code and implemented 2 usecases to demonstrate which logic should ...

Read More »

How I explained Dependency Injection to My Team

java-interview-questions-answers

Recently our company started developing a new java based web application and after some evaluation process we decided to use Spring. But many of the team members are not aware of Spring and Dependency Injection principles. So I was asked to give a crash course on what is Dependency Injection and basics on Spring. Instead of telling all the theory ...

Read More »

RESTEasy Tutorial Part-3: Exception Handling

jboss-resteasy-logo

Exception Handling is an obvious requirement while developing software application. If any error occured while processing user request we should show the user an error page with details like brief exception message, error code(optional), hints to correct the input and retry(optional) and actual root cause(optional). This is applicable to RESTful web services also. But putting try-catch-finally blocks all around the ...

Read More »

RESTEasy Tutorial Part-1: Basics

jboss-resteasy-logo

RESTEasy is a JAX-RS implementation from JBoss/RedHat and is in-built in JBoss 6 onwards. Here I am going to show you how to develop a Simple RESTful Web Services application using RESTEasy and JBossAS7.1.1.FINAL.                 Step#1: Configure RESTEasy dependencies using Maven. <project xmlns='http:maven.apache.orgPOM4.0.0' xmlns:xsi='http:www.w3.org2001XMLSchema-instance' xsi:schemaLocation='http:maven.apache.orgPOM4.0.0 http:maven.apache.orgmaven-v4_0_0.xsd'> <modelVersion>4.0.0<modelVersion> <groupId>com.sivalabs<groupId> <artifactId>resteasy-demo<artifactId> <version>0.1<version> <packaging>war<packaging> <name>resteasy-demo Maven ...

Read More »

RESTEasy Tutorial Part-2: Spring Integration

jboss-resteasy-logo

RESTEasy provides support for Spring integration which enables us to expose Spring beans as RESTful WebServices.                     Step#1: Configure RESTEasy+Spring dependencies using Maven. <project xmlns='http:maven.apache.orgPOM4.0.0' xmlns:xsi='http:www.w3.org2001XMLSchema-instance' xsi:schemaLocation='http:maven.apache.orgPOM4.0.0 http:maven.apache.orgmaven-v4_0_0.xsd'> <modelVersion>4.0.0<modelVersion> <groupId>com.sivalabs<groupId> <artifactId>resteasy-demo<artifactId> <version>0.1<version> <packaging>war<packaging> <properties> <project.build.sourceEncoding>UTF-8<project.build.sourceEncoding> <org.springframework.version>3.1.0.RELEASE<org.springframework.version> <slf4j.version>1.6.1<slf4j.version> <java.version>1.6<java.version> <junit.version>4.8.2<junit.version> <resteasy.version>2.3.2.Final<resteasy.version> <properties> <build> <finalName>resteasy-demo<finalName> <build> <dependencies> <dependency> <groupId>junit<groupId> <artifactId>junit<artifactId> <scope>test<scope> <dependency> <dependency> ...

Read More »

What additional features does Java EE 6 have to move from Spring?

spring-interview-questions-answers

I am a senior java developer who has to work on the technologies chosen by the application architect. At the maximum I can express my opinion on a particular technology, I can’t make/influence technology selection decision. So I don’t have a choice of moving from Spring to JavaEE6 or from JavaEE6 to Spring on my official projects. I strongly believe ...

Read More »

Web Services with JAX-WS on Tomcat

apache-tomcat-logo

Let us assume an enterprise is maintaining user authentication details in a centralized system. We need to create an AuthenticationService which will take credentials, validate them and return the status. The rest of the applications will use the AuthenticationService to authenticate the Users. Create AuthenticationService interface as follows: package com.sivalabs.caas.services; import javax.jws.WebService; import com.sivalabs.caas.domain.AuthenticationStatus; import com.sivalabs.caas.domain.Credentials; import com.sivalabs.caas.exceptions.AuthenticationServiceException; @WebService public ...

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