Well, request, session and conversation DO make sense in at least _some_ SE apps. It's only a matter of the interpretation.
Especially if your app is multithreaded and you e.g. work with JPA or other single-threaded-only resources. In that case you could use the @RequestScoped to provide exactly that. A 'conversation' or 'session' might also be handy in case of parallel batch processing for example. Of course, they are _not_ Web Requests, Session, etc - but they are nonetheless useful. LieGrue, strub ----- Original Message ----- > From: Harald Wellmann <[email protected]> > To: [email protected] > Cc: > Sent: Friday, June 22, 2012 8:47 PM > Subject: Re: Booting in Java SE? > > Am 22.06.2012 20:30, schrieb Mark Struberg: >> It's not only about starting the container itself. You also need to > control the Contexts ;) >> > > Do I? I'd expect the container SE adapter to take care of that... > > Weld SE automatically starts the application context, AFAIK. And request, > session and conversation contexts don't make sense in Java SE, anyway. > >> PS: it's out of question that our documentation currently is not our > strongest point :D > > So it seems this list isn't busy enough, or else you'd save time writing > docs instead of answering emails ;-) > > >> WebBeansContext.currentInstance() is an INTERNAL method > > But it doesn't say so... > >> cdictrl shields all this away from your customer project! > > Oh, it's not about a customer project. I'm currently experimenting with > CDI + OSGi, and that will require some low-level classloader wrestling and > other > nasty stuff anyway. > > Best regards, > Harald >
