5 minutes with – Spring AOP

Another interesting feature in Spring Framework is the Aspect Oriented Programming (AOP). In my opinion this feature is very useful for adding some behaviours into the code without edit it inside, for example,  the method’s implementation.

In this article I’ll show you how integrate this feature inside a Spring Web Application.

Continue reading

Glassfish – Basic authentication

A good and simple way to apply an authentication system to our web application is to use a basic role authentication.

This could be quickly configurated inside an application server and every web app gets the protection. In this article I’ll describe the use of it inside glassfish using a servlet which return the orders only for authenticated users.

Continue reading

CDI – Injecting Beans

In this article I would like to introduce CDI. As you can find at official oracle web site “Contexts and Dependency Injection (CDI) for the Java EE platform is one of several Java EE 6 features that help to knit together the web tier and the transactional tier of the Java EE platform“.

Yes, that’s it! In my opinion this technology is as easy as poweful to use.

Continue reading

Java Annotation

The Annotations don’t come from Ejb but it’s undoubtedly the large use of it in Ejb (since version 3.0) inside the code.

Like hibernate and other framework, annotations are used to enrichment the code keeping separated the annotation from the core code. I like to think it as “Xml in code” because, sometimes, it really can substitute the xml configuration file.

Continue reading