Top Tweets for #databaseconnection
The most important Java practice that separates junior from senior code in production: Proper Exception Hierarchy
One of the clearest signs of mature, production-grade Java code is a well-designed exception hierarchy.
Recommended structure used by experienced teams:
BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, PaymentGatewayDown)
CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

One of the most important production Java practices: Proper Exception Hierarchy:
A well-designed exception hierarchy is one of the clearest signs of mature, production-grade Java code.
Recommended structure used by experienced teams:
BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds) TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, PaymentGatewayDown) CriticalException → for unrecoverable system errors Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

The most important production Java practice that separates good code from great code: Proper Exception Hierarchy
A well-designed exception hierarchy is one of the clearest signs of mature, production-grade Java code.
Recommended structure used by experienced teams:
- BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
- TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, - PaymentGatewayDown)
- CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

The most underrated yet critical Java pattern in production: Proper Exception Hierarchy & Strategy:
The most underrated yet critical Java pattern in production:
Proper Exception Hierarchy & StrategyMain body text (copy-paste ready)One of the clearest signs of mature, production-grade Java code is a well-designed exception hierarchy.
Recommended structure used by experienced teams in 2026:
BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, PaymentGatewayDown)
CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic - it makes debugging and monitoring much harder.
Realistic example below:

The most important Java practice that separates junior from senior code: Proper Exception Hierarchy
A well-designed exception hierarchy is one of the clearest signs of mature, production-grade Java code.Recommended structure used by experienced teams:
- BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
- TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, - - PaymentGatewayDown)
- CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

One of the most important production Java practices: Proper Exception Hierarchy & Strategy:
A well-designed exception hierarchy is one of the clearest signs of mature, production-grade Java code.
Recommended structure used by experienced teams:
- BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
- TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, PaymentGatewayDown)
- CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

One of the most important Java practices in production: Proper Exception Hierarchy:
A well-designed exception hierarchy is one of the clearest signs of mature, production-grade Java code.
Recommended structure used by experienced teams:
- BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
- TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, - PaymentGatewayDown)
- CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

The most important Java practice that separates junior from senior code: Proper Exception Hierarchy
One of the clearest signs of mature, production-grade Java code is a well-designed exception hierarchy.
Recommended structure used by experienced teams:
- BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
- TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, PaymentGatewayDown)
- CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

The Java pattern that separates good code from great code: Proper Exception Hierarchy:
One of the clearest signs of mature Java codebases is a thoughtful exception hierarchy.
Recommended structure used by senior teams:
BusinessException → for expected domain/validation errors (e.g. OrderNotFound, InsufficientFunds)
TechnicalException → for infrastructure/integration failures (e.g. DatabaseConnectionFailed, PaymentGatewayDown)
CriticalException → for unrecoverable system errors
Never throw raw RuntimeException or plain Exception for business logic.
Realistic example below:

After 3 days (12 hours total), many changes, and running "kamal setup" & removing it 10,000 times, I finally got Kamal 2.0 working with PostgreSQL on a single VPS.
Most steps succeeded in each "kamal setup" until the ENTRYPOINT.
I often faced a username/password connection issue (ActiveRecord::DatabaseConnectionError), despite correct info.
Then, using a DATABASE_URL, it errored at the asset precompile step, saying "Database_url can't be blank." I fixed it by adding a dummy DATABASE_URL="postgresql://dummy:dummy@dummy/dummy" to the RUN asset precompile step in the Dockerfile.
For the accessory, I changed "directories: data:/var/lib/postgresql/data" to "volumes: service-accessory-data:/var/lib/postgresql/data," and it worked.
I didn't include the files: config/init.sql:/docker-entrypoint-initdb.d/setup.sql.
Each tutorial recommended it, yet my DB was still created.
Questions:
- Does pointing db_host to "service_name-accessory_name" equal 127.0.0.1:5432? Docker ps says: 5432/tcp.
- Are "directories" and "volumes" the same? Will this cause issues later?
- I have firewalls, a non-public DB, and passwordless SSH. Is this enough to start?
DEPLOYING A RAILS APP WITH KAMAL
The process started yesterday.
I wanted to test Kamal since the 2.0 release.
It took some time to get familiar with the tool.
I faced some issues with secrets (solved now).
I picked up the process today,
and so far, it's going great.
Are there any advantages to using Debian over Ubuntu on the server side, or it does not matter?

Last Seen Hashtags on Sotwe
hpmi夢
Seen from United Kingdom
edgeofhell
Seen from United States
poppersslut
Seen from Russia
zoophilia(filter:videos)
omegle
Seen from United States
番鳥卓日記
Seen from United States
hoejab
Seen from Algeria
mgai #unexpectedd
Seen from United States
kızkavgası
Seen from Turkey
killlakill
Seen from Chile
Most Popular Users

Elon Musk 
@elonmusk
239.3M followers

Barack Obama 
@barackobama
118.5M followers

Cristiano Ronaldo 
@cristiano
114.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.3M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.1M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.6M followers

X 
@x
60.6M followers

