On 7/21/05, Danilo Tommasina <[EMAIL PROTECTED]> wrote:
> uh, maybe I caused some confusion, in the link that you posted, the 
> HttpSession is beeing used in a (Servlet API) Filter and I usually include 
> this stuff into
> presentation-tier which is probably not really correct and 'may' be discussed 
> to death if it is or it is not. ;) For this reason I was stating some bla, bla
> about design rules und such stuff, however since I am using myself this kind 
> of code, well the statements I made may not be really consistent to what other
> people understand under presentation-tier, so sorry for the troubles... :D
> 
> Maybe I should say it so: What scares me is thinking at OJB having methods 
> that take Servlet API objects as arguments, this I think is what OJB should 
> avoid to
> do, such stuff would create hard links to the Servlet API. Of course you 
> could use reflection to avoid this, but... ouch, this is even more scary and 
> I would
> call this a 'dirty hack' ;)

Err, not exactly. The idea is to define some sort of DataStorage
interface against OJB would work in the MetadataManager and the other
places where right now ThreadLocal is used. The default implementation
of this interface would be using ThreadLocal so that
functionality-wise nothing would change. However, an alternative
implementation could use the ServletContext or the Session instead for
web applications (no use using this one for standalone apps) which
would be ok as OJB would be used in a web context anyway.
 
> Again if it is possible to avoid this, it would be great, OJB configuration 
> is already quite complexand  adding more levels of configuration and/or 'code 
> paths'
> for different deployment environments, may increase the complexity to an 
> 'uncomfortable' level. However this is just my point of view, you are the 
> developers
> after all, I am just a user. :D

well, in general we follow the rule of 'useful defaults, fine-grained
configurability' meaning that for the average usage as few things as
possible should have to be changed but if need arises, then the
ability to plug in different implementations should be provided. And
IMO for web apps the servlet context is a more useful storage than
threadlocal.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to