[cdi-dev] Successfully using @Priority

Michael Remijan mjremijan at yahoo.com
Wed May 13 08:18:18 EDT 2015


I wanted to let te team know that I've successfully incorporated the new @Priority annotation into my application and it seems to be working great. My application needs to startup in a particular order and prior to the @Priority annotation I had to create a class whose only job was this prioritization.  I never liked this solution.  The @Priority annotation is a lot nicer.  
Something I'd like to see in the documentation. The event the application is observing is my StartupConfigurationEvent class.  Along side this class I created a StartupConfigurationPriorty class with a public static final int values in it which define the priority of the event processing.  It's then very easy to find not only the classes observing that event but it also self documents the priorty without having to dig into each class. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150513/392f9529/attachment.html 


More information about the cdi-dev mailing list