28 April 2010

Dealing with Hibernate proxies

To deal with lazy loading Hibernate uses proxy objects.
Pitfalls for this approach have been documented. Basically the instanceof operator can fail on a sublcass of an entity.
The bug ticket on this has been rejected, with typical JBoss flair:

If you think this through a bit more carefully, you will see why it is impossible.
Gavin King
Still JPA compliancy requires the instanceof operator to work correctly.
Here are some ways to deal with the proxies:

20 April 2010

Oracle free software reality check

Policy shifts, almost 3 months after Oracle acquired Sun:

  • Oracle has blocked access to Solaris security patches for people without a support contract.
  • Oracle has stopped shipping free OpenSolaris CD’s.
  • Oracle is discontinuing the open and free Sun Identity Manager.
  • Oracle has made the MS Office ODF 1.2 plugin paying (with a minimum of $9000 for 100 users).

17 April 2010

7500 users sell their soul online

From the legal conditions of GameStation:
By placing an order via this Web site on the first day of the fourth month of the year 2010 Anno Domini, you agree to grant Us a non transferable option to claim, for now and for ever more, your immortal soul. Should We wish to exercise this option, you agree to surrender your immortal soul, and any claim you may have on it, within 5 (five) working days of receiving written notification from gamestation.co.uk or one of its duly authorised minions.

15 April 2010

Solaris disk layout

On a SPARC system

  • VTOC is in cylinder 0, sector 0 and can contain 8 slices

    • slice 2 by convention represents the entire disk
  • the primary boot block is in cylinder 0, sectors 1-15
  • A file system can start on cylinder 0, sector 16
On x86 the situation is a bit more complicated:

If Solaris is installed on cylinder 1 (typical) disk cylinder 1 = Solaris (relative) cylinder 0.
Solaris x86 VTOC supports 16 slices:
  • 0-7: like SPARC slices
  • 8: boot slice (relative cylinder 0)
  • 9: on IDE/SATA disks default alternate slice (relative cylinder 1 and 2)
  • 10-15: unused

Register a Solaris system for patch updates

You can bring a Solaris automatically up to date with the latest recommended or security (if you do not have a support contract) patches.

You can do this using

  • a graphical tool: /usr/bin/updatemanager
  • a command line tool: /usr/sbin/smpatch

updatemanager will guide you through a series of screens to register yourself and your system. Even if you use the graphical tool to register, you can use the command line interface later on to keep your system up to date.

Here’s the procedure to register without using the graphical updatemanager tool.

  1. Register for a Sun Online account on the web. This is a common account for accessing SunSolve, Sun developer connection…
  2. Prepare a registration file and fill in your user name, password, system and optionally other information like contract number and proxy. You can use /usr/lib/breg/data/RegistrationProfile.properties  as a template.
  3. Register your system

 # sconadm –a –r <yourRegistrationFile>

Here’s a Sunsolve howto on this topic.

11 April 2010

Gosling Goes

James Gosling father of euh... NeWS (Network Windowing System) leaves Sun Oracle.
A great many people will be yelling the end is nigh.
Not me.