And "manager.save();" has a call to the JCR-session save?

Are you only having one sesison object or are there perhaps multiple sessions 
and the call "session.save()" goes to a different session which does not have 
your added node in his transient cache? Are there perhaps multiple 
"ObjectContentManager" objects, so that they refer to different sessions?

Because you can see the inserted nodes after restart, I think, you close the 
connection to the repository correctly, which means that all sessions are 
saved/flushed, and then you see your added nodes after restart. So I think that 
the JCR-session is not correctly "saved".




-----Ursprüngliche Nachricht-----
Von: pradeepkudale [mailto:[email protected]] 
Gesendet: Freitag, 30. April 2010 15:39
An: [email protected]
Betreff: Re: AW: OCM : Not able to get the list of nodes added in current 
session


Thanks for your reply,

       I am having below functions in GenericJcrDaoImpl.

      
    @SuppressWarnings("unchecked")
        public T execute(JcrMappingCallback callback) throws 
DataAccessException {
        return (T) jcrMappingTemplate.execute(callback);
    }
    
        public T save(final T node) {           
                execute(new JcrMappingCallback() {
                        public Object doInJcrMapping(ObjectContentManager 
manager) throws
JcrMappingException {
                                manager.insert(node);
                                manager.save();                         
                                return null;
                        }
                });             
                return node;
        }


  and i am extending GenericJcrDaoImpl in my JcrFileNodeDaoImpl

 public class JcrFileNodeDaoImpl extends GenericJcrDaoImpl<JcrFileNode,
String> implements JcrFileNodeDao {

}

so it automatically calls the save method in GenericJcrDaoImpl.



-----
Regards
Pradeep Kudale
-- 
View this message in context: 
http://jackrabbit.510166.n4.nabble.com/OCM-Not-able-to-get-the-list-of-nodes-added-in-current-session-tp2076858p2076930.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to