User ab70427b17
21-10-2013 05:44:40
I try to add an import function into Play Framework. And I created a short function. Which works very fine in standalone application. Here is the code:
private static int importSDF(File sdffile) throws MolFormatException, IOException, TransferException, ClassNotFoundException, SQLException
{
ConnectionHandler ch = get_connection();
String structureTable = Configuration.root().getString("db.default.structure_table");
Importer importer = new Importer();
importer.setConnectionHandler(ch);
importer.setInput(sdffile);
importer.setTableName(structureTable);
importer.setHaltOnError(false);
// importer.setDuplicateImportAllowed(UpdateHandler.DUPLICATE_FILTERING_ON);
int imported = importer.importMols();
return imported;
}
But when I add this code into my play framework, the importer will dump tones of message looks like:
depth = 0
idx = []
After HomologyInit:
Target atoms
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
38 39 40 41 42 43 44 45 46 ]
Query atoms
0 [ (.) . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. T . . . . . . . ]
1 [ . (.) . . . . . . . . . . . . . . . .
. . . . . . T . . . . . . . . . . . . .
. . . . . . . . . ]
2 [ . . (.) . . . . . . . . . . . . . . T
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . ]
3 [ . . . (.) . . . . . . . . . . . . . .
. . . . . . . . . . . T . . . . . . . .
. . . . . . . . . ]
It really slows down the system and I don't know how to turn it off.
Would you please help me. Thank you.