Links

  • 1. Sogeti
  • 2. JBoss
  • 3. IBM
  • 4. Oracle
  • 5. SpringSource
  • 6. NL-JUG
  • 7. Java

Archives

Syndication  RSS 2.0

RSS 1.0
RSS 2.0

Bookmark this site

Add 'JCN Blog' site to delicious  Add 'JCN Blog' site to technorati  Add 'JCN Blog' site to digg  Add 'JCN Blog' site to dzone

Posted by Jan-Hendrik Kuperus at 22:11 on Thursday 24 June    Add 'Integrating JavaFX with regular Java – Part 2' site to delicious  Add 'Integrating JavaFX with regular Java – Part 2' site to technorati  Add 'Integrating JavaFX with regular Java – Part 2' site to digg  Add 'Integrating JavaFX with regular Java – Part 2' site to dzone

In my previous post about integrating JavaFX with regular Java, I briefly showed you how to properly construct a JavaFX object. This post will elaborate on that principle and provide the JavaFX UI a way to communicate with the Java ‘backend’.

Before I continue, I will explain the design of the application in which I used the method described below. This will allow you to decide whether this is also the way to go for your application, or maybe you still want to try something else. Ok, ready? Here we go!

Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 14:51 on Sunday 30 May    Add 'Integrating a JavaFX UI with regular Java – Part 1' site to delicious  Add 'Integrating a JavaFX UI with regular Java – Part 1' site to technorati  Add 'Integrating a JavaFX UI with regular Java – Part 1' site to digg  Add 'Integrating a JavaFX UI with regular Java – Part 1' site to dzone

When JavaFX was first released, I didn’t give it much attention, as it felt like yet another visualization platform. With the latest release of JavaFX 1.3 and a project requiring a ‘fancy’ user interface, it was time to give it a try. The surprise came quickly: after downloading NetBeans and the JavaFX runtime, I was able to quickly build user interfaces that actually look cool.

After some tutorials and many bogus screens with crazy animations, it was time to put JavaFX to work on a real project. We had an application that receives a lot of data, processes this and stores it in a database. The data reception and processing were already fully developed in ‘regular’ Java using the Spring framework. The goal was to somehow try and integrate this existing code with a fancy JavaFX interface to visualize the data.

Read the rest of this entry »

Posted by Barend Garvelink at 16:35 on Tuesday 27 April    Add 'SPNEGO error “Message stream modified (41)”' site to delicious  Add 'SPNEGO error “Message stream modified (41)”' site to technorati  Add 'SPNEGO error “Message stream modified (41)”' site to digg  Add 'SPNEGO error “Message stream modified (41)”' site to dzone

When setting up SPNEGO for Windows Domain authentication, you may run into a LoginException caused by KrbException: Message stream modified (41).

The error, in my case, was using lowercase for the domain name in krb5.conf.

Posted by Jan-Hendrik Kuperus at 10:45 on Thursday 22 April    Add 'Spring hand in hand with Swing Application Framework' site to delicious  Add 'Spring hand in hand with Swing Application Framework' site to technorati  Add 'Spring hand in hand with Swing Application Framework' site to digg  Add 'Spring hand in hand with Swing Application Framework' site to dzone

Starting work on a new application is always a fun period. You get to choose all your frameworks from scratch and you are not limited by any previous mistakes (or decisions, as some call them). A few months ago I had to come up with an architecture that would support a graphical interface, easy configuration and potentially swapping components in and out.

The configuration requirement and the need to be able to swap components naturally made me choose Spring. Using dependency injection and Spring’s easy PropertyPlaceholderConfigurer, these requirements are easily met.

For the interface, I decided to give the Swing Application Framework (JSR 296) a go. The Swing Application Framework (SWAF from now on) is an attempt at making life with Swing a lot easier. Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 11:46 on Tuesday 13 April    Add 'Why Datasheets Exist… Oops' site to delicious  Add 'Why Datasheets Exist… Oops' site to technorati  Add 'Why Datasheets Exist… Oops' site to digg  Add 'Why Datasheets Exist… Oops' site to dzone

Since a couple of weeks, I have been working on a project which uses RFID/NFC technology. We use the javax.smartcardio interface together with an ACS ACR122U-reader to read and write information from Mifare tags. This was all pretty new to us and so we started doing little experiments with the cards and the reader.

Reading data from the cards was easy, simply authenticate with the default key and read the block. Writing proved to be harder. Especially since we were trying to write to data block 0. Guess what? That block was write-protected according to the specs. If only I had read that before I tried to write 0×00 to every block in the card…

… then I would probably also have read that the authentication keys are also stored in data blocks. Each fourth data block in a Mifare card contains the authentication keys used for reading and writing data in those four blocks. Now I have a card that no longer responds to read/write operations, because the default key is not 0×00. Oops :)

Today’s lesson: when manipulating memory directly in chips / devices, first read the datasheet on the memory layout. :)

–JH

Posted by Jaap Coomans at 15:01 on Thursday 1 April    Add 'Spring 3.0: Spring Expression Language' site to delicious  Add 'Spring 3.0: Spring Expression Language' site to technorati  Add 'Spring 3.0: Spring Expression Language' site to digg  Add 'Spring 3.0: Spring Expression Language' site to dzone

Last December Spring 3.0 was announced, but I haven’t had a good change to look at it until recently. In this blog I want to share with you what I think is one of the more interesting new features in Spring 3.0: The Spring Expression Language (or SpEL, as SpringSource likes to call it).

My first thought when I heard about the Spring Expression Language was “just another expression language”. Confused as I was I saw some code snippets that lead me to think that SpringSource just revisited the property placeholders. It wasn’t until I really dove into Spring 3.0 that I discovered that it really is a major new feature of Spring. In fact it even got its own chapter in the reference manual, as opposed to REST support, which is the most commonly mentioned new feature of Spring 3.0. That was a sign that it’s not just a small change.
Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 11:44 on Thursday 12 November    Add 'The Quest for Parallelism – Slides from JFall' site to delicious  Add 'The Quest for Parallelism – Slides from JFall' site to technorati  Add 'The Quest for Parallelism – Slides from JFall' site to digg  Add 'The Quest for Parallelism – Slides from JFall' site to dzone

Yesterday, at the 2009 edition of JFall, I gave a talk about parallelism. The slides from that presentation can now be downloaded here.

For those of you who missed my talk, stay tuned to this blog. I am working out a summary article.

–JH

Posted by Jaap Coomans at 10:52 on Thursday 5 November    Add 'Don’t blame Hibernate, blame Spring!' site to delicious  Add 'Don’t blame Hibernate, blame Spring!' site to technorati  Add 'Don’t blame Hibernate, blame Spring!' site to digg  Add 'Don’t blame Hibernate, blame Spring!' site to dzone

A few months back I encountered a problem concerning hibernate.connection.release_mode. After my problem was solved by setting this property to 'after_statement' a colleague encountered the same problem and I advised him to use the same solution, which solved the problem again.

Today however, another colleague noticed this line in the logfile: "Overriding release mode as connection provider does not support 'after_statement'". A little investigation showed that this line is accompanied by a change from 'after_statement' to 'after_transaction'. So why is there apparently no change in the configuration at runtime, even though we noticed a difference in behaviour?

Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 6:18 on Thursday 5 November    Add 'Easy Event-Driven Application With Spring!' site to delicious  Add 'Easy Event-Driven Application With Spring!' site to technorati  Add 'Easy Event-Driven Application With Spring!' site to digg  Add 'Easy Event-Driven Application With Spring!' site to dzone

Suppose you are making an event-driven application. You have your listener interfaces and your event-generating objects. What is the most annoying part of getting this all to work?

Connecting your listeners to the event-generating objects. Every time you want some object to receive certain events, you have to register your listener with the correct producer object. This has some nasty effects on your code:

  • Either your listeners know to which object they are subscribing, or your event generators know who should be listening to their events
  • Due to this coupling, listeners and producers are difficult to test
  • Adding a new listener to your project requires some boilerplate code to get it working

Spring has a feature that can take care of all of this hassle: autowiring. For normal dependency injection, autowiring feels icky. It’s just too magical and leaves me with a feeling I am not in control. The great thing about autowiring is that it can be used on a per-method base.

Read the rest of this entry »

Posted by Hans-Jürgen Jacobs at 12:18 on Friday 22 May    Add 'JSR voor Dependency Injection' site to delicious  Add 'JSR voor Dependency Injection' site to technorati  Add 'JSR voor Dependency Injection' site to digg  Add 'JSR voor Dependency Injection' site to dzone

Dependency Injection (DI) is al enige tijd bekend (IoC komt al uit 1988) . Binnen Java is er ruim aanbod aan containers en frameworks beschikbaar. Een van de bekendste DI containers is Spring. Echter de configuratie van deze containers is niet uitwisselbaar. Het vervangen van de ene container (bijvoorbeeld Spring) door een andere (bijvoorbeeld Guice) heeft vaak codewijzingen tot gevolg. Google en Springsource hebben een voorstel gedaan om het gebruik van DI te standaardiseren. Het is nog erg vroeg in het proces, de JSR is op het moment dat dit wordt geschreven nog niet op de website van het JCP te vinden.

Lees het voorstel hier en verder op InfoQ.


© 2020 Java Competence Network. All Rights Reserved.