| Ko

JPA Lazy Loading vs Eager Loading Performance

History and Necessity of Loading Strategies ORM (Object-Relational Mapping) frameworks emerged to solve the impedance mismatch between object-oriented programming and relational databases. During this process, how to efficiently load entities with associations became a critical challenge. Early ORM implementations used immediate loading for all associated entities, which caused performance degradation by loading unnecessary data into memory. Hibernate introduced a proxy-based lazy loading mechanism to solve this problem. Hibernate has continuously improved loading strategies since its initial release in 2001. While early versions only supported simple lazy loading, later versions added various optimization techniques such as fetch join, batch fetching, and subselect fetching. These features were included in the JPA (Java Persistence API) 1.0 standard when it was released in 2006. Through JPA 2.0 (2009) and JPA 2.1 (2013), declarative fetch strategies like @EntityGraph were added, enabling more sophisticated control over associated entity loading. Today, the JPA standard and Hibernate implementation continue to evolve together, providing developers with various options. ...

June 8, 2024 · 8 min · 1698 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 Data JPA vs JPA Key Differences

JPA’s Origins and History JPA (Java Persistence API) was first announced on May 11, 2006, through Java Community Process JSR 220 as part of the EJB 3.0 specification. It standardized Hibernate’s core concepts to address the complexity, heavy structure, and container dependency issues of existing EJB 2.x Entity Beans. EJB 2.x Entity Beans required writing Home Interface, Remote Interface, and Bean Class, along with managing complex XML descriptors, which significantly reduced development productivity and made testing difficult. ...

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

Namespaces and Cgroups in Docker

Linux container technology has steadily evolved since the first introduction of mount namespace in kernel 2.4.19 in 2002 to become a core foundation of modern cloud infrastructure, with Namespaces handling process isolation and Cgroups (Control Groups) handling resource control at its center. All container runtimes including Docker, Kubernetes, and Podman leverage these two kernel features to provide isolation environments that are much lighter and faster than virtual machines, and understanding them is the first step to deeply grasping container technology. ...

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

MVC Pattern

The Birth of the MVC Pattern and Historical Context The MVC pattern was first conceived in 1979 by Norwegian computer scientist Trygve Reenskaug while working on the Smalltalk-76 project at Xerox PARC (Palo Alto Research Center). This was part of a revolutionary effort to advance graphical user interfaces during the dawn of personal computing. Xerox PARC pioneered many modern computing concepts, including Ethernet, laser printers, and object-oriented programming. Reenskaug was exploring ways for users to effectively control and visualize complex data structures when he conceived the idea of separating data (Model), presentation (View), and control (Controller). ...

June 5, 2024 · 7 min · 1396 words · In-Jun

Understanding HTTP Status Codes

HTTP status codes are standardized three-digit numeric response codes that a server returns to indicate the result of processing a client’s request. These codes play a crucial role in all HTTP-based communications including web browsers, API clients, and search engines, clearly conveying whether requests succeeded, require redirection, or encountered client or server-side errors. In RESTful API design, selecting appropriate status codes is a key factor that significantly impacts API intuitiveness and developer experience. ...

June 5, 2024 · 18 min · 3673 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
[email protected]