Persistence API

When year ago EMC announced the work under Persistence API for Documentum I started to worry about the future of their product stack (D2, xCP, etc) – who the hell needs xCP if you can create your own domain model and take advantage of modern frameworks like wicket, vaadin, etc? Fortunately, my concerns were not justified – EMC shared their work on github, and if even forget about the fact they they did nothing during last year:

I can definitely say that their implementation is a piece of shit. Interesting, what does EMC think about transactions? Nothing:

What does EMC think about following their recommendations? Nothing:

By the way I have started to work under JDO implementation for DFC, where code looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns=""
             xsi:schemaLocation="" version="2.0">

    <persistence-unit name="Testing">
            <property name="javax.jdo.option.ConnectionURL" value="dctm:DCTM_DEV"/>
            <property name="javax.jdo.option.ConnectionUserName" value="dmadmin"/>
            <property name="javax.jdo.option.ConnectionPassword" value="dmadmin"/>
            <property name="datanucleus.identityStringTranslatorType" value="dfidtranslator"/>
import java.util.Date;

import javax.jdo.annotations.Column;
import javax.jdo.annotations.PersistenceCapable;

import lombok.Getter;
import lombok.Setter;

 * @author Andrey B. Panfilov <>
@PersistenceCapable(table = "dm_user")
public class DmUser extends AbstractPersistentObject {

	@Column(name = "user_name")
	private String userName;

	@Column(name = "user_os_name")
	private String userOSName;

	@Column(name = "user_address")
	private String userAddress;

	@Column(name = "user_group_name")
	private String userGroupName;

 * @author Andrey B. Panfilov <>
public class TestJDO {

	public void testName() throws Exception {
		PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory("Testing");
		PersistenceManager pm = pmf.getPersistenceManager();
		Query query = pm.newQuery(DmUser.class, "(userName == :user_name || userLoginName == :user_name)");
		List<DmUser> results = (List<DmUser>) query.executeWithArray("dmadmin");
		assertEquals(1, results.size());
		DmUser user = results.get(0);
		assertEquals("dmadmin", user.getUserName());
		assertEquals(16, user.getUserPrivileges());


and if you are interested in existence of robust Persistence API for Documentum let me know – I will share my work.