Have you tried configuring the JNDI variables with Tomcat server?. This tutorial is going to explain you step-by-step procedure on how to configure JNDI variables in your tomcat server. It is very simple configuration in the Tomcat server’s configuration XML file. Open the Tomcat server’s context.xml file. The same change can be done using the …
Maven : updatePolicy Configuration in Settings XML file
One of the most common thing when working with dependency management is how often our local repository has to sync up with the remote repository. Maven has updatePolicy settings for specifying the frequency to check the updates in the repository. Most of the times this value is left blank in the configuration files, the default value is …
How To Use Source and Target Parameter in Java Compiler
If you are a Java programmer, then one of the common question comes into mind is How do I compile for compatibility with older versions of Java?. When you run your Java program with an older version of the Java runtime environment, you may get the following Java exception if you have not compiled with the right version of …
JVM Memory Management
Introduction to Java Memory Management In this article I am going to explain more about the JVM memory management inside Java Virtual Machine (JVM). If you are a Java developer, understanding the Java memory management inside JVM will be much helpful on investigating performance issues related to memory leak, garbage collection, etc. which are critical …
Java Exceptions Tutorial
In this tutorial I am going to explain Java exceptions in details and how to use them in the real applications. One of the important measure to assess the quality of your Java code is to review the exception handling and how exceptions scenarios are handled. If you have to write an efficient exception handling, …
Difference Between Java Singleton and Spring Singleton
One of the common misunderstanding among Spring Framework developers is the difference between Spring Singleton and Java Singleton. Interestingly this turns out to be one of the popular interview questions for spring developers to check the understanding of singleton concepts. If you are working on Java and Spring technologies, it is quite important to know …
Using @NamedQuery in Spring Data JPA
In my previous article I have explained about how to use @Query annotation for writing the custom queries for Spring Data JPA applications. In this post, I will explain another type of writing the custom queries using @NamedQuery annotation that is part of the JPA specification. What is NamedQuery? There are two types of queries …
@Query Annotation in Spring Data JPA
In my previous post on Spring Data, I have explained the basic concepts and configurations for Spring Data JPA. In this tutorial, I am going to explain @Query annotation and how to create custom query using the @Query annotation. The greatest advantage of using Spring Data is that it implements the repositories at run time …