Using Task Resource Injection


I've successfully implemented and tested a normal Executor using the DistributedTask interface.

Everything works fine, but now I need to implement also Task Resource Injection ( and this doesn't seem to work.

My PU is like this:

class MyPU {
  private Properties prop;
  MyPU() {prop = new Properties();}

And My Task is:

class MyTask implements DistributedTask<Integer, Long> {

private transient Properties prop;

public Integer execute() throws Exception {
        return 1;



The Task, when executed, correctly prints "Before" in the server but then, in the client, throws a NullPointerException because prop is null.

Did I miss something?

Thanks in advance ;)

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2009-03-19 10:13:08 -0500

epper gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete