views:

32

answers:

1

The windows registry contains Boolean, DWords, Strings, Bitmap, Double, DateTime, bitmap java does not. Connecting to:- DWords is easy with a longinteger and the same with Boolean. Java only handles real numbers when DateTime and Double numbers are larger than real numbers. Does that mean you cannot record date and time in Java and doubles are cut down to a Real. And is currency handled with a real number. I'm thinking of converting all this to Strings and using a coding sytem in the naming of the recourd but this costs processing and futher delays. Anotherthing with the windows registry, it has a lazy write. Can Java do a lazy write to the registry or not. This is an inportant time saver of not waiting for a hard disk to refersh its self. Often these records are placed in the registry only to get read between my program and java to make a muilti threading conversion and do this data management.

Has any one done anything like this please java does not document it self very well hear.

A: 

Windows registry has also binary data (like byte[] in Java) - you can serialize any Java object (just with ObjectOutputStream) and store it in the registry, however it will be hard to edit with Regedit.

All Windows registry operations are delegated to advapi32.dll, no matter what library you use. I don't know how now with Windows 7, but a few years ago all advapi registry operations were synchronous, so you needed to wait for the result. If it didn't change, all you can do is to apply producer-consumer method. 'producer' thread can write new registry data to a queue without waiting until they are really written to the registry, and then consumer reads this data from the queue and performs the actual writing.

You mentioned you use registry for program-to-program communication. It's rather bad and slow way, better use sockets, they are much faster, and what's more they can be asynchronous.

iirekm
Even windows xp is asyncchronous I do not agree!!!!!!
lexdean