5 minutes with – Spring Transaction Isolation Level

Understanding the isolation level of the database transaction is not so obvious as you might think. Let me lead you through the different isolation type in the way to find out the correct one to use in your next Dao application.

Continue reading “5 minutes with – Spring Transaction Isolation Level”

5 minutes with – Jersey Producers

Have you ever tried to have to produce a multiple rappresentation of the same resources? I’m speaking about produce a common json and xml and, also, custom rappresentation like text/html which is not very common for data exchanging.

In this article I’d like to show you how produce multiple response format of Jersey resources. The type of response format will depend from resource extension request.

Continue reading “5 minutes with – Jersey Producers”

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 “Glassfish – Basic authentication”

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 “CDI – Injecting Beans”

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 “Java Annotation”