Home » 2012 (page 29)

Yearly Archives: 2012

Java Coding Conventions considered harmful

There is an official Code Conventions for the Java Programming Language guide published on Oracle site. You would expect this 20+ pages document to be the most complete, comprehensive and authoritative source of good practices, hints and tips with regards to the Java language. But once you start to read it, disappointment followed by frustration and anger increases. I would ...

Read More »

Open Source Legal Blues: Do You Comply?

Understanding and Reducing Open Source License Risks In today’s business climate, using Open Source Software (OSS) components as part of the development of new products is imperative.  At the same time, the risks of using OSS improperly are enormous. OSS usage introduces legal, business and technical risks. Legally, failure to comply with OSS licensing requirements may result in penalties and ...

Read More »

Spring Constructor Injection and Argument names

spring-interview-questions-answers

At runtime, java classes do not retain the name of the constructor or method parameters, unless classes are compiled with debug options on. This has some interesting implications for Spring Constructor Injection. Consider the following simple class         package dbg; public class Person { private final String first; private final String last; private final Address address; public ...

Read More »

Grails: Autodiscovery of JPA-annotated domain classes

There are some issues to be fixed with the support for adding JPA annotations (for example @Entity) to Groovy classes in grails-app/domain in 2.0. This is due to the changes made to adding most GORM methods to the domain class bytecode with AST transformations instead of adding them to the metaclass at runtime with metaprogramming. There is a workaround – ...

Read More »

Github Gists in Eclipse

I’d like to describe simple steps regarding integrating GitHub Gists in Eclipse. There are several sources which provoke me to do this: GitHub Mylyn connector for Eclipse EGit/GitHub/User Guide http://eclipse.github.com I’ve been using Eclipse Java EE destibution, Mylyn plugin has been already installed there: 1. Install EGit plugin via Eclipse Marketplace: 2. Install GitHub Mylyn Connector via Eclipse Marketplace: 3. ...

Read More »

Rest using Jersey – Complete Tutorial with JAXB, Exception Handling and Client Program

java-interview-questions-answers

Recently I started working on a Restful web service project using Jersey API. There are some tutorials available online but I faced some issues with exception handling and I didn’t found anywhere complete project using JaxB and providing exception handling approach. So once I was able to create a Restful web service using Jersey API with exception handling and client ...

Read More »

Java 7: File Filtering using NIO.2 – Part 1

NIO.2 is a new API for I/O operations included in the JDK since Java 7. With this new API, you can perform the same operations performed with java.io plus a lot of great functionalities such as: Accessing file metadata and watching for directory changes, among others. Obviously, the java.io package is not going to disappear because of backward compatibility, but ...

Read More »

Introduction To REST Concepts

Introduction This post aims at demystifying the REST (Representational State Transfert) web design concepts. REST is based on a client server model. REST is a set of principles describing how standards can be used to develop web applications, for example. Its main purpose is to anticipate on common implementation issues and organize the relationship between logical clients and servers. You ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns