RE: Again session...

"Christian Cryder" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Just to clarify - session outside the context of a webapp is scoped to
thread - so anything that accesses the "session" from teh same thread will
get the same session. Different threads get different sessions.

Note also that there's nothing preventing you from creating your own ORs
based on naming convention of your choice - allowing you to share data as
needed across whatever boundaries you'd like (within the JVM of course).

CHristian

----------------------------------------------
Christian Cryder
Internet Architect, ATMReports.com
Project Chair, BarracudaMVC - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Thelmo Loisio
> Sent: Monday, November 17, 2003 1:29 PM
> To: [email protected]
> Subject: RE: [Barracuda] Again session...
>
>
> On Mon, 2003-11-17 at 17:06, Christian Cryder wrote:
> > Couple of comments...
> [..]
> > Advantage of getting the session through ObjectRepository:
> > a) you can get it from anywhere - you don't have to have access to the
> > Req/Resp, or to the EventContext
> > b) the object repository session also works in a non-http environment,
> > like...Test Cases! What this means is you can write your code
> to access stuf
> > from session, and it works whether you are running it in a webapp
> > context, -or- in a standalone environment (like a test case).
>
> Well i can clearly see what you mean but i am experiencing
> problems/issues when using ObjectRepository.getSoftSessionRepository()
> from and object completely outside the Req/Resp and EventContext scope,
> it does not return the correct session.
> Of course the object is part of the same web app simply packaged in a
> different package.
> Probably this is cause by my misused of the OR... i've to study it.
>
> > IMO, this is one of the biggest overall advantages of the whole OR
> > approach - we put all our database connections and
> configuration logic in
> > there, as well as session specific stuff, meaning that our app
> can be coded
> > in one way - and it will run whether its being invoked throught
> the webapp
> > or through the test case.
>
> Anyway i can see this advantages and i wish to use they... as soon as i
> am able to understand it more deeply ;)
>
> --
> Thelmo
>
>
>
> --
> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
> Sponsor:
> Un click e scopri le caratteristiche del partner ideale
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2095&d=17-11
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.