| Ko

Understanding JPA Persistence Context

Concept and History of Persistence Context The Persistence Context is an environment for permanently storing entities. It’s a core JPA concept that manages entity lifecycles between the application and database while providing various optimization features. This concept was first introduced under the name “Session” when Gavin King developed Hibernate in 2001. Hibernate’s Session abstracted database connections, tracked entity object states, and provided a consistent data view within transactions. When JPA 1.0 standardized Hibernate in 2006, this concept was reformulated as Persistence Context and EntityManager. ...

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

Dirty Checking in JPA

Concept and History of Dirty Checking Dirty Checking is one of Hibernate’s core features that automatically detects changes to entities managed by the persistence context and reflects them in the database. This concept was introduced as a core implementation of Transparent Persistence when Gavin King first developed Hibernate in 2001. It was designed so that the database would automatically update just by changing an object’s state, without developers writing explicit UPDATE statements. ...

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

Understanding JPA Entity Lifecycle

What is Entity Lifecycle In JPA (Java Persistence API), the entity lifecycle refers to the series of state changes an entity object goes through from creation to destruction. This concept was first defined in the JPA 1.0 specification released with Java EE 5 in 2006, designed around the persistence context that standardized Hibernate’s Session concept. Entities are classified into four states based on whether they are managed by the persistence context and their synchronization status with the database: Transient, Managed, Detached, and Removed. Each state transitions through EntityManager methods such as persist(), merge(), detach(), and remove(). ...

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

JPA EntityManager

History and Concept of EntityManager EntityManager is the core interface of 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 when developing Hibernate was an innovative approach that abstracted database connections and tracked entity object states. 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 · 1530 words · In-Jun

Spring MVC Dispatcher Servlet

What is the Dispatcher Servlet? The Dispatcher Servlet is the core component of Spring MVC that implements the Front Controller pattern. It receives all HTTP requests from clients at a single entry point, delegates them to the appropriate controllers, and renders the results returned by controllers into views for responses. Only one Dispatcher Servlet exists in a web application. It handles all requests centrally, enabling efficient management of common logic and allowing developers to focus on business logic. ...

June 5, 2024 · 9 min · 1727 words · In-Jun

Spring Interceptor

Concept and History of Spring Interceptor 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 · 1268 words · In-Jun

Servlet Filter

Concept and History of Servlet Filter Servlet Filter is a Java component first introduced in the Servlet 2.3 specification released in 2001. It intercepts HTTP requests before servlets process them and responses before they are sent to clients, enabling preprocessing and postprocessing operations. The introduction of this feature enabled developers to implement cross-cutting concerns such as authentication, logging, character encoding, and data compression in a reusable manner, separate from business logic. Filters are based on the Chain of Responsibility design pattern, allowing multiple filters to be connected in a chain and executed sequentially. ...

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

Spring Boot Development Best Practices

History and Background of Layered Architecture Layered Architecture is a design pattern established in 1990s enterprise application development to realize the Separation of Concerns principle. It was systematized in Martin Fowler’s “Patterns of Enterprise Application Architecture” (2002). The traditional 3-layer architecture consists of Presentation Layer, Business Logic Layer, and Data Access Layer. Spring Framework has made this structure easily implementable through @Controller, @Service, and @Repository annotations, becoming the de facto standard for Java enterprise development. ...

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

Getting Started with Spring Boot

History and Background of Spring Framework Spring Framework is a Java-based enterprise application framework first released in 2003, based on ideas Rod Johnson presented in his 2002 book “Expert One-on-One J2EE Design and Development.” It emerged as an alternative to the complex and heavyweight EJB (Enterprise JavaBeans) 2.x at the time, proposing a lightweight development approach based on POJOs (Plain Old Java Objects). EJB 2.x was tightly coupled to containers, making unit testing difficult, required extensive XML configuration, and had low development productivity. Spring addressed these issues by making IoC (Inversion of Control) and DI (Dependency Injection) its core concepts, reducing coupling between objects and improving testability. ...

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

Introduction to Java Programming

Java is an object-oriented programming language developed 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 programming languages in the TIOBE index, making it one of the most widely used programming languages in the world. It serves as a core language in various fields including enterprise applications, Android apps, big data processing, and web services. Java continues to evolve based on its strong type system, rich standard library, and active community. ...

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