deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Porter <lightguard...@gmail.com>
Subject Re: Need a @Typed for custom project stage (documentation and test class issue)
Date Tue, 31 Jan 2012 21:46:00 GMT
Okay, just seemed like a good place to start using our own features.

On Tue, Jan 31, 2012 at 14:39, Gerhard Petracek
<gerhard.petracek@gmail.com>wrote:

> hi jason,
>
> since it's just a technical issue it doesn't look that nice if we suggest
> to annotate custom project-stages with @Exclude
> (basically you are right - it would work - but it doesn't look that nice
> imo)
>
> regards,
> gerhard
>
>
>
> 2012/1/31 Jason Porter <lightguard.jp@gmail.com>
>
> > Seems like a good time for us to kick the tires on @Exclude.
> >
> > On Tue, Jan 31, 2012 at 07:30, Gerhard Petracek
> > <gerhard.petracek@gmail.com>wrote:
> >
> > > hi rudy,
> > >
> > > thx! imo it's the right time to restart this discussion.
> > >
> > > mark prefers to use @Typed() for custom project-stages (@mark please
> > > correct me if i mix it up with a different discussion).
> > > but i don't really see the need for it. we just can veto project-stage
> > > classes, because the result is the same and users don't have to care
> > > about @Typed()
> > >
> > > regards,
> > > gerhard
> > >
> > >
> > >
> > > 2012/1/31 Rudy De Busscher <rdebusscher@gmail.com>
> > >
> > > > Hi all,
> > > >
> > > > During testing of the forge deltaspike plugin, I came across a small
> > > > documentation problem (I hope it is that) regarding the custom
> project
> > > > stage.
> > > >
> > > > When the plugin generates the Java class as this
> > > >
> > > > public class CustomProjectStageHolder implements ProjectStageHolder
> > > > {
> > > >    public static final class CustomProjectStage extends ProjectStage
> > > >    {
> > > >        private static final long serialVersionUID =
> > 1029094387976167179L;
> > > >    }
> > > >
> > > >    public static final CustomProjectStage CustomProjectStage = new
> > > > CustomProjectStage();
> > > > }
> > > >
> > > > and puts the correct value in the
> > > >
> > > >
> > >
> >
> META-INF/services/org.apache.deltaspike.core.api.projectstage.ProjectStageHolder.
> > > >
> > > > I get the following WELD error when starting up the application:
> > > (Glassfish
> > > > 3.1.1, Glassfish 3.1.2 b19 [promoted build], JBoss 7.1.0.CR1b]
> > > >
> > > > *WELD-001409 Ambiguous dependencies for type [ProjectStage] with
> > > qualifiers
> > > > [@Default] at injection point [[field] @Inject private
> > > > org.apache.deltaspike.demo.HelloWorld.projectStage]. Possible
> > > dependencies
> > > > [[Producer Method [ProjectStage] with qualifiers [@Any @Default]
> > declared
> > > > as [[method] @Produces @Dependent @Default public
> > > >
> > org.apache.deltaspike.core.util.ProjectStageProducer.getProjectStage()],
> > > > Producer Method [ProjectStage] with qualifiers [@Any @Default]
> declared
> > > as
> > > > [[method] @Produces @Dependent @Default public
> > > >
> > org.apache.deltaspike.core.util.ProjectStageProducer.getProjectStage()],
> > > > Managed Bean [class
> > > > be.rubus.forge.deltaspike.test.projectstage.RudyHolder$Rudy] with
> > > > qualifiers [@Any @Default]]*
> > > >
> > > > The error goes away by annotating the CustomProjectStage with @Typed.
> > > >
> > > > - Looking at the default project stages defined in class
> > > > org.apache.deltaspike.core.api.projectstage.ProjectStage, they are
> also
> > > > excluded as CDI.
> > > > - Within the core-impl tests, there is also a custom project stage
> > > >
> > > >
> > >
> >
> (org.apache.deltaspike.test.core.api.projectstage.TestProjectStages.CustomProjectStage)
> > > > but without the @Typed(). But it seems never used in an integration
> > test.
> > > >  So that's why there is no problem with it.
> > > >
> > > > So do you all agree that
> > > > 1) I adopt the documentation in adding the @Typed annotation
> > > > 2) Add the @Typed annotation at the test
> > > > class
> > > >
> > >
> >
> org.apache.deltaspike.test.core.api.projectstage.TestProjectStages.CustomProjectStage.
> > > >  Although not needed, it is good for uniformity.
> > > >
> > > > Regards
> > > > Rudy
> > > >
> > > > --
> > > > Rudy De Busscher
> > > > http://www.c4j.be
> > > >
> > >
> >
> >
> >
> > --
> > Jason Porter
> > http://lightguard-jp.blogspot.com
> > http://twitter.com/lightguardjp
> >
> > Software Engineer
> > Open Source Advocate
> > Author of Seam Catch - Next Generation Java Exception Handling
> >
> > PGP key id: 926CCFF5
> > PGP key available at: keyserver.net, pgp.mit.edu
> >
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message