Marco Behler

+ Follow
since Jun 01, 2014
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marco Behler

Hi Coderanchers,

I just published a new guide: Java & Files.


1. Basic file operations (read/write/create etc) & encodings
2. Watching files and directories
3. In-memory file systems for testing
4. Mooore πŸ‘‡

Enjoy and let me know your comments!

Bob Winter wrote:Solid article.

+ doesn't use Class.forName()
+ uses PreparedStatement
+ shows usage of DataSource and connection pooling
+ also makes use of tey-with-resources to cleanly return the connection to the pool

- doesn't mentioned MariaDB
- no exaple for DELETE but rather only "same as insert and update"

Overall length is ok for a blog post to just give a jumpstart. Should be read by anyone planing some book or wiki or tutorial about jdbc.

Hi Bob, just a quick update. I added the MariaDB driver and the delete example.

Thanks again for the feedback!
@Bob Winter

Thanks! I'll try and weave in your two points in the next revision of the article.

Meanwhile, you might be interested to know that I'm indeed writing a short workbook on JDBC. Let me know what you think!
Dear Coderanchers,

Time for another light read:

What is JDBC?

1. Drivers
2. Connections/Queries/ResultSets
3. Connection Pooling

Dear Coderanchers,

time for a new, in-depth #spring guide!

"What is #springboot? Autoconfigurations In-Depth"

Highly recommended for _anyone_ baffled by Spring Boot's "magic". Covering:

1. Conditionals
2. AutoConfigurations
3. Dependency Management
4. #bootiful FAQ

Hope you enjoy it!
Dear coderanchers,


I just published an extensive, junior-friendly Spring guide (~9000 words):

"What is Spring Framework? From Dependency Injection to Web MVC"

1. Spring's Dependency Injection
2. AOP
3. Resources
4. Web MVC
5. Much Moooore πŸ‘‡

Eat that, official @springframework documentation! πŸ˜‚

Hi Adrian,

thanks! Unfortunately no plans for a NoSQL version anytime soon ;)

I'll fix the typo right away.
Dear coderanchers,

I just published a πŸ‘Š majorπŸ‘Š rewrite (~7250 words) of my #java and #database guide πŸŽ‰.

1. How #jdbc works
2. How #jpa ORMs like Hibernate work
3. How lightweight SQL libraries like jooq work
4. How Spring (JDBC) and Spring Data work
5. Mooooore πŸ‘‡

Feedback always welcome!
Hi @all,
As microservices are such a hot topic, I tried to create an awesome guide about what they really are in the Java world, how you build them and common pitfalls.

Do you have any microservices stories to share? Just let me know.
Just so you know, the links to the books are sent out.
This is what makes it kind of weird.

Let's say 500 transactions a day, in 24 hrs, or maybe even just 10 hours which is 20-50 transactions per hour. Which really is nothing. Unfortunately I cannot diagnose from over here, but with that kind of volume, deadlocks really shouldn't happen.
Hi Paul,
yes, absolutely! There's two big chapters on Spring and Hibernate, where you'll learn the ins and outs of Spring's @Transactional and what it does _EXACTLY_.

Every chapter comes with code and exercises, so you should be able to have pretty good knowledge of it afterwards.

Hi Dinkar,
thanks for your questions.

1. Nope, it does not, explicitly. The question however is: "what is an application with heavy loads". Hundreds of transactions a day, like in the other thread, is really nothing. 100 transactions a second, continously 24x7 would be a different story. I do think however it's an important question, let me continue answering it with the second question of yours.

2. I don't really think that Hibernate has its own approach. What I think happens is that developers with little knowledge of SQL AND Hibernate think they can simply use Hibernate , never care about DB queries again and then suddenly they find themselves with business workflows like a user registration, that spawns 400 sql queries (a true real-life example I encountered recently!), whereas the whole workflow should probably have < 7 statements executed. There's also a ton of other factors at play here, but then this answer would get bigger and bigger

I think this is a huge topic, sadly not covered anywhere in sufficient detail. Not in the scope of my book, but maybe in the next one
Hi Randy,
good question, but unfortunately there could be hundreds of reasons for deadloks. Though to be completely honest, it reads like there was something competely off in your company. The question is also, what are a "lot" of transactions. Are we talking millions? Or much less? Usually, stuff like that shouldn't happen, but I guess you will find the deadlock sections in my book rather helpful!