englishteeth.co.uk

… the weblog of Ian “English Teeth” Robinson
  • rss
  • Home

This week I have mostly been reading…

Ian | May 25, 2008

My week started with a look at an evaluation of Spring MVC or JSF+?.

But it wasn’t long before I was consumed by OSGi to the extent that’s I’ve hardly looked at anything else. I intend to post some sort of summary for myself at some point, once my brain has stopped bubbling.

I did find a reasonably interesting/useful page on the Struts 2 plugin architecture.

Comments
No Comments »
Categories
development
Tags
links, mvc, osgi, spring, struts2
Comments rss Comments rss
Trackback Trackback

Grails on an existing database

Ian | May 19, 2008

The usual grails approach is to create the database to reflect the model, but if there is an existing database there are a few things to bear in mind.

I got a good start on this from Grails on Oracle, but it’s a bit out of date now and is still from a having control over the database angle.

In the configuration
I was getting an “Unsupported feature” org.springframework.jdbc.support.MetaDataAccessException
Although this appeared to be down to the target database not supporting auto-detection, I was providing org.hibernate.dialect.OracleDialect in the hibernate properties. However, after checking the documentation on Grails Data Sources, this should have been in the data source.

dataSource {
  pooled = true
  driverClassName = "oracle.jdbc.OracleDriver"
  dialect = "org.hibernate.dialect.OracleDialect"
  username = "username"
  password = "password"
}
hibernate {
  show_sql = "true"
  cache.provider_class = "org.hibernate.cache.NoCacheProvider"
  current_session_context_class = "thread"
}

environments {
  development {
    dataSource {
      dbCreate = "update"
      url = "jdbc:oracle:thin:@path:port:sid"
    }
  }
}

After sorting that, the errors were SQL grammar related and needed to be dealt with at the domain object level; show_sql = “true” did work in the hibernate properties and helped identify where these were coming from.

In the domain objects
The differences are captured in mapping declaration… (duh!)

  • I didn’t want my domain object to be the same name as the table.
  • The id column in the table was not to the grails convention.
  • There was no version column in the table.

(There was a lastUpdated column, but the first task was to get something working before I worried about optimistic locking!)

class MyDomainObject {

  static mapping = {
    table 'db_domain_object'
    id column:'domain_object_id'
    version false // no version column in table
  }

  String someProperty
  String someOtherProperty

}

Nothing earth shattering or difficult, but not exactly obvious from the server output.

Comments
2 Comments »
Categories
development
Tags
db, grails, groovy, hibernate, oracle, sql
Comments rss Comments rss
Trackback Trackback

This week I have mostly been reading…

Ian | May 18, 2008

I read an great article Gin, Television, and Social Surplus via eirikso.com, that I was determined to post on but haven had the chance. To much watching TV no doubt!

I have some fun playing with a this java testability explorer from a guy called Misko Hevery.

Then a I had a frustrating delve back into J2ME with a little help from J2ME and My RAZR and in particular this Guide to getting started in J2ME for the Motorola v3x phone. Though I must admit that the bundled MOTODEV Studio for Java ME v1.3 from The Motorola developer network covers pretty much everything.

In the end I was just let down with unlocking my phone. I’ll give it another go, but I’m not holding my breath. Perhaps this Motorola V3 RAZR Unlocking Kit might help. If it’s as straight forward via Blue Tooth as instructions in this post suggest, I’ll eat my hat! I hate it when technology you pay good money for is senselessly hobbled.

Comments
No Comments »
Categories
development, miscellaneous
Tags
j2me, java, razr, testing, tv
Comments rss Comments rss
Trackback Trackback

Mini Moving Mile

Ian | May 12, 2008

Yesterday was a beautiful day on the south cost and I got stuck in one of the best traffic jams ever. Much preferred to the usual morning congestion I hit this morning.

After taking my son to see Speed Racer (the visual equivalent of a massive sugar rush for a six year old boy), we looked round a collection of minis displayed around Gun Wharf Quays in Portsmouth. These were here by arrangement of the Italian Job, a charitable organisation run by mini enthusiasts who run a fund raising tour inspired by the the Italian Job film for the children’s charity KidsOut.

The culmination of yesterdays showcase was to be a “Moving Mile” of minis at Southsea Common. Despite only becoming aware of this at the eleventh hour, my mini was freshly polished and eager to be part of it.

Minis

As a result we found ourselves among another 150 or so minis of various ages and design. Even though there were only half the amount needed to break any records, it was really good fun and quite a spectacle.

Comments
1 Comment »
Categories
miscellaneous
Tags
italian job, mini, portsmouth, speed racer
Comments rss Comments rss
Trackback Trackback

This week I have mostly been reading…

Ian | May 11, 2008

Perhaps it’s because the weather has been so much better or that I have been a bit busier this week; either way I seem to have accumulated much fewer posts in this little bucket that I publish as “This week I have mostly been reading…”

It’s usually stuff outside of my blog roll, which has still had it’s highlights.
Coding horror Re-Encoding Your DVDs for instance, solved my recent PSP encoding conundrums by introducing me to handbrake. It also gave me some food for though regarding my DVD storage. (Where I do, I hold a complete rip or ISO.) This followed an earlier post from Mr Atwood’s post on Building Your Own Home Theater PC which was also interesting.

I have read other stuff too! Like, er, I poked around scheduling jobs in JBoss here.

I came across a list of Top 10 Tools to Get Blogging Done. I didn’t think much of most, but the Copy Link Text Firefox extension which I used for these two links is great!

Comments
No Comments »
Categories
development
Tags
dvd, encoding, handbrake, htpc, jboss, links, psp
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Author

Ian Robinson is a relatively agile software engineer interested in things both sides of the object relational divide and beyond.

Categories

  • development (37)
  • miscellaneous (28)
  • music (7)
  • software (19)

What I'm Doing...

  • @noelfielding11 why are you in watching telly!? in reply to noelfielding11 2010-04-16
  • What was so good about Nick Drake? These "artists" are covering, music is spot on but no effect at all. Totally lacking the goose pimples. 2010-04-16
  • Some Ginger bloke's on telly covering Nick Drake in a mediocre style. 2010-04-16
  • More updates...

Posting tweet...

Powered by Twitter Tools.

Blogroll

  • Dan North
  • Dave Astels
  • Dave Wood
  • eirikso.com
  • Matt Raible
  • Object Mentor Blog
  • The Ancient Art of Programming
  • The Wisdom of Ganesh

Tags

active-mq architecture bauhaus css db eclipse esb festivals freesat gorm grails groovy hd hibernate htpc java jboss jms junit links mce media center mini music oracle osgi patterns pirsig plugins satellite soa software spring sql struts2 testing themes tools tv vmc web wordpress xml xpath xslt
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox