Home » Enterprise Java » Page 50

Enterprise Java

Hibernate Many to Many Example

Many-to-Many mapping is usually implemented in the database using a Join Table. For example, we can have Cart and Item tables and Cart_Items table for many-to-many mapping. Every cart can have multiple items and every item can be part of multiple carts, so we have a many to many mapping here. In this tutorial, we will learn about how to ...

Read More »

Spring MVC 3.0 Tutorial

Spring MVC (Model-View-Controller) is the web component of Spring framework, which provides a great functionality for building web Applications. Following the basic tenet of Spring framework “convention over configuration“, the Spring MVC Framework is designed in such a way that every piece of logic and functionality is highly configurable. Spring is not tightly coupled with Servlet or JSP technology paradigms ...

Read More »

SNMP Walk Example using SNMP4J

This article is pretty straightforward. It’s an SNMP walk example using SNMP4J. SNMP is used in managing and monitoring network devices. It is an Internet standard protocol for managing devices on IP networks. 1. Tools and Prerequisites SNMP4J library Mars Eclipse 2. Create the Project You may skip this process because this is a fairly simple example which can be ...

Read More »

JDBC Best Practices Tutorial

Hello, in this tutorial we will learn some Java Database Connectivity (JDBC) best practices that Java programmer should follow while writing JDBC code. You can also check our Java Programming Database Tutorial in the following video: Java Programming Database Tutorial – Video JDBC API is used to connect and interact with the relational databases to perform CREATE, READ, UPDATE, DELETE ...

Read More »

Hibernate Example Code Using Annotations

Hibernate annotations is the powerful way to provide the metadata for the Object and Relational Table mapping. All the metadata is clubbed into the POJO Java file along with the code which helps the user to understand the table structure and POJO simultaneously during the development. In this tutorial, we will explain how to configure Hibernate annotations to define mapping ...

Read More »

Hibernate Example Directory Structure

In this tutorial, I will show you how to setup a Hibernate project with Eclipse. 1. Introduction Hibernate is an ORM (Object relational mapping) tool for java applications. ORM provides a technique for mapping a data representation from object model to relational data model with an SQL (Structured Query Language) based database schema. Hibernate provides data retrieval facilities, the data query, ...

Read More »

Hibernate JNDI Example

A database connection is expensive to make, yet all web applications use it. That is why most of the servlet containers provide built-in support for connection pooling. We can leverage this connection pooling in any webserver by registering the datasource via the JNDI context. In this tutorial, we will explain how to configure a datasource in Tomcat and how to ...

Read More »

Hibernate Mapping Types Example

Hello, in this tutorial we will see the different mapping types that are available in Hibernate. 1. Introduction Hibernate is a framework that simplifies the development of Java application to interact with the database. It is an open source, lightweight, ORM (Object Relational Mapping) tool.         1.1 What is Hibernate? Hibernate is the Opensource light weight ORM ...

Read More »

Spring Autowiring Tutorial

One of the main tenets of the Spring framework is Dependency Injection (DI). The framework implements DI by using @Autowired annotations. These annotations were introduced starting with Spring 2.5. By using this annotation, one can leave a lot of configuration overheads and leave the handling of injection of beans to Spring. Table Of Contents 1. Introduction 2. Setup Maven Project ...

Read More »

Spring Integration Chain Example

1. Introduction Spring Integration provides a way to group set of elements into one transaction and its referred as chaining. In this post we will look at MessageHandlerChain that is an implementation of MessageHandler and it can be configured as a single message endpoint while actually delegating to a chain of handlers like Filters,Transformers etc. Though the handler chain allows ...

Read More »