Archive

Archive for October, 2008

How to Create an SMF Manifest

October 24, 2008 Leave a comment

Check out the following documentation from Sun on creating SMF Manifests.

http://www.sun.com/software/solaris/howtoguides/smfmanifesthowto.jsp

Note the links at the bottom of the page for more useful resources on SMF.

Categories: OpenSolaris Tags: ,

Why JPA refuses to persist Group objects

October 16, 2008 Leave a comment

Problem

When working in Java using tools like JPA you sometimes forget to keep the limitations of the underlying database in mind. I spend about an hour trying to find out why my custom Group objects didn’t get persisted, and MySQL complained about incorrect SQL syntax.

Read more…

Categories: Databases, Java Tags: ,

Why MySQL gave case insensitive string results

October 14, 2008 Leave a comment

Problem

Today MySQL was giving me crappy results… when I searched for a user with name ‘GUEST’ it gave me a user with name ‘Guest’. Which is close… but not close enough. Somehow MySQL handled my input in a case insensitive way.

During my journey across the internet looking for answers, I found that the case sensitivity of table names depends on your platform because MySQL uses files to store tables. I also found many users asking how to do case insensitive queries… but nobody answering *my* question.

Read more…

Why cascade merge didn’t work

October 13, 2008 Leave a comment

Problem

I ran into a problem with JPA not saving my related entities when I merged them, even though I had set cascade to persist.

Solution

It turns out that both Cascade.PERSIST and Cascade.MERGE have to be specified on a JPA entity. Just PERSIST does not apply to situations were an existing entity is merged after having been linked to new entities.

Categories: Java Tags: , , ,

How to use Bean Managed Transactions with EJB3, JPA and JTA

October 7, 2008 6 comments

During a “little” project I am doing in my spare time, I found out that switching to Bean Managed Transactions (BMT) wasn’t as easy as I expected. When you’ve used Container Managed Transactions (CMT) and are switching to BMT with JTA like I was, you need to know the following:

Read more…

Categories: Java Tags: , , ,