In my previous posts I have explained about writing simple quartz scheduler and how to list jobs. This tutorial explains how to write a listener for the scheduler. In certain scenarios, we have to execute few lines of code or log messages before and after the batch process. The listeners are very useful for achieving …
How to Get List of Jobs in Quartz Scheduler?
In my previous article I have explained about how to write a simple quartz scheduler. In some cases, you would like to get the list of Jobs running on the scheduler. It is obvious that there will be multiple batch process configured in a large applications. If you could get the list of jobs and …
Quartz Scheduler Tutorial
Schedulers are important for running the batch process in your application. There are plenty of Java scheduler frameworks available in the market. Among them, Quartz Scheduler is the most popular and most widely used by Java projects. This tutorial provides very simple example to write Quartz scheduler. When you complete reading this tutorial, you will …
How to Check Hidden File in Java?
If you want to check if a file is hidden or not. Then use the below code snippet. The method isHidden() in the File class is used for checking if the file is hidden or not. This is simple utility which is useful when you are working with the File operations.
Convert String to Date using SimpleDateFormat
Many developers find it hard for understanding the conversion of plain string to the Date object with the desired format. This is a very basic requirement in any Java application. This tutorial provides few basic formats examples using the SimpleDateFormat class. Also there is plenty of formats available and supported by JDK, you can try …
Create Spring Beans using Factory Methods
The advantage of using the spring framework is the efficient beans management by the IOC container. We never create an instance in the code instead spring creates and manages them. In the certain scenarios, the demand is to use the factory methods for creating the instances of an particular object due to the restriction imposed …
Bean Validation 1.1 in Java EE 7 – Using Default Constraints
Bean Validation 1.1 (JSR 349) is integrated as part of Java EE 7. The new features of Bean Validation 1.1 are as follows: Applying constraints on method parameters and return values. This can be used in creating a pre and post condition contract. Constraints can be applied to constructors. New API to obtain metadata of …
Use Trang to Generate XSD from XML File
XML schema used for defining the restriction on XML data structure. It is adding the highly validated data structure and useful for defining the types for the data in XML files. In a normal practice, first a developer creates a XSD (schema) with validations or enforcement for the XML structure, later all the XML files …