{
Pair<PersistedType, String> key = new Pair<PersistedType, String>(type, name);
long tx = idGenerator.generateID();
PersistedJNDI currentJNDI = mapJNDI.get(key);
if (currentJNDI != null)
{
jmsJournal.appendDeleteRecordTransactional(tx, currentJNDI.getId());
}
else
{
currentJNDI = new PersistedJNDI(type, name);
}
mapJNDI.put(key, currentJNDI);
for (String adItem : address)
{
currentJNDI.addJNDI(adItem);
}
long newId = idGenerator.generateID();
currentJNDI.setId(newId);
jmsJournal.appendAddRecordTransactional(tx, newId, JNDI_RECORD, currentJNDI);
jmsJournal.appendCommitRecord(tx, true);
}