Looking at the code, it appears that logging is badly done in the
EventPrim/EventCompound stuff in the previous release (we have fixed it
in the upcoming release candidate) - hence the logs indicating possible
errors are not being generated. Do the following in sfDeploy...
log =3D sfLog();
And you should start seeing the logs.
Consequently, I suspect that you have a problem with sending the event,
and the notification that this is a problem is being lost (no excpetion
is generated at the caller of the "sendEvent", but some log indication
that an event has been lost should occur).
I think that your issue is probably to do with the serialization of the
event class that you have - you must make it serializable.
Patrick=20
-----Original Message-----
From: smartfrog-developer-admin@...
[mailto:smartfrog-developer-admin@...] On Behalf Of
Andreas Unterkircher
Sent: 26 May 2005 13:38
To: smartfrog-developer@...
Subject: [Smartfrog-developer] new eventbus
Hello,
SmartFrog 3.04.022_beta now allows to send Objects instead of string
within WorkFlow. I make a small test to see if it works:
on the sender side:
sfStart:
...
testList =3D new LinkedList();
testList.add("item1");
System.out.println("List contains at send "+testList.size());
sendEvent(testList)
...
on the receiver side:
public void handleEvent(Object event) {
LinkedList list =3D (LinkedList)event;
System.out.println("List contains at receive " + list.size());
}
This works, I get as output:
List contains at send 1
List contains at receive 1
Now I naively try it with my own test class:
public class PBSnodeData {
public String hostname;
}
On the sender side:
...
nodeData =3D new PBSnodeData();
nodeData.hostname =3D sfResolve("hostname","",true);
...
System.out.println("nodeData.hostname at send "+nodeData.hostname);=20
sendEvent(nodeData);
On the receiver side:
public void handleEvent(Object event) {
PBSnodeData nodeData =3D (PBSnodeData)event;
System.out.println("nodeData.hostname at receive "+nodeData.hostname);
}
But all I get in the output is:
nodeData.hostname at send testHost
It seems to me that handleEvent never gets called. What's wrong here ?
Do=20
I have to implement some additional interface with my class ? Thank you=20
very much for your help.
Best regards,
Andreas
-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to
collaborate
online with coworkers and clients while avoiding the high cost of travel
and
communications. There is no equipment to buy and you can meet as often
as
you want. Try it
free.http://ads.osdn.com/?ad_id=3D7402&alloc_id=3D16135&op=3Dclick
_______________________________________________
Smartfrog-developer mailing list
Smartfrog-developer@...
https://lists.sourceforge.net/lists/listinfo/smartfrog-developer
|