Last week the JCP posted the CDI 1.1 public review draft. This draft continues to incrementally improve the 1.0 spec. We haven't added any major new features, instead we're concentrating on honing 1.0 :-)

The CDI class, which provides programmatic access to CDI facilities from outside a managed bean

The CDI 1.0 specification clearly states that only beans whose bean class is accessible (using standard classloader visibility rules) can be injected into another bean. For example, if you have a bean A in WAR, assuming standard Java EE classloader structure, it wouldn't be available for injection in bean B, in an EJB module. This generally makes sense, as the type is not visible either.

CDI also offers two options to replace bean implementations transparently, without explicitly selecting that implementation (either by type or using a qualifier) - alternatives and specialization. In this case, it is less clear that the bean class of the specializing bean, or the bean class selected alternative, must be visible.

The CDI EG is still debating this issue, including whether to offer a backwards incompatible mode here.

CDI implementations have not consistently shared @ApplicationScoped beans across all modules of an EAR. This issue heavily relates to Bean visibility. The CDI 1.1 specification will clearly state how @ApplicationScoped are shared.

A commonly requested feature is for the application to be able to do some work once the application has started but before it starts servicing requests originating remotely. Currently CDI 1.1 defines a @Initialized(ApplicationScoped.class) which is called when the application context starts, but we are investigating whether this can be extended to provide a more general startup event.

If we define such an event, we need to allow custom contexts to activate themselves whilst it is executing, however this is likely beyond the scope of CDI 1.1 and will likely be addressed in CDI 2.0.

CDI 1.1 adds @WithAnnotations which allows an extension observing ProcessAnnotatedType to filter which types it sees. We would like to provide such functionality for all container lifecycle event observers, but there are some interesting things to consider, including whether it would be better to filter on qualifiers for later events. CDI 1.1 may or may not add such support, and we are looking for feedback on this.

CDI 1.0 requires array valued members of qualifiers to be annotated with @Nonbinding, excluding them from the resolution process. The JDK defines that annotation equality for array valued members should use Arrays.equals(), which requires two identical arrays (equal values, in the same order) in order to return true.

We feel that to make array valued members of qualifiers useful, we need to offer a pluggable strategy for checking equality of arrays, as often it would be desirable to consider two arrays with the same values, in any order, as equal. We intend to add this for CDI 1.1.

CDI 1.0 requires the type used for observer resolution to be based on the runtime type of the event object. Unfortunately, the JDK erases generic type information about objects that we need to allow firing of many events with parameterized types. CDI 1.0 also completely ignores the generic type of the injected event object, which does typically contain the needed type information. We therefore intend to change the event observer resolution rules to allow the generic type of the event object to be taken into account if the runtime event object does not contain sufficient information.

Note that this may seem like a backwards incompatible change, however CDI 1.0 is essentially unimplementable today - examples in the spec do not work as described.

I am implementing rich domain model where domain objects are very smart - they may inject other services or fire events.

JPA entities IMO do not fit for this role because 1) there is no CDI, 2) entity lifecycle does not always match to business object lifecycle, 3) it is not always possible to map domain to entities, 4) database may not be the only data source. So instead of using a list of entities I want to use a list of CDI beans. And I want to have injection, interceptors and events in the implementation. In simplified view - an entity is wrapped with a CDI bean, which may do much more than the entity.

I've got your point about creating several instances of contextual beans, needed some time to let the idea draw. And I totally agree with you, there should be no reason to create several instances of contextual beans.

And thanks for the tip, I didn't realise that @Inject Instance (without @New) creates a new instance of dependent bean each time get() is called. I'll try that.

Now I have the whole picture and I agree that @New may be deprecated as it allows creating multiple instances of contextual beans.

One place where CDI falls short is an inability to rebind session scoped beans to a new session. It is quite popular to reassign http client with a new session id upon successful authentication in order to prevent session fixation attacks. Unfortunately servlet API (up to proposed 3.1) lacks some Session.replaceSession() method that would effectively replace the session id only - one has to invalidate current session (thus flush all session-scoped beans) and obtain a new one. Some servlet containers (Tomcat, AFAICT) are capable of regenerating a new session id and resending it to client leaving the backing session intact (*AuthenticatorValve) but it works only for servlet API compliant {basic,form,digest,ssl,spnego}-based authentication and is by no means applicable to some custom authentication methods grown by third-paty frameworks that do not authenticate against defined realms but do their grunt work themselves (Shiro).

In fact it is not CDI shortcoming, but rather an inconsistence where Servlet API and CDI do not play nice.

The industrial revolution in the twentieth century made a mass change in each and every industry in the world. The industry of civil engineering was no exception. There have been huge changes in the style and outlook of the people towards the construction business. Pool Deck Resurfacing

Simply, admirable what you have done here. It is pleasing to look Impact Windows Lake Worth you express from the heart and your clarity on this significant content can be easily looked. Remarkable post and will look forward to your future update.

Filmmaker Ravine Change , Datascrip said Reedlike soul sophistication and hybrid ink method printer, gives author evaluate for its users to play the situation illustrator wild and sensual , if you need the driver printer, you can check at Download driver printer
They all go together with Epsons built piezo-electric subject proverbial as PrecisionCore that, per the companys spokespersons, doubles photograph grade whereas doubling if you need the driver printer, you can check at free printer drivers
From the leaked it , mentioned the Samsung Collection Set 2 performed with sib SIM , 4.5 in. WVGA direct ( 480x800 pixels ) and a quad-core processor 1.2 GHz , quicker than their predecessors that the if you need the gadgets info, you can check at smartphone specifications
Request the exclusive angle , not notable manifestly his sincere write , yet by worldcarfans , weekday ( seventeen / 04 ) , if you need the last info about car automotive, you can check at car photos
Canon Pixma Mp560 Driver For Windows, Mac OS X, and Linux Download, but let me to review the printer first. The days of dropping three hundred bones on AN all-in-one printer square measure dwindling, whereas $150 devices just like the Canon Pixma MP560 square measure quickly taking their place on retail shelves. The MP560 appearance nice ANd offers helpful options like an auto-document if you need the last info update about technology, you can check at tips twitter
To any raise human publication caliber, PIXMA MG7570 adopts a 6-color mortal ink scheme with the element of achromatic ink tank to spicery up the vesture sound in B W someone printing, understandably sharing the hatched and shining if you need more info about geophysics, you can check at Download driver printer