SPRING CORE / CATATAN</>↗Spring Core23 Jun 2025
In the Spring Framework, dependency injection is a design pattern used to implement inversion of control (IoC). There are two main ways to inject dependencies into a Spring bean: constructor injection and setter injection. Below is an explanation of both, along with when and how to use them. Constructor Injection With constructor injection, dependencies are […]
SPRING CORE / CATATAN</>↗Spring Core22 Jun 2025
To define an application context in Spring using ClassPathXmlApplicationContext or AnnotationConfigApplicationContext, you establish the context for your Spring-managed beans using XML configuration in the former, and Java-based annotations in the latter. Here’s how each can be used: 1. Using ClassPathXmlApplicationContext This approach loads the application context configuration from an XML file. Example: package org.kodejava.spring; import […]
JPOS / CATATAN</>↗jPOS21 Jun 2025
To parse an ISO 8583 response using jPOS, you essentially need to unpack the received message, iterate through its fields, and retrieve the values. The example in your related content includes the relevant steps, but here are the focused details for parsing a response: Steps to Parse an ISO 8583 Response: Receive the Response: Use […]
JPOS / CATATAN</>↗jPOS20 Jun 2025
To send a simple ISO 8583 message using jPOS, follow these steps: 1. Initialize the Packager and Create the Message The Packager defines the message’s structure based on the ISO 8583 standards you are following (e.g., ISO87APackager for ISO 8583:1987). Here’s how to send a basic ISO 8583 request: package org.kodejava.jpos; import org.jpos.iso.*; import org.jpos.iso.channel.ASCIIChannel; […]
HIBERNATE / CATATAN</>↗Hibernate19 Jun 2025
In Hibernate, detached objects are objects that were previously associated with a Hibernate Session, but that Session has since been closed, leaving the object in a detached state. Detached objects are not currently managed by any Session, so they are not automatically synchronized with the database. If you want to reattach these objects to a […]
HIBERNATE / CATATAN</>↗Hibernate18 Jun 2025
Batch inserting or updating data efficiently with Hibernate can significantly improve performance, especially when dealing with large datasets. Below are best practices and steps to achieve this: 1. Enable Hibernate Batch Processing Configure Hibernate for batch processing by setting the hibernate.jdbc.batch_size property in your Hibernate configuration: hibernate.jdbc.batch_size=20 This specifies the number of SQL statements to […]