Java version of services used by applications. Trying to rewrite my php services