2014-05-12 1 views
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); 
      } 
     } 
    }); 
+0

여기서 '구성 요소'는 어디서 왔습니까? 마지막 시도에서와 동일하다면, '소유하고있는'컴포넌트가 닫힌 트랜잭션이 문제가 될 수 있습니다. – Simiil

답변

0

나는 매우 EMF 거래/TransactionalEditingDomains 경험이 아니에요 : 여기

org.eclipse.net4j.util.lifecycle.LifecycleException: Not active: CDOTransactionImpl 

를 코드입니다 . CDO에서 버그가 의심되는 경우 Eclipse.org에서 bugzilla를 제출하고 전체 스택 추적을 포함하여 자세한 문제점 설명을 제공하십시오.