diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Priority.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Priority.java
new file mode 100644
index 0000000..3fdd48d
--- /dev/null
+++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Priority.java
@@ -0,0 +1,66 @@
+/*
+ * Demoiselle Framework
+ * Copyright (C) 2010 SERPRO
+ * ----------------------------------------------------------------------------
+ * This file is part of Demoiselle Framework.
+ *
+ * Demoiselle Framework is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License version 3
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License version 3
+ * along with this program; if not, see
* public class Finalizer { * - * @Shutdown(priority = 5) + * @Shutdown + * @Priority(5) * public void finalize() { * ... * } @@ -60,6 +61,7 @@ import java.lang.annotation.Target; * * * + * ** * @@ -75,17 +77,29 @@ public @interface Shutdown { /** * Most important priority value. + * + * @deprecated + * @see Priority */ + @Deprecated public static int MAX_PRIORITY = Integer.MIN_VALUE; /** * Less important priority value. + * + * @deprecated + * @see Priority */ + @Deprecated public static int MIN_PRIORITY = Integer.MAX_VALUE; /** * An integer value defines method execution order (i.e., priority). + * + * @deprecated + * @see Priority */ + @Deprecated int priority() default MIN_PRIORITY; } diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Startup.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Startup.java index 5dc87ed..e24625f 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Startup.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/annotation/Startup.java @@ -52,13 +52,16 @@ import java.lang.annotation.Target; *
* public class Initializer { * - * @Startup(priority = 1) + * @Startup + * @Priority(1) * public void initialize() { * ... * } * } * * + * + * ** * @@ -74,17 +77,29 @@ public @interface Startup { /** * Most important priority value. + * + * @deprecated + * @see Priority */ + @Deprecated public static int MAX_PRIORITY = Integer.MIN_VALUE; /** * Less important priority value. + * + * @deprecated + * @see Priority */ + @Deprecated public static int MIN_PRIORITY = Integer.MAX_VALUE; /** * An integer value defines method execution order (i.e., priority). + * + * @deprecated + * @see Priority */ + @Deprecated int priority() default MIN_PRIORITY; } diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/ApplicationLifecycleEvent.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/ApplicationLifecycleEvent.java new file mode 100644 index 0000000..537249c --- /dev/null +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/ApplicationLifecycleEvent.java @@ -0,0 +1,6 @@ +package br.gov.frameworkdemoiselle.internal.bootstrap; + +public interface ApplicationLifecycleEvent { + + boolean removeProcessors(); +} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/AsbratctLifecycleBootstrap.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/AsbratctLifecycleBootstrap.java new file mode 100644 index 0000000..5865c9a --- /dev/null +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/AsbratctLifecycleBootstrap.java @@ -0,0 +1,158 @@ +/* + * Demoiselle Framework + * Copyright (C) 2010 SERPRO + * ---------------------------------------------------------------------------- + * This file is part of Demoiselle Framework. + * + * Demoiselle Framework is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License version 3 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License version 3 + * along with this program; if not, see