I am using jackrabbit and connect to repository using my custom class GetRepositoryConnection which has a method getSession which returns jackrabbit session.
I am parsing the repository using this session object.
Currently I have 3 differnt classes which needs session object to get the data as per requirement and in each class I am using :
GetRepositoryConnection g = new GetRepositoryConnection(); session = g.getConnection()
It feels awkward to craete new session object in each. I will convert my project in swings framewok afterwards.How should I maintain the session object
I was thinking of saving the session object in application.setAttribute and getting everywhere.Is it a good approach..
I know that it is Springs forum . I am trying to say that connecting to repository is done and currently I am making my project in jsp/servlet.I just wanna say that I will convert my project into Spring Framework. I was interested in how to maintain the session object(Which approach to follow which will be benificial when I will be converting in Springs). If it sounds riduculous, I am sorry because I have not studied spring yet and thus might be asking such a stupid question(Because my boss asked me to continue in jsp/servlets, afterwards we will convert in spring)