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 …
Spring Framework 4.0 RC1 Released
Spring Framework 4.0 Release Candidate 1 is released by Spring IO this week. Earlier they have announced that Spring 4.0 is due to the release in October 2014. However, in the latest blog post they have indicated that it will be available by December 2014. The last addition of new features with this release candidate …
How to create a Spring Bean of an Inner class?
In this tutorial I will explain how to declare bean definition for the Inner classes in Spring XML configuration. When you are using inner class as spring beans, you have to specify the binary class name of that inner or nested class to instantiate as a bean. If you have a class ExampleType and it …
Register Spring Beans to BeanFactory using registerSingleton
Spring’s strength lies on its core framework’s Inversion Of Control (IOC) and how the beans are instantiated and managed by the IOC container. All the beans in the spring’s IOC containers are managed as the singleton beans by default for the efficient and good performance. As a good practice, you should never create instance for …
Polymorphic Association Mapping with Any Relationship in Hibernate
Polymorphic association, supported by Hibernate, is the solution of such mapping requirement as an instance of entity needs to be associated with one of multiple possible entities. This can be implemented with Any relationship. In this relationship, the table holding the relationship would have two columns for relationship management. One to identify the primary key …
Creating Managed Threads Using ManagedThreadFactory in Java EE 7 – Part 3
So far we have seen: In Part-1: Creating ManagedExecutorService to submit a single task or a list of tasks where each task would be an implementation of either Callable or Runnable interface. In Part-2: Creating ManagedScheduledExecutorService for scheduling tasks to run at a later time or to schedule repeating tasks. In this post, which will …
ManagedScheduledExecutorService for Implementing Concurrency Utilities in Java EE 7 – Part 2
In my previous post you saw how to use the concurrency utilities in Java EE 7 by using the ManagedExecutorService. In this post we will have a look at a variant of this i.e the ManagedScheduledExecutorService. ManagedScheduledExecutorService is used to schedule tasks to be executed in future by specifying the delay in terms of SECONDS, …