Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maintaining a session object

 
vineet kumar chaudhry
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Java Lovers

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..

Any help would be appreciated
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The framework is called Spring.

Also, this forum is for Spring questions, your question is about JackRabbit, which is not Spring.

So this is the incorrect forum to post your question. I am not sure we even have a forum for JackRabbit.

I am going to move this to the Other Frameworks forum.

Thanks

Mark
 
vineet kumar chaudhry
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Swings was typo

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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic