@Override
    public void create(Object obj) {
        if (null == obj) {
            return;
        }
        if (obj instanceof Persistent) {
            update(obj);
            return;
        }
        
        Object idValue = EntityMetaData.get(obj.getClass()).getIdProperty().getter().get(obj);
        if (null == idValue) {
            throw new SessionException("Unable to persist an object which has no id: " + obj);
        }
        
        String dn = DnHelper.build(idValue.toString(), obj.getClass());
        LogUtils.debug(LOG, "create dn=" + dn);
        
        try {
            ctx.bind(dn, null, fromTransientToAttributes(obj));
            
            /*
             * We didn't do an extra lookup invocation to put it into the cache,
             * as we have no idea whether the client code need the persisted
             * entity or not. Besides, if the answer is no, we slow down the
             * speed. If yes, the client code still hold the original reference
             * of the transient object and we would rather the client code to do
             * the extra lookup by itself.
             */
            
        } catch (NamingException e) {
            throw new SessionException(e.getMessage(), e);
        }
    }