The Relation initialization is done outside of transaction.
This works (and is ba for Jena), but this is bad for VCS based graph.
Startup logs looks like this
2013-07-31 16:24:40,283 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.queryAndFetch(Unknown Source) at org.nuxeo.ecm.platform.relations.CoreGraph$SizeFinder.run(CoreGraph.java:213) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:156) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,287 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,287 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.isStateSharedByAllThreadSessions(Unknown Source) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:159) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,288 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,288 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.save(Unknown Source) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:161) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,290 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,290 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.queryAndFetch(Unknown Source) at org.nuxeo.ecm.platform.relations.CoreGraph$SizeFinder.run(CoreGraph.java:213) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:156) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,291 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,291 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.isStateSharedByAllThreadSessions(Unknown Source) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:159) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,291 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,291 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.save(Unknown Source) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:161) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,292 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,292 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.queryAndFetch(Unknown Source) at org.nuxeo.ecm.platform.relations.CoreGraph$SizeFinder.run(CoreGraph.java:213) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:156) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,293 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,293 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.isStateSharedByAllThreadSessions(Unknown Source) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:159) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527) 2013-07-31 16:24:40,293 WARN [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction active: turn on debug logs for more information about the faulty call. 2013-07-31 16:24:40,293 DEBUG [org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper] Session invoked in a container without a transaction java.lang.Throwable at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.checkTxActiveRequired(TransactionalCoreSessionWrapper.java:104) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:130) at com.sun.proxy.$Proxy163.save(Unknown Source) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:161) at org.nuxeo.ecm.platform.relations.CoreGraph.size(CoreGraph.java:191) at org.nuxeo.ecm.platform.relations.services.RelationService$1.run(RelationService.java:527)