I forgot to mention to you all, if you are running TCK tests in trunk,
you must use a JBoss AS 5.2 snapshot newer than around 15th September
(after this date, AS 5.2 included Bean Validation support).
For reference when updating TCK tests, etc, here's a list of the section
changes between versions 1.0.20090625 and PFD2 of the spec.
PFD2 section changes
Old Section New section
3.1.4 Bean constructors 3.7
18.104.22.168 Declaring a bean constructor 3.7.1
22.214.171.124 Bean constructor parameters 3.7.2
3.1.5 Specializing a managed bean 3.1.4
3.1.6 Default name for a managed bean 3.1.5
3.7 Injected fields 3.8
3.7.1 Declaring an injected field 3.8.1
3.8 Initializer methods 3.9
3.8.1 Declaring an initializer method 3.9.1
3.8.2 Initializer method parameters 3.9.2
3.9 The default binding at injection points 3.10 The default
qualifier at injection points
- 3.11 The qualifier
@Named at injection points
3.10 Beans with the @New binding 3.12 Beans with the
4.3.2 Most specialized enabled bean for a bean (removed)
4.3.3 Inconsistent specialization (removed)
5.2 Policy enablement 5.2 Alternative
selected alternatives for a
5.2.2 Enabled and
6.4.3 Dependent pseudo-scope and Unified EL (removed)
11.3.6 Obtaining the most specialized bean (removed)
11.3.7 Obtaining a passivation capable bean by 11.3.6
11.3.8 Resolving an ambiguous dependency 11.3.7
11.3.9 Validating a dependency 11.3.8
11.3.10 Firing an event 11.3.9
11.3.11 Observer method resolution 11.3.10
11.3.12 Decorator resolution 11.3.11
11.3.13 Interceptor resolution 11.3.12
11.3.14 Determining if an annotation is a binding 11.3.13
type, scope type, stereotype or
interceptor binding type
11.3.15 Obtaining the active Context for a scope 11.3.14
11.3.16 Obtaining the ELResolver 11.3.15
- 11.3.16 Wrapping a
Unified EL ExpressionFactory
>> I would do this inside the SE bootstrap code, as this is a
>> requirement that is only applicable to the SE case (other container
>> provide a mechanism for this such as the contextInitialized event
>> in Servlet).
> OK fair dos.
>> Are you concerned about portability between CDI implementations or
>> between types of app (SE -> Servlet -> EE)?
> I was thinking not so much of portability of code between the types
> of app, more just a single way to do it for all of the types. But I
> can also see how the presence of an alternative to those standard
> ways of doing things could be considered a bad thing.
> Portability between implementations would be ideal, but I'm not too
> bothered about it if you guys aren't. Also I think the aim is still
> that Web Beans SE itself will be portable in this sense anyway.
>> On 23 Sep 2009, at 05:47, Peter Royle wrote:
>>> So does anyone think it might be generally useful to add a simple
>>> lifecycle event which fires once the contexts are active and can be
>>> observed by regular CDI beans? This would simplify the use case of
>>> performing application-specific, non-cdi-extending startup events
>>> _NOT_ things like registering new kinds of beans or injection
>>> while allowing the observing method to take full advantage of all
>>> features of CDI.
>>> Also, obviously, it would give the SE module its portable startup
>>> Or is there already a reason why this isn't such a good idea?
>>> On Tue, 2009-09-22 at 20:53 -0400, Gavin King wrote:
>>>> On Tue, Sep 22, 2009 at 8:38 PM, Peter Royle
>>>> <howardmoon(a)screamingcoder.com> wrote:
>>>>> Related question: How is application code written for CDI
>>>>> supposed to
>>>>> execute code on startup - does it have to register an Extension
>>>>> execute without any contexts/injection?
>>>> Yes, the solution for startup-time instantiation of objects is to
>>>> them Extensions.
>>> webbeans-dev mailing list
I've come across a bit of a problem with the PFD2 from the SE module
perspective. There's no longer any suitable built-in event which can
be used to kick off the SE application, due to there not being any
lifecycle events which fire while the contexts are active. We used to
use @Observes @Deployed Manager, and by doing so the observer method
was executed inside a fully injected bean with all contexts available.
In PFD2 we have the AfterDeploymentValidation event, but it gets fired
'before creating contexts and processing requests'. Then the next
lifecycle event after that is BeforeShutdown.
The simplest alternative I can think of is a custom event introduced
for WebBeans SE specifically, thrown by the SE module itself, which
isn't ideal because we lose that portability.
Any thoughts or advice?
Related question: How is application code written for CDI supposed to
execute code on startup - does it have to register an Extension and
execute without any contexts/injection?
I'm noticing that I can't successfully observe the
AfterDeploymentValidation event which is a key requirement for the SE
module. I'm not sure if this is a problem with the SE module, or with
WebBeans in general. I've tried stepping through the code and it seems
like the observers are registered, but then when the event is fired
it's like there are no observers to notify. Custom events work fine
Does anyone know if built-in events should be working or of any
existing tests or sample apps I could try out to verify if the problem
lies with WB core?
Alternatively, would anyone be able to take a quick look at my
specific problem for me by doing this:
svn co https://svn.jboss.org/repos/webbeans/extensions/trunk/se
mvn clean install
You'll notice the resulting test failure:
Thanks in advance to anyone that can help.
I want to be able to observe the BeforeBeanDiscovery event, and am
unsure how to get around the obvious bootstrap problem. I'm thinking
I'll need to programatically register the observing bean (before
bootstrap.startInitialization() get's called), but I'm unsure how to
do that. Alternatively is there a better idiom for observing
quoted from the OWB dev list:
>From my point of view this is a conceptual mismatch: One spec uses the
annotation just for binding specific beans to a literal name, the other one
uses it for differentiate between multiple beans.
Even this should be no immediate issue for JSR 299's typesafe resolution
mechanism, if a single bean is further qualified with specific @Named name,
I do not feel well, if people are going to use this annotation as a
qualifying one like @Named("stage_test") on multiple beans. The EL namespace
gets polluted with unresolvable names and developers become potentially
confused by the ambiguous usage of the annotation.
In brief: Identifiers (like EL names or Spring bean IDs) does not feel like
being qualifiers (e.g. @Asynchronous) from my point of view.
> Reusing it for defining the EL name does make sense semantically to
> me. In general qualifiers are used in resolution, in the "by name"
> case, we have a special qualifier.
My question was retorical. I don't get how it is a qualifier. It violates
the whole type-safety approach. Having an EL name is orthogonal to having a
- Dan Allen
Sent from my Android-powered G1 phone:
An open platform for carriers, developers
On Sep 4, 2009 1:48 PM, "Mark Struberg" <struberg(a)yahoo.de> wrote:
--- On Fri, 9/4/09, Dan Allen <dan.j.allen(a)gmail.com> wrote:
> From: Dan Allen <dan.j.allen(a)gmail.com>
> Subject: Re: [webbeans-dev] Is @Named qualifier?
> To: "Mark Struberg" <struberg(a)yahoo.de>
> Cc: "Takeshi Kondo" <takeshi.kondo(a)gmail.com>,
> Date: Friday, September 4, 2009, 6:36 PM
> @Named is a qualifier in 330? That makes > absolutely no sense. I think
that linkage should be > s...
Moving to webbeans-dev. Sorry for the delay in replying...
On 11 Aug 2009, at 16:19, Kenneth Saks wrote:
> I need to implement the java:global lookup logic defined by the EE 6
> Managed Bean spec for the 299-enabled case. My starting point is
> a bean class. What API/SPI(s) do I call to create a non-contextual
> managed bean instance that has been injected(with both 299-style and
> EE-style dependencies) and has had post-construct called?
I wrote this generic FAQ http://www.seamframework.org/Documentation/HowDoIDoNoncontextualInjection...
which describes the process you need to follow.
The only difference is that currently inject() doesn't inject any EE
style dependencies. This is a bug in the RI. https://jira.jboss.org/jira/browse/WBRI-352