Category Archives: Databases

YN

Yeah, I know, this isn’t rocket science. But it is rather nice 🙂 So, I’m working on this JEE project, backed by an Oracle database. Some of my work involves refactoring CMP 2.1 entities into JPA entities. Here I’m faced … Continue reading

Posted in Databases, Java | Tagged , , , , , , | Leave a comment

Locking a row, portable between databases, with JDBC

A couple of years ago I was with a project designing a system to manage Investor Meetings. An Investor must have a valid Pass in order to join a Meeting. Each Pass has a unique serial number. It was a … Continue reading

Posted in Databases, Java | Tagged , , , , , | 1 Comment

Implementing a simple database semaphore

In this article I will describe a simple technique that enables you to implement an “exclusive lock” in a distributed, even clustered, environment. The technique works with all major databases, and should work with any database that has a reasonable … Continue reading

Posted in Databases, Java | Tagged , , , , , , , , | 11 Comments

Securing J[2]EE applications, part 3

In this third article, the samples are modified to be run on JBoss (4.0.3+) and JavaDB (Derby version 10.2). The first article showed how to setup Glassfish authentication with only a single database table. The second article evovled the simple … Continue reading

Posted in Databases, Java, Open Source | Tagged , , , | Leave a comment

Securing J[2]EE applications, part 2

The first part, Securing J[2]EE applications, part 1, discusses a simple setup where a single database table, 2 views and a correctly configured jdbcRealm could handle the most basic authentication and authorization requirements. This second article discusses a few enhancements … Continue reading

Posted in Databases, Java, Open Source | Tagged , , , | Leave a comment

Securing J[2]EE applications, part 1

I’m writing a few articles about securing J2EE applications. The setup is a Glassfish v2 as application server and PostgreSQL v8.3 as database server, keeping it open-source and free 🙂 This first part discusses a simple setup where only a … Continue reading

Posted in Databases, Java, Open Source | Tagged , , , | Leave a comment

Writing JDBC code: resource cleanup and exception handling

No matter how nice an ORM tool used in the project, CMP, Hibernate or JPA, You will eventually have to start writing “low-level” JDBC code. Most often for performance reasons, sometimes just to utilize some database-vendor-specific feature. Or calling stored … Continue reading

Posted in Databases, Java | Tagged , | 1 Comment

The “changing the database” experience

I have been involved in Enterprise JAVA projects since 1998. Almost all projects have had an RDBMS “behind” it, mostly Oracle and DB2. All the projects have been some custom defined application often based on existing infrastructure, and the database … Continue reading

Posted in Databases, Java | Tagged , , , , , , , , , | Leave a comment

Why I love PostgreSQL

Now, I’ve written some ranting about why I hate MySQL, now it is time to write about another Open Source RDBMS, PostgreSQL. In this blog I am going through why I think PostgreSQL is a great database – comparable with … Continue reading

Posted in Databases, Open Source | Tagged , , , | 7 Comments

Why I Hate MySQL

MySQL databases have been offered by most web hosting companies for a couple of years. This is the main reason I still have to deal with this product, which claims to be an “enterprise ready” relational database. Unfortunately these companies … Continue reading

Posted in Databases, Open Source | Tagged , , , | 1 Comment