Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

JDBC / CATATAN</>
JDBC12 Feb 2026

How do I configure C3P0 connection pool in JDBC?

To configure c3p0 as a JDBC connection pool, you typically: create a DataSource (usually ComboPooledDataSource) tune pool parameters (min/max pool size, idle time, timeouts, statement cache) use the DataSource everywhere instead of DriverManager.getConnection(…) close Connection/Statement/ResultSet normally (c3p0 returns connections to the pool on close()) Below are the common ways to do it. 1) Programmatic configuration […]

Wayan · 4 menit baca
JDBC / CATATAN</>
JDBC12 Feb 2026

How to Configure Apache DBCP Connection Pool in JDBC?

To configure an Apache DBCP connection pool for “plain” JDBC, you typically create a pooled DataSource once at startup, then get connections from it (and always close them to return to the pool). Below are the two most common approaches. 1) Recommended (DBCP2): BasicDataSource (simplest) Create and configure the pool package org.kodejava.jdbc; import org.apache.commons.dbcp2.BasicDataSource; import […]

Wayan · 3 menit baca
JDBC / CATATAN</>
JDBC11 Feb 2026

How do I use connection pooling in JDBC with HikariCP?

To use connection pooling in plain JDBC with HikariCP, the main shift is: stop using DriverManager.getConnection(…) everywhere create one DataSource (the pool) at startup whenever you need a DB connection, call dataSource.getConnection() always close resources with try-with-resources (closing returns the connection to the pool, it does not kill the physical connection) 1) Create a pooled […]

Wayan · 3 menit baca
JDBC / CATATAN</>
JDBC20 Jan 2026

How do I use savepoints in JDBC transactions?

Savepoints in JDBC provide fine-grained control over transactions by allowing you to roll back to a specific point within a transaction rather than undoing everything. This is particularly useful for handling optional operations or partial failures. Key Steps to Use Savepoints Disable Auto-commit: Savepoints only work within a manual transaction. Set a Savepoint: Use connection.setSavepoint() […]

Wayan · 3 menit baca
JDBC / CATATAN</>
JDBC19 Jan 2026

How do I use transactions in JDBC?

Using transactions in JDBC is essential when you need to ensure that a group of SQL statements either all succeed or all fail together (maintaining Atomicity). By default, a JDBC Connection is in auto-commit mode, meaning every single SQL statement is treated as its own transaction and committed immediately. To manage transactions manually, follow these […]

Wayan · 2 menit baca
JDBC / CATATAN</>
JDBC19 Jan 2026

How do I set fetch size for large queries?

To set the fetch size for large queries in Java using JDBC, you use the setFetchSize(int rows) method on a Statement or PreparedStatement object. This gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. This is particularly useful for large […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.