NexusDataSet dataSet = null;
try {
// first start a transaction, use Hibernate to add and persist most of the data
dataSet = addNexusFile(pSubmission, file);
NexusDataSetJDBC dataJDBC = dataSet.getDataJDBC();
// Next use direct JDBC to batch insert data, for performance reason.
// getDomainHome().refreshAll(dataJDBC.getAllMatrices());
// TODO: create a new method:
Connection conn = getSubmissionHome().getConnection();
for (MatrixJDBC matrixJDBC : dataJDBC.getMatrixJDBCList()) {
matrixJDBC.batchInsertColumn(conn);
matrixJDBC.prepElementBatchInsert(conn);
matrixJDBC.processMatrixElements(conn);
// MesquiteMatrixConverter converter = matrixJDBC.getMesqMatrixConverter();
// converter.processMatrixElements(matrixJDBC, conn);