public void add(int index, Object element)
{
DListEntry entry = prepareEntry(element);
elements.add(index, entry);
// if we are in a transaction: acquire locks !
TransactionImpl tx = getTransaction();
if (checkForOpenTransaction(tx))
{
RuntimeObject rt = new RuntimeObject(this, tx);
tx.lockAndRegister(rt, Transaction.WRITE, false);
tx.lock(element, Transaction.READ);
rt = new RuntimeObject(entry, tx, true);
tx.lockAndRegister(rt, Transaction.WRITE, false);
}
// changing the position markers of entries:
int offset = 0;
try