0
CDO 거래를 위탁하는 데 문제가 있습니다. 모든 것은 내가 커밋하려고 처음 작품을 좋아하지만, 두 번째 시간 나는이 exeption가 나타납니다CDO 거래가 활성화되지 않았습니다.
final TransactionalEditingDomain domain = editor.getDiagramBehavior().getEditingDomain();
domain.getCommandStack().execute(new RecordingCommand(domain) {
protected void doExecute() {
try {
// Open a transaction
CDOTransaction cdoTransaction = cdoSession.openTransaction();
cdoTransaction.addListener(new LifeListener());
// Create a resource
CDOResource cdoResource = cdoTransaction.getOrCreateResource(RESOURCE);
if (existingComponent != null) { // update the existing component
cdoResource.getContents().remove(existingComponent);
}
cdoResource.getContents().add(component);
cdoTransaction.commit();
// Close the transaction
cdoTransaction.close();
} catch (ConcurrentAccessException e) {
logger.error("Error during the CDO repository transaction.", e);
} catch (CommitException e) {
logger.error("Error commiting the CDO repository transaction.", e);
}
}
});
여기서 '구성 요소'는 어디서 왔습니까? 마지막 시도에서와 동일하다면, '소유하고있는'컴포넌트가 닫힌 트랜잭션이 문제가 될 수 있습니다. – Simiil