users@javaee-spec.java.net

[javaee-spec users] [jsr342-experts] Re: _at_Priority

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Mon, 10 Dec 2012 15:10:08 -0800

Pete Muir wrote on 12/10/12 02:41:
> Bill, as discussed I think we should sort out the priority ranges to be
> blocks of 1000 each - as multiple people pointed out to me, we aren't running
> out of integers any time soon!

Yes, I accidentally sent out an older version of the proposal, before I
made that change.

> Also, as Emmanuel has proposed, it's worth discussing whether we should have
> an enum or group of statics on a class somewhere that define the values used
> by Java EE specs, so you can do Interceptors.Validation + 100 (or something
> like that) as your priority.

That's an interesting idea.

Let's look at the new transactional interceptor as an example...

We will define a new javax.transaction.Transactional interceptor binding
annotation, but we won't define the name of the interceptor class that
handles this annotation. We could define a static int
javax.transaction.Transactional.PRIORITY = 123. Would it be weird for
that static int to be on the annotation class?

Otherwise, there doesn't really seem to be any obvious place to put it.

I *definitely* don't want to have a central class that has priorities for
lots of interceptors in other specs.