Mark Clarke's blog

Toplink and JNDI configuration on Glassfish and Tomcat

JNDI setup and configuration is one of those parts of java where the differences between container implementations are just enough to be a barrier to porting your application to a different server. This combined with the incompatibilities with JPA between implementations can lead to vendor or stack lock-in, hopefully this get better with the next release of JPA.

One of the issues with JPA is using JNDI datasources for your persistenceContext.

Glassfish JNDI setup and persistence.xml

Glassfish does not require any special handlng for its JNDI entry.

Differences between Hibernate JPA and Toplink JPA

On one of our projects we decided to switch JPA providers from Hibernate to Toplink. The main reason for this was that Hibernate depends on so many core open source libraries that other open source projects also use, that there are all kinds of version problems when the application is deployed in a JEE container, such as Tomcat or Glassfish, that uses different versions internally. Basically jar hell with all kinds of issues with classloaders loading the wrong version of the jar.

How to configure email for BackupPC

BackupPC is a great piece of software that makes the setup and management of backups of servers and workstations a breeze. If configured correctly it will allow for a complete disaster recovery solution. Since it primarily backs ups to disk it is also a cheap, or cost-effective solution. One of the steps often left out of the many setup guides for backuppc on the internet is configuring mail for sending event notifications.

JPA - Understanding PersistenceContext in Java Persistence API

One of the most important things when dealing with any system is having a model in your mind of how the system works. As with most abstractions it is not necessary that the model reflects how the system is implemented as long as it allows one to make accurate predictions on how certain actions will result in predictable events. The model may even be wrong but seem to work. I have a very bad model for how my Microwaves and Video player work and hence am restricted to using only a couple of buttons.

Why does Neotel dig up the same trench over and over again?

I don't know about the rest of Johannesburg but in Randburg it seems that Neotel keeps on digging up the same trench every few weeks. They have dug up the road and pavement at least twice in front of our offices and about three times on Main road.

I have been late for work now on more occasions than I care to count because of those guys laying out orange pipes.  Not to mention the wear and tear on my car from the tank traps that are left behind for unsuspecting motorists.

How to compile a custom kernel for Fedora/Redhat/Centos

As a rule I prefer not to compile custom kernels on rpm and apt based distros unless absolutely necessary. If I know I am going to have to customise the kernel before hand, I prefer to use a source based distro such as Gentoo. That way there is nothing that gets in your way of the simple, make menuconfig=>make install=>make modules=>make modules_install=>mkinitrd (if necessary) recipe for success. Most times for debian and redhat based distros you can get by with just installing the kernel headers and then building your special module form there. 

How to run ASP on apache

Recently we had to take over a project where the original developers had decided to use Microsoft's active server pages (asp) as the development language. We had to temporarily maintain this site while it was re-developed in Drupal. Needless to say this was a nightmare.

How to have Xandros Scalix edition run Scalix web front-end as its default site

By default Xandros Scalix edition runs the Scalix web front-end on port 9090. This is quiet annoying as in most cases the mail server is dedicated and you won't be running any other services on it. Least of all another web service running on port 80. In addition most clients expect just to type in a normal looking url and trying to explain port mappings to their users is just a pain.


Subscribe to RSS - Mark Clarke's blog