Re: [rules-users] How to remove a persisted session from the database ?

2010-09-15 Thread drooRam
I have done something like below to remove the persisted session : SessionInfo si = em.find(SessionInfo.class, sessionId); em.remove(si); call the above lines in a transactional context. its done. -- View this message in context:

Re: [rules-users] How to remove a persisted session from the database ?

2010-09-15 Thread Gustavo Tenrreiro
Yeah thanks ! I had figured it out, but how do you get your transactional context ? I ended up doing the following, in case someone else needs to do the same: within a class... public void deleteSession(StatefulKnowledgeSession session) { initTransactionManager();

[rules-users] How to remove a persisted session from the database ?

2010-09-14 Thread Gustavo Tenrreiro
Hi, I am using persistence, and since the sessions don't seem to have a standard way of getting removed from the database when they are not needed anymore, I am wondering how to do that. I am using JPA but if I call : em.remove(someSessionInfo); where em is the JPA EntityManager, that does not