Java Restful service Practice