Thanks Pablo....but i have not understood what i need to do to begin the Transaction, i think my code has got all i need to start and finish a transaction....or not?
if(proteins.get(a1).getFullName().equals(protein))
{
Transaction tx= graphDb.beginTx(); //Inizio transazione
try{
ProteinNode a=proteins.get(a1); //NODO BIO4j
Node n = graphDb.createNode(); //NODE PER COSTRUTTORE DRUG
DrugNode b=new DrugNode(n, (String)drugIDList.get(i), (String)drugname.get(i)); //NODO DRUG
tx.success();
Relationship rel = a.getNode().createRelationshipTo(b.getNode(), Prova.DrugRelTypes.KNOWS); //RELAZIONE PERSONALE
DrugRel relationship=new DrugRel(rel); //RELAZIONE DRUG
}
finally{
tx.finish(); //Fine transazione
}
break;