summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-02-03 05:18:33 (EST)
committerEike Stepper2008-02-03 05:18:33 (EST)
commit794aff5370af2808925f01644c9d1aabaae6b9d6 (patch)
treee3d0ecc74221b361dfaa852b049a564f89807a56
parent227de499575c11dc2ed4e422718babb035dc3f5e (diff)
downloadcdo-794aff5370af2808925f01644c9d1aabaae6b9d6.zip
cdo-794aff5370af2808925f01644c9d1aabaae6b9d6.tar.gz
cdo-794aff5370af2808925f01644c9d1aabaae6b9d6.tar.bz2
[217117] Develop a HibernateStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217117
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java
index e0531b1..2a7b627 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java
@@ -65,13 +65,13 @@ public class HibernateTest
CDOSession session = CDOUtil.openSession(connector, REPOSITORY_NAME, true);// Open a CDO session
session.getPackageRegistry().putEPackage(Model1Package.eINSTANCE);// Not needed after first commit!!!
- CDOTransaction transaction = session.openTransaction();// Open a CDO transaction
- Resource resource = transaction.createResource("/my/big/resource");// Create a new EMF resource
-
- // Work normally with the EMF resource
- EObject inputModel = getInputModel();
- resource.getContents().add(inputModel);
+ // Open a transaction, and create a new resource
+ CDOTransaction transaction = session.openTransaction();
+ Resource resource = transaction.createResource("/my/big/resource");
+ resource.getContents().add(getInputModel());
transaction.commit();
+
+ // Cleanup
session.close();
connector.disconnect();
}