RE: Again session...
Thelmo Loisio <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
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