domain scoped is a bit of a hidden header scoped feature, where header name == Host. (that may be a tomcat specific thing, but seems to be pretty consistent in the servlet spec for the implementation of getServerName).
The one big usecase I see with domain scoped is being able to scope beans based on tenants in the system. Suppose you had URLs like tenant1.mysaasapp.com tenant2.mysaasapp.com Based on the incoming URL, I can scope objects to the actual tenant domain within my SaaS application. Pretty neat idea. As far as header goes, I can think of use cases within feature toggles, and impersonation support that may be useful. Even localization support being to drive i18n configuration on the backend based on the Accept-Language header. John On Sat, Mar 26, 2016 at 2:37 PM Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > MethodScoped looks cool! > Is there a real world usecase for DomainScoped and HeaderScoped? > > 2016-03-26 16:50 GMT+01:00 Daniel Cunha <daniels...@gmail.com>: > > > Cool! +1 > > > > On Sat, Mar 26, 2016 at 12:19 PM, John D. Ament <johndam...@apache.org> > > wrote: > > > > > I have a backport of microscoped for Java 6 locally, I'm currently > > expanded > > > the tests to be able to target other containers (to make sure there's > no > > > compatibility issues). > > > > > > I created a ticket in our JIRA as well - > > > https://issues.apache.org/jira/browse/DELTASPIKE-1104 > > > > > > John > > > > > > On Fri, Mar 25, 2016 at 8:03 AM John D. Ament <johndam...@apache.org> > > > wrote: > > > > > > > Actually, the map functions aren't the problem. Those were easy to > cut > > > > over. The problem is the new ThreadLocal behavior in Java 8 that > just > > > > doesn't have an equivalent in older JDKs. > > > > > > > > I think I'm almost done, will raise a PR to prep it for inclusion. > > > > > > > > I do not envy the road warriors, mind you. > > > > > > > > John > > > > > > > > > > > > On Thu, Mar 24, 2016 at 11:05 PM David Blevins < > > david.blev...@gmail.com> > > > > wrote: > > > > > > > >> The code is significantly harder without the Java 8 computeIfAbsent > on > > > >> hashmap. > > > >> > > > >> In terms of time, I wish I had more to give. I was on the road 49 > out > > > of > > > >> 52 weeks last year and this year is no different. > > > >> > > > >> I've pretty much sacrificed every bit of time and work-life balance > > > >> possible in hopes to produce more for others. It's a work in > > > progress.... > > > >> > > > >> > > > >> -David > > > >> > > > >> > > > >> On Thu, Mar 24, 2016 at 6:47 PM, John D. Ament < > johndam...@apache.org > > > > > > >> wrote: > > > >> > > > >> > I don't mind looking at it a bit further. You're the only > > contributor > > > >> and > > > >> > you're a long standing ASF guy. Of course one big issue is that > > > you're > > > >> > using a modern, supported JVM version. We're still on the archaic > > 1.6 > > > >> JDK. > > > >> > > > > >> > One thing to point out, your license is already assigning > ownership > > to > > > >> the > > > >> > ASF - > > > >> > > > > >> > > > > >> > > > > > > https://github.com/tomitribe/microscoped/blob/master/microscoped-timer/pom.xml#L3 > > > >> > not > > > >> > sure if that's intentional or not. > > > >> > > > > >> > Here's a reference to what it looks like when its not licensed to > > the > > > >> ASF. > > > >> > https://github.com/johnament/hammock/blob/master/pom.xml#L1 > > > >> > > > > >> > The big difference - licensed under vs licensed to. > > > >> > > > > >> > John > > > >> > > > > >> > On Thu, Mar 24, 2016 at 9:39 PM David Blevins < > > > david.blev...@gmail.com> > > > >> > wrote: > > > >> > > > > >> > > John had asked on twitter if this code could be donated. > > > Absolutely. > > > >> > > > > > >> > > https://tomitribe.io/projects/microscoped < > > > >> > > https://tomitribe.io/projects/microscoped> > > > >> > > > > > >> > > I feel bad writing a “come and get it” email. 90% of the code > was > > > >> > written > > > >> > > between 12am and 5am the night before the related JavaOne talk. > > Not > > > by > > > >> > > choice. :) > > > >> > > > > > >> > > Is there anyone with time to help? > > > >> > > > > > >> > > > > > >> > > -- > > > >> > > David Blevins > > > >> > > http://twitter.com/dblevins > > > >> > > http://www.tomitribe.com > > > >> > > > > > >> > > > > > >> > > > > >> > > > > > > > > > > > > > > > -- > > Daniel Cunha > > https://twitter.com/dvlc_ > > http://www.tomitribe.com > > http://www.tomitribe.io > > >