Hi Everyone,

Quick question of style really. I have created an app which has a large amount of interaction between Java and Batik. I do all my 'setAttributeNS' statements in the updatemanager thread, and 'getAttributeNS' statements outside of this thread.

Obviously this leads to some situations where the sub-thread with the 'setAttributeNS' statement has not been completely executed at the time of the 'getAttributeNS' statement in the java code.

I currently can think of two possible solutions:

Move any code that ever interacts with Batik ( most of my application ) into the Batik UpdateManager thread, effectively making everything synchronous - kind of against the whole asynchronous-ness of Batik.

The only other way I can think is to store the attributes all locally before the 'set' statement gets dispatched and make sure the 'get' statement will retrieve this value and not call 'getAttributeNS', but that seems like a rather silly option to me.

By the way part of this started because I was merrily setting attributes and the getAttributeNS was returning 'null', and what was happening was the liveAttributeValue table had my latest and correct values in, while the 'attributes' table still had the original basic values in, and the only thing I can think of is that a thread somewhere is causing the listener between the two not to fire - any other suggestions?


Any thoughts or comments grateful,

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to