Hi all,

Is there any reason for MDLWriter to use static member BufferedWriter
(this is currently in SVN, it is a change from older CDK source )

This prevents using more than one MDLWriter on the same time, for
example the following code will produce a mess.

MDLWriter writer1 = new MDLWriter(new FileOutputStream("file1"));
MDLWriter writer2 = new MDLWriter(new FileOutputStream("file2"));

while (something) {
    writer1.write(onemolecule);
    writer2.write(othermolecule);
}

and in multithreaded environment (e.g. servlets, portlets, web services)
using a static writer will give unexpected results.

Just had a look - other instances of DefaultChemObjectWriter also use
static BufferedWriter members - WHY?

Any ideas?

Best regards,
Nina


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to