Hi guys, I am trying to resolve a straightforward thing: Upon log-in I want to check whether a bunch of user related topics exist and if they don't create them.
So I implement the PostLoginUserListener's postLoginUser method and do my checks. Then there is the method that creates new topics which looks like this: ChildTopicsModel childs = mf.newChildTopicsModel(); // put data inside // <removed for the example> Topic t = dm4.createTopic(mf.newTopicModel(NS.user.self(), childs)); long wsId = wsService.getAssignedWorkspace(acService.getUsernameTopic(userName).getId()).getId(); assignToWorkspace(wsId, t); When this code runs it will actually cause an exception because there is no transaction context. If it were a normal rest method I'd add @Transactional and all would be fine. However I don't have this option, so I thought I'd do a TX myself and surrounded the above code with: DeepaMehtaTransaction tx = dm4.beginTx(); // code from above tx.finish(); tx.success(); Unfortunately that does not do anything. I don't see errors in the log but the actual topic is not created either. *puzzled* Any idea what I am doing wrong? All the best, Robert -- Robert Schuster freiberuflicher Softwareingenieur RS01 - IT-Systemanalyse und -entwicklung Robert Schuster Kalkbergeweg 75 • 12589 Berlin +49 157 798 00 310 [email protected] -- devel mailing list [email protected] http://lists.deepamehta.de/mailman/listinfo/devel-lists.deepamehta.de
