Monday, December 20, 2010

Spring & Messaging Webinars

There are a couple excellent webinars that I would like to highlight. All of these are available from springsource.com/webinars (click on the "developers" tab).

Spring Dependency Injection Styles

The first is a discussion about the different ways that are available to configure dependency injection in a Spring Container. The webinar covers three approaches: the traditional XML approach, Annotations and Java @Configuration.

http://www.springsource.com/webinar/spring-dependency-injection-styles


Message-Driven Architecture with Spring

The second webinar is a quick walk through of Spring Integration and the many new features found in the SI 2.0 release. It is a great way to learn about SI or just catch up on some of the new functionality available in the 2.0 release.

http://www.springsource.com/webinar/message-driven-architecture-spring


RabbitMQ: Messaging That Just Works

The third webinar is an introduction to the concepts and usage of RabbitMQ. For those who are not familiar with RabbitMQ, it is a messaging broker that speaks among others, the AMQP protocol. RabbitMQ has clients available in many different languages, including great Java / Spring support.

http://www.springsource.com/webinar/rabbitmq-messaging-just-works

Thursday, September 09, 2010

More JavaFx Fun

Here is another JavaFx demo that I've been building. It is a simple implementation of John Conway's "Game of Life".

http://en.wikipedia.org/wiki/Conway's_Game_of_Life

The demo is a simple simulator, just click on the boxes to turn them "on" or "off". When you are ready, click on the "start" button to begin the simulation. You can increase the speed at which the simulation runs by moving the slider up and down. You can also step through the simulation by clicking the "Enter" or "Return" key.

Here are the links

Java WebStart: link
Java Applet: link

Here's a link to the source code, link.

Thursday, September 02, 2010

Free Spring / Groovy Training Videos

Here are some links to a few nice Spring and Groovy training videos.

SpringSource Free Training Videos

http://www.springsource.com/training/freeonline

There are currently three videos.

Metaprogramming with Groovy by Jeff Brown
OSGi and Modular Applications by Joris Kuipers
Developing Aspects with AOP by Jeff Brown

Good stuff, check'em out!

Thursday, August 19, 2010

Excellent Grails Posts

Just wanted to quickly point out this excellent series of posts by Peter Ledbrook detailing some of the gotchas when working with Grails & GORM. Veteran or neophyte this is a good read for any Grails developer.

http://blog.springsource.com/2010/06/23/gorm-gotchas-part-1/

http://blog.springsource.com/2010/07/02/gorm-gotchas-part-2/

http://blog.springsource.com/2010/07/28/gorm-gotchas-part-3/

Tuesday, June 01, 2010

Clonezilla & Windows

I was trying to restore a Windows Clonezilla image today and encountered a weird error. Windows would boot, but it would not start. Instead the following error would be shown.

autochk program not found

Fortunately I was able to boot into Ubuntu and mount the partition, so I could verify that my data was safe.

After searching on Google, I found some information on using a DOS tool to modify the partition to type 7 (link).

Not having access to a DOS boot disk, I decided to see if I could do the same think in Linux which turned out to be quite simple.

STANDARD DISCLAIMER

I'M NOT RESPONSIBLE IF YOU DESTROY YOUR DATA

PLEASE BE VERY CAREFUL WHEN USING FDISK!!! DO NOT ATTEMPT THIS UNLESS YOU KNOW WHAT YOU ARE DOING AND THEN THINK TWICE!!

Should you still want to proceed, here's how you can do it.

First, boot into Linux. If you do not have a dual-boot system, simply use one of the many Linux boot CD's. Once up and running in Linux, as root, execute the following commands.

First, execute "fdisk -l" this will list your current drives and partitions. Find the drive which contains the problem partition. In my case this was /dev/sda, it could be "sdb", "hda", "hdb" or something else that follows that pattern.

Second, execute "fdisk /dev/sda". Substitute your disk name for "/dev/sda". This will launch fdisk.

Now fdisk will be running so the following command will be executed in the fdisk shell. First, execute "p" to print the partition table. In my case, the problem partition, "/dev/sda2" was incorrectly listed as a Linux partition.

To fix this problem, use the "t" option and set the partition type to 7 (which is the partition type for NTFS).

Now, execute "p" again, to make sure the type is correctly set to NTFS. If all looks good, execute "w" to write out the changes then quit fdisk.

Everything should be OK now, simply restart and you should be able to boot successfully into Windows.

Tuesday, April 06, 2010

Visual Tail in JavaFx

Having recently decided to try and learn something about JavaFX, I decided to port my Visual Tail application which was done using Griffon/Swing to run using JavaFX.

Overall the process was pretty smooth, but here were some of the parts that caused me a bit of grief.

Component Layout

Initially I had a hard time with laying out my components in JavaFX.

I was used to Swing based layouts so I was looking for a layout manager to take care of this for me. While there are some basic layout capabilities (HBox, VBox, etc..) in JavaFX there is nothing built into it that is quite like the Swing layout managers, in particular MigLayout.

NOTE** There is capability to use MigLayout in JavaFX, but it is through an add-on to JavaFX. Link.

After a bit of reading, I found that basic layouts are typically done by using binding, which worked great for my simple application.

Background Tasks

It also took a minute to figure out how to make something run as a background task. For reference I ended up extending the javafx.async.JavaTaskBase class which worked just fine.

Lack of Components

My only other sticking point was with the minimal set of of native JavaFX components. There are still some of the components that are missing like a drop down box and a multi-line text area.

For my application the problem was with the lack of a multi-line text area.

However this was not really a big deal and there is a simple solution. Just extended the javafx.ext.swing.SwingScrollableComponent and created a wrapper around a Swing JTextArea component. You can then use that in your JavaFx code.


Final Product

So after a bit of work, here is the final product.

Java WebStart: link
Java Applet: link


UPDATE - 4/7/2010

Thanks to my visitors for pointing out the problem with the JNLP files. I had forgot to change the "codebase" location. Should be fixed now.