[seam-dev] How to store data in contexts

Dan Allen dan.j.allen at gmail.com
Tue May 19 12:57:42 EDT 2009


On Tue, May 19, 2009 at 12:53 PM, Pete Muir <pmuir at redhat.com> wrote:

>
> On 15 May 2009, at 17:26, Dan Allen wrote:
>
>  On Tue, May 12, 2009 at 5:26 AM, Nicklas Karlsson <nickarls at gmail.com>
>> wrote:
>> Seam could have a "hacks" module that would add the binding type and
>> producer method ;-)
>>
>> Maybe 10 beers in you can convince me, but I don't see using the HTTP
>> contexts as hacks. To me, they have been around for 10+ years and software
>> uses them. That is a reality. You walk into any technical manager's office
>> and try to tell them you can't use contexts anymore and they will gladly
>> show you the door and hire some programmer willing to use them. There is
>> software in an ivory tower and there is real life. We are stupid not to
>> offer some way to access these contexts. Can we advocate not to .... sure,
>> fine, but I still think it is stupid to pretend they don't exist.
>>
>
> Dan, stop using crazy FUD ;-)
>
> 1) JCDI provides a good way to use contextual data, through beans. The API
> is neat, unified and declarative
> 2) JCDI provides a way to manage the lifecycle of your data in the contexts
> directly should you prefer through Contextual. This isn't recommended
> 3) JCDI doesn't stop you accessing the contexts directly by accessing the
> request, session etc. One of the modules Seam should supply is manager
> objects for the HttpSession, ServletContext and HttpRequest.
>
> Anyway, Matt's suggestion of exposing the attribute maps from these as a
> Map is reasonably neat, and I guess we could do that - some abstraction is
> definitely not a good idea though.


I don't get how that is different from what I am suggesting. So I of course
agree.


>
>
> Maybe make something in sandbox to start with, and see how popular it is?


Excellent my thought. Let's just sandbox it, see where it goes.

-Dan

-- 
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan

NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters.  Please don't hesitate to resend a message if
you feel that it did not reach my attention.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20090519/44d8e89f/attachment.html 


More information about the seam-dev mailing list