Marketplace for Content, Tests and Assessment
 
 

Archive

Posts Tagged ‘spring’

Spring Certification in India

February 4th, 2010 smitha No comments

    Spring framework is very popular and need of spring knowledge among the IT industry is raising. But I found that getting a spring certification is not very easy.  To get the spring certification voucher you have to take spring training from spring source, which are available in few major cities of India or you have to have a prior work experience in spring. 

 You can find spring training locations here…

Read more…

Getting started with Spring TC server

January 28th, 2010 Vinay 2 comments

As promised in last post Good bye MyEclipse. Welcome STS -Spring source Tool Suite, I would be going into the details of Spring TC server development edition and its integration with Spring Source tool suite (STS).

Spring launched the Spring source tc server which is a layer of functional ties and capabilities over the famous Apache Tomcat server. From Spring source site

SpringSource tc Server™ is an enterprise version of Apache Tomcat that provides developers with the lightweight server they want paired with the operational management, advanced diagnostics, and mission-critical support capabilities businesses need.

More details on Spring TC server can be found  SpringSource tc Server — The Tomcat You Know

I decide to give the Spring TC server a shot. I downloaded tc Server Developer Edition(Free) edition (you will have to fill in details and then you get a link in email)

Read more…

Spring adds JSON support

January 27th, 2010 Vinay No comments

We had posted a tutorial example on JSON  Java script sometimes back. It became a pretty popular post and people gave good feedback about it.  Some how the post got deleted and with it all the user’s comment. We apologize to our users. Here is the post JSON JavaScript Tutorial.   JSON is really cool and gives a lot of power in hands of developer.

Spring 3.0 which has come up with a lot of simplification like asynchronous method invocation , have also simplified AJAX calls.  You can now now invoke server side code with JSON and Spring 3 provide support for that. Details on it can be read from Spring Source blog AJAX Simplification in Spring 3

PS: Last time I checked out the spring blog,  the above url was pointing to wrong post. They might have fixed it by now

Good bye MyEclipse. Welcome STS -Spring source Tool Suite

January 22nd, 2010 Vinay 3 comments

I had been using myEclipse for couple of years and was happy with features and convenience they provided especially the hot deploy feature. The license fees is $30 per year which wasn’t bad.

Recently I downloaded MyEclipse7 which had some new features and like advanced java script tooling, JSF views and enhancements.  It was a huge file and after installation when you start myeclipse, it takes a good amount of time to fire up.

I have a machine which is pretty good with 2GB of RAM and this was not the kind of sluggish performance which I expected. I am assuming the high boot up time is that they have introduced many new features and capabilities, UML upgrades . Now even if you are not using them , it takes time to load them up all the libraries. Perhaps they should have allowed the users to customize the options based on need instead of pushing everything in their face. Read more…

Asynchronous method invocation in Spring 3.0

January 13th, 2010 Vinay 5 comments

Spring 3.0  has added  annotation support for both task scheduling and asynchronous method execution.  We will discuss @Async annotation and its uses.

The @Async annotation

The @Async annotation allows invocation of that method to occur asynchronously. In other words, the caller will return immediately upon invocation.

One of the use cases of @Async function can be in situations where in user registers and system has to send confirmation mail or any similar task where you do not want to block user.

We will look at the  example below to explain it more clearly . Since for most of you this will be first Spring 3.0 application, please notice the changes in applicationContext.xml. Read more…

Difference between @Service and @Component in Spring

January 12th, 2010 Vinay No comments

Spring 2.5 has introduced 3 stereotype annotations: @Component, @Service and @Controller.

The most widely used are @Component and @Service and let us find what is the difference between them.

They both belong to org.springframework.stereotype.Service

When annotating your class with @Component   you mark it as a regular java component class Read more…

Categories: Programming / tutorials Tags:

Aspect Oriented Programming(AOP) with Spring

December 16th, 2009 Vinay 7 comments

Aspects Oriented programming(AOP) is another way of programming in Spring. Instead of Object oriented programming, in which the key unit is class , in AOP the key unit is aspect.

AOP framework is part of the Spring and comes bundled with it. No additional installation is required. Spring AOP is implemented in pure Java and can be used in a web container or enterprise server. Before we move ahead with an example , let us look at some terminologies which we will be using in this application

  • Aspect: a modularization of a concern that cuts across multiple classes. Transaction management is a good example of a crosscutting concern in Java EE applications.
  • Join point: a point during the execution of a program, such as the execution of a method or the handling of an exception. In Spring AOP, a join point always represents a method execution.
  • Advice: action taken by an aspect at a particular join point. Different types of advice include “around,” “before” and “after” advice. (Advice types are discussed below.) Many AOP frameworks, including Spring, model an advice as an interceptor, maintaining a chain of interceptors around the join point.
  • Pointcut: a predicate that matches join points. Advice is associated with a pointcut expression and runs at any join point matched by the pointcut (for example, the execution of a method with a certain name). The concept of join points as matched by pointcut expressions is central to AOP, and Spring uses the AspectJ pointcut expression language by default. Read more…

Categories: Programming / tutorials Tags: ,

Spring JDBC Tutorial

October 19th, 2009 smitha No comments

Using Spring with JDBC is not a very common usage I have seen but sometimes you have applications with very few tables and simple CRUD operation and you do not need full fledged ORM framework like hibernate .

JDBC API provides connectivity between the database and java program. It provides support for wide range of databases from complex SQL – Based databases to tabular data sources like spread sheets.  With JDBC – enabled driver one can connect to database and run the queries, fetch data etc in a java program.

JDBC API is widely used to access db in java applications. Often hibernate and JDBC gets compared and Hibernate looks better than JDBC API. But Hibernate it has a big learning curve. People who are aware of JDBC sometime want their projects to be completed fast and might not want to switch to ORM.  In this case one can use JDBC with Spring. Read more…

Categories: Programming / tutorials Tags: ,

Spring JPA Tutorial – Get Hands on Experience

October 4th, 2009 smitha 2 comments

Following we demonstrate you how a simple user contact information is saved using Spring and JPA. We use Hibernate as JPA provider.

Spring is a container which supports multiple frameworks and multiple services. Spring wraps the services and the frameworks together.

Spring’s Basic concept: Inversion of Control

The basic concept of spring is the Inversion of Control pattern (dependency injection). In Spring, programmers don’t need to create user objects but they need to describe how they should be created (in applicationContext.xml or using annotations). Programmers need not directly connect components and services together in code but describe which services are needed by which components in a configuration file or using annotations. The spring container is responsible for all this. Spring creates all the objects, connects them together by setting the necessary properties, and determines when methods will be invoked.

Read more…

Spring Transaction Management – Mock Test

September 14th, 2009 Vinay No comments

A mock test on  Spring Transaction Mock test has been added to skill-guru.  This will test your understanding about Spring transaction management. Some questions are based on code samples and some are based on on Spring documentation

This test in addition to Spring technical test / Spring Interview questions

This test will also help in Spring Certification exams

Creating dynamic html mail with java and web application

September 9th, 2009 smitha No comments

In many applications there are some common requirements of sending html formatted mails to the clients. Java mail API is used to send mails in java. But major problem is how to get dynamic formatted mail content.  The Java Mail API’s send mail function takes string parameter. So it is developer’s responsibility to send formatted mail content as string to the function.

If the mail content is static one can hard code the contents into a text file or as a variable. But what if we need different types of mail contents generated dynamically. I used xslt template files and XML for this. XSL stands for Extensible Stylesheet Language, and is a style sheet language for XML documents.  The page format is defined by the xslt sheet and the contents to it will be supplied by the xml. The XSLT page will define points which should be replaced by the xml tag values at runtime. Read more…

Categories: Programming / tutorials Tags: , ,

Interview with Rod Johnson – Founder & CEO of SpringSource

September 8th, 2009 Vinay No comments

Below is the interview of Founder & CEO of SpringSource Rod Johnson @sramanamitra.com

Interview with Rod Johnson

Categories: Tech news Tags:
Get Adobe Flash playerPlugin by wpburn.com wordpress themes