Gustav,
I have spent a lot of time trying to leverage the feature that you want to try to use... and would advise you to try a different approach.... now.
The issue that you are running into is the "tip-of-the-iceberg"...
vbk
[Message sent by forum member 'vbkraemer' (vbkraemer)]
http://forums.java.net/jive/thread.jspa?messageID=284709