| Ko

Understanding JPA Persistence Context

Concept and History of Persistence Context The persistence context is the scope in which JPA manages entity instances. It is a core JPA concept that manages entity lifecycles between the application and the database while also providing several optimization features. This idea first appeared as Hibernate’s Session, introduced by Gavin King in 2001. Hibernate’s Session abstracted database access, tracked entity state, and maintained a consistent view of data within a transaction. When JPA 1.0 was introduced in 2006, the concept was standardized as the persistence context and EntityManager. ...

June 8, 2024 · 6 min · 1259 words · In-Jun

JPA Dirty Checking

Concept and History of Dirty Checking Dirty Checking is one of Hibernate’s core features. It automatically detects changes to entities managed by the persistence context and reflects those changes in the database. Gavin King introduced this mechanism when he first developed Hibernate in 2001 as part of the framework’s Transparent Persistence model. The goal was simple: let developers update the database by changing an object’s state, without writing explicit UPDATE statements. ...

June 8, 2024 · 7 min · 1436 words · In-Jun

Understanding JPA Entity Lifecycle

What the Entity Lifecycle Is In JPA (Java Persistence API), the entity lifecycle describes the state changes an entity object goes through from creation to deletion. The concept was defined in the JPA 1.0 specification released with Java EE 5 in 2006, built around the persistence context and influenced by Hibernate’s Session model. Entities are classified into four states based on whether the persistence context manages them and how they are synchronized with the database: Transient, Managed, Detached, and Removed. They move between these states through EntityManager methods such as persist(), merge(), detach(), and remove(). ...

June 8, 2024 · 9 min · 1828 words · In-Jun

JPA EntityManager

History and Concept of EntityManager EntityManager is the core interface of the Java Persistence API (JPA), first defined in the EJB 3.0 specification released as part of JSR 220 in 2006. It was designed to standardize Hibernate’s Session interface and provide a vendor-independent persistence management API. The Session concept, introduced by Gavin King in 2001 during Hibernate’s development, was an innovative approach that abstracted database connections and tracked entity state. JPA standardized this idea, reformulated it as EntityManager, and enabled the same interface to be used across all JPA implementations (Hibernate, EclipseLink, OpenJPA). ...

June 7, 2024 · 8 min · 1574 words · In-Jun

Spring MVC DispatcherServlet

What Is DispatcherServlet? DispatcherServlet is the core component of Spring MVC that implements the Front Controller pattern. It receives HTTP requests at a single entry point, delegates them to the appropriate controllers, and renders the results into views for the response. This centralizes common logic and lets developers focus on business logic. History and Evolution of DispatcherServlet Spring MVC emerged in 2004 with Spring Framework 1.0, establishing itself as a web framework with DispatcherServlet implementing the Front Controller pattern as an alternative to the complex servlet development approach of J2EE at that time. Initially, servlets were registered and mapped through XML-based configuration. Since Servlet 3.0 and above, Java configuration became possible through WebApplicationInitializer. With the advent of Spring Boot, auto-configuration was introduced, allowing developers to use it immediately without separate configuration. ...

June 5, 2024 · 8 min · 1646 words · In-Jun

Spring Interceptor

Spring Interceptor Basics and History Spring Interceptor is a feature first introduced in Spring Framework 2.0 in 2006. It is a mechanism that intervenes at key points—before and after controller execution and after view rendering completion—in the MVC architecture to perform common functions. Through the three methods of the HandlerInterceptor interface (preHandle, postHandle, and afterCompletion), it handles request preprocessing and postprocessing. The design separates cross-cutting concerns such as authentication, logging, execution time measurement, and common data setup from business logic. ...

June 4, 2024 · 6 min · 1250 words · In-Jun

Servlet Filter

Servlet Filter Basics and History A servlet filter is a Java component introduced in the Servlet 2.3 specification in 2001. It intercepts HTTP requests before servlets handle them and responses before they are returned to clients, making it useful for preprocessing and postprocessing tasks. This makes it easier to implement cross-cutting concerns such as authentication, logging, character encoding, and data compression in a reusable way separate from business logic. Filters are based on the Chain of Responsibility design pattern, so multiple filters can be linked together and executed in sequence. ...

June 4, 2024 · 6 min · 1116 words · In-Jun

Spring Boot Development Best Practices

History and Background of Layered Architecture Layered architecture is a design pattern that emerged in 1990s enterprise application development to support the principle of separation of concerns. It was later systematized in Martin Fowler’s “Patterns of Enterprise Application Architecture” (2002). The traditional three-layer architecture consists of the presentation layer, business logic layer, and data access layer. Spring Framework made this structure easy to implement through @Controller, @Service, and @Repository annotations, and it became the de facto standard for Java enterprise development. ...

May 25, 2024 · 6 min · 1237 words · In-Jun

Getting Started with Spring Boot

History and Background of Spring Framework Spring Framework is a Java-based enterprise application framework that first appeared in 2003. Its core ideas were introduced earlier by Rod Johnson in his 2002 book “Expert One-on-One J2EE Design and Development.” Spring emerged as an alternative to the complex and heavyweight EJB (Enterprise JavaBeans) 2.x model of the time, promoting a lighter approach built on POJOs (Plain Old Java Objects). EJB 2.x was tightly coupled to application containers, made unit testing difficult, and relied heavily on XML configuration. Spring addressed those problems by making IoC (Inversion of Control) and DI (Dependency Injection) its central concepts, which reduced coupling and improved testability. ...

May 16, 2024 · 6 min · 1213 words · In-Jun

Introduction to Java Programming

Java is an object-oriented programming language created in 1995 at Sun Microsystems by a team led by James Gosling. Under the slogan “Write Once, Run Anywhere,” it provides a platform-independent execution environment. As of 2024, Java consistently ranks among the top languages in the TIOBE index, making it one of the most widely used programming languages in the world. It remains a core language in fields such as enterprise applications, Android apps, big data processing, and web services. Java continues to evolve through its strong type system, rich standard library, and active community. ...

May 16, 2024 · 11 min · 2214 words · In-Jun
[email protected]