Weld SVN: r4411 - api/trunk/cdi/src/main/java/javax/enterprise/context/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 14:57:24 -0400 (Thu, 29 Oct 2009)
New Revision: 4411
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java
Log:
link
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java 2009-10-29 18:56:56 UTC (rev 4410)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java 2009-10-29 18:57:24 UTC (rev 4411)
@@ -35,6 +35,9 @@
* {@link javax.enterprise.context.spi.CreationalContext} to {@code Contextual.destroy()}
* that it passed to {@code Contextual.create()} when it created the instance.</p>
*
+ * <p>A custom context object may be registered with the container using
+ * {@link javax.enterprise.inject.spi.AfterBeanDiscovery#addContext(Context)}.</p>
+ *
* @author Gavin King
* @author Pete Muir
*/
15 years, 2 months
Weld SVN: r4410 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 14:56:56 -0400 (Thu, 29 Oct 2009)
New Revision: 4410
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
Log:
ups
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 18:52:14 UTC (rev 4409)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 18:56:56 UTC (rev 4410)
@@ -59,9 +59,9 @@
* registering an instance} with the container.</p>
*
* <p>A portable extension may be notified of the existence of an
- * enabled bean or observer method by observing the container
- * lifecycle event type {@link javax.enterprise.inject.spi.ProcessBean}
- * or one of its {@linkplain javax.enterprise.inject.spi.ProcessBean subtypes},
+ * enabled bean by observing the container lifecycle event type
+ * {@link javax.enterprise.inject.spi.ProcessBean} or one of its
+ * {@linkplain javax.enterprise.inject.spi.ProcessBean subtypes},
* or of the existence of an observer method of an enabled bean by
* observing the event type
* {@link javax.enterprise.inject.spi.ProcessObserverMethod}.</p>
15 years, 2 months
Weld SVN: r4409 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 14:52:14 -0400 (Thu, 29 Oct 2009)
New Revision: 4409
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
Log:
much better SPI overview
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-10-29 17:41:57 UTC (rev 4408)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-10-29 18:52:14 UTC (rev 4409)
@@ -22,8 +22,7 @@
* registering the {@link javax.enterprise.inject.spi.Bean} object.
* </p>
* <p>
- * The event object type in the package javax.enterprise.inject.spi depends upon
- * what kind of bean was discovered:
+ * The event object type depends upon what kind of bean was discovered:
* </p>
* <ul>
* <li>For a managed bean with bean class X, the container must raise an event
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 17:41:57 UTC (rev 4408)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 18:52:14 UTC (rev 4409)
@@ -13,6 +13,29 @@
* metadata from some other source</li>
* </ul>
*
+ * <h3>The <tt>BeanManager</tt> object</h3>
+ *
+ * <p>Portable extensions sometimes interact directly with the container
+ * via programmatic API call. The interface
+ * {@link javax.enterprise.inject.spi.BeanManager} provides operations
+ * for obtaining contextual references for beans, along with many other
+ * operations of use to portable extensions.</p>
+ *
+ * <h3>Container lifecycle events</h3>
+ *
+ * <p>During the application initialization process, the container fires
+ * a series of {@linkplain javax.enterprise.event events}, allowing
+ * portable extensions to integrate with the container initialization
+ * process. Observer methods of these events must belong to
+ * {@linkplain javax.enterprise.inject.spi.Extension extensions} declared
+ * in <tt>META-INF/services</tt>.</p>
+ *
+ * <p>Lifecycle events include
+ * {@link javax.enterprise.inject.spi.BeforeBeanDiscovery},
+ * {@link javax.enterprise.inject.spi.AfterBeanDiscovery},
+ * {@link javax.enterprise.inject.spi.AfterDeploymentValidation} and
+ * {@link javax.enterprise.inject.spi.BeforeShutdown}.</p>
+ *
* <h3>Interfaces representing enabled beans</h3>
*
* <p>The interfaces
@@ -24,25 +47,31 @@
* a bean, interceptor, decorator or observer method.</p>
*
* <p>An instance of <tt>Bean</tt> exists for every
- * {@linkplain javax.enterprise.inject enabled bean}. An application
- * or portable extension may add support for new kinds of beans by
- * implementing <tt>Bean</tt> and
+ * {@linkplain javax.enterprise.inject enabled bean}. A portable extension
+ * may add support for new kinds of beans by implementing <tt>Bean</tt> and
* {@linkplain javax.enterprise.inject.spi.AfterBeanDiscovery#addBean(Bean)
- * registering beans} with the container.</p>
+ * registering beans} with the container. An instance of
+ * <tt>ObserverMethod</tt> exists for every
+ * {@linkplain javax.enterprise.event observer method} of every
+ * enabled bean. A portable extension may add observers by implementing
+ * <tt>ObserverMethod</tt> and
+ * {@linkplain javax.enterprise.inject.spi.AfterBeanDiscovery#addObserverMethod(ObserverMethod)
+ * registering an instance} with the container.</p>
*
- * <h3>The <tt>BeanManager</tt> object</h3>
+ * <p>A portable extension may be notified of the existence of an
+ * enabled bean or observer method by observing the container
+ * lifecycle event type {@link javax.enterprise.inject.spi.ProcessBean}
+ * or one of its {@linkplain javax.enterprise.inject.spi.ProcessBean subtypes},
+ * or of the existence of an observer method of an enabled bean by
+ * observing the event type
+ * {@link javax.enterprise.inject.spi.ProcessObserverMethod}.</p>
*
- * <p>Portable extensions sometimes interact directly with the container
- * via programmatic API call. The interface
- * {@link javax.enterprise.inject.spi.BeanManager} provides operations
- * for obtaining contextual references for beans, along with many other
- * operations of use to portable extensions.</p>
- *
* <h3>Alternate metadata sources</h3>
*
* <p>A portable extension may provide an alternative metadata
- * source, such as configuration by XML.
- * {@link javax.enterprise.inject.spi.Annotated}
+ * source, such as configuration by XML.</p>
+ *
+ * <p>{@link javax.enterprise.inject.spi.Annotated}
* and its subtypes allow a portable extension to specify
* metadata that overrides the annotations that exist on a
* bean class. The portable extension is responsible for
@@ -52,15 +81,33 @@
* element types and annotations, instead of directly calling the
* Java Reflection API.</p>
*
- * <h3>Container lifecycle events</h3>
+ * <p>A portable extension provides its metadata to the
+ * container by observing the event
+ * {@link javax.enterprise.inject.spi.ProcessAnnotatedType} and
+ * calling
+ * {@link javax.enterprise.inject.spi.ProcessAnnotatedType#setAnnotatedType(AnnotatedType)}.</p>
*
- * <p>During the application initialization process, the container fires
- * a series of {@linkplain javax.enterprise.event events}, allowing
- * portable extensions to integrate with the container initialization
- * process. Observer methods of these events must belong to
- * {@linkplain javax.enterprise.inject.spi.Extension extensions} declared
- * in <tt>META-INF/services</tt>.</p>
+ * <h3><tt>Producer</tt> and <tt>InjectionTarget</tt></h3>
*
+ * <pr>The interfaces {@link javax.enterprise.inject.spi.Producer} and
+ * {@link javax.enterprise.inject.spi.InjectionTarget} abstract the
+ * basic lifecycle of (contextual or non-contextual) container managed
+ * objects, including instantiation and destruction, dependency injection
+ * and lifecycle callbacks.</p>
+ *
+ * <p>An instance of {@link javax.enterprise.inject.spi.InjectionTarget}
+ * may be obtained using
+ * {@link javax.enterprise.inject.spi.BeanManager#createInjectionTarget(AnnotatedType)},
+ * allowing a portable extension to request these container services for
+ * objects under the control of the portable extension.</p>
+ *
+ * <p>Furthermore, a portable extension may replace the implementation
+ * of {@link javax.enterprise.inject.spi.InjectionTarget} or
+ * {@link javax.enterprise.inject.spi.Producer} used by the container
+ * with its own implementation by observing the events
+ * {@link javax.enterprise.inject.spi.ProcessInjectionTarget} or
+ * {@link javax.enterprise.inject.spi.ProcessProducer}.</p>
+ *
* @see javax.enterprise.inject
* @see javax.enterprise.context.spi
*/
15 years, 2 months
Weld SVN: r4408 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 13:41:57 -0400 (Thu, 29 Oct 2009)
New Revision: 4408
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/InterceptionType.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Interceptor.java
Log:
sync with spec
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/InterceptionType.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/InterceptionType.java 2009-10-29 16:46:50 UTC (rev 4407)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/InterceptionType.java 2009-10-29 17:41:57 UTC (rev 4408)
@@ -18,9 +18,10 @@
package javax.enterprise.inject.spi;
/**
- * Identifies the kind of lifecycle callback or business method
- * interceptor.
+ * <p>Identifies the kind of lifecycle callback, EJB timeout method or
+ * business method interception.</p>
*
+ * @author Gavin King
* @author Pete Muir
*
*/
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Interceptor.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Interceptor.java 2009-10-29 16:46:50 UTC (rev 4407)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Interceptor.java 2009-10-29 17:41:57 UTC (rev 4408)
@@ -43,8 +43,8 @@
public Set<Annotation> getInterceptorBindingTypes();
/**
- * <p>Determines if the interceptor intercepts callbacks or business methods of
- * the given type.</p>
+ * <p>Determines if the interceptor intercepts the specified
+ * {@linkplain InterceptionType kind of lifecycle callback or method invocation}.</p>
*
* @param type the type of interception
* @return returns <tt>true</tt> if the interceptor intercepts callbacks
@@ -53,8 +53,8 @@
public boolean intercepts(InterceptionType type);
/**
- * <p>Invokes the specified kind of lifecycle callback or business method upon the
- * given interceptor instance.</p>
+ * <p>Invokes the specified {@linkplain InterceptionType kind of lifecycle
+ * callback or method invocation interception} upon the given interceptor instance.</p>
*
* @param type the interception type
* @param instance the interceptor instance to invoke
15 years, 2 months
Weld SVN: r4407 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-10-29 12:46:50 -0400 (Thu, 29 Oct 2009)
New Revision: 4407
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
Log:
Linked failing tests to JIRA issues
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-10-29 16:38:30 UTC (rev 4406)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-10-29 16:46:50 UTC (rev 4407)
@@ -65,7 +65,7 @@
@SpecAssertion(section = "11.5.6", id = "aac"),
@SpecAssertion(section = "11.5.6", id = "abc"),
@SpecAssertion(section = "12.3", id = "de")})
- //WELD-204
+ // WELDINT-22
public void testProcessInjectionTargetEventFiredForServletListener()
{
assert ProcessInjectionTargetObserver.getListenerEvent() != null;
@@ -88,7 +88,7 @@
@SpecAssertion(section = "11.5.6", id = "aae"),
@SpecAssertion(section = "11.5.6", id = "abe"),
@SpecAssertion(section = "12.3", id = "dg")})
- //WELD-204
+ // WELDINT-22
public void testProcessInjectionTargetEventFiredForTagLibraryListener()
{
assert ProcessInjectionTargetObserver.getTagLibraryListenerEvent() != null;
@@ -100,7 +100,7 @@
@SpecAssertion(section = "11.5.6", id = "aah"),
@SpecAssertion(section = "11.5.6", id = "abh"),
@SpecAssertion(section = "12.3", id = "dj")})
- //WELD-204
+ // WELDINT-22
public void testProcessInjectionTargetEventFiredForServlet()
{
assert ProcessInjectionTargetObserver.getServletEvent() != null;
@@ -112,7 +112,7 @@
@SpecAssertion(section = "11.5.6", id = "aai"),
@SpecAssertion(section = "11.5.6", id = "abi"),
@SpecAssertion(section = "12.3", id = "dk")})
- //WELD-204
+ // WELDINT-22
public void testProcessInjectionTargetEventFiredForFilter()
{
assert ProcessInjectionTargetObserver.getFilterEvent() != null;
@@ -121,7 +121,8 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "dd")
- public void testProcessInjectionTargetEventFiredForJsfManagedBean()
+ // WELDINT-22
+ public void testProcessInjectionTargetEventFiredForJsfManagedBean()
{
assert ProcessInjectionTargetObserver.getJsfManagedBeanEvent() != null;
validateJsfManagedBeanAnnotatedType(ProcessInjectionTargetObserver.getJsfManagedBeanEvent().getAnnotatedType());
@@ -133,7 +134,7 @@
@SpecAssertion(section = "11.5.6", id = "aao"),
@SpecAssertion(section = "11.5.6", id = "aan"),
@SpecAssertion(section = "11.5.6", id = "aap")})
- //WELD-204
+ // WELDINT-22
public void testTypeOfProcessInjectionTargetParameter() {
assert !ProcessInjectionTargetObserver.isStringObserved();
assert ProcessInjectionTargetObserver.isTagHandlerSubTypeObserved();
@@ -143,8 +144,9 @@
assert !ProcessInjectionTargetObserver.isListenerSuperTypeObserved();
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "be")
+ // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForServletListener() {
assert ProcessAnnotatedTypeObserver.getListenerEvent() != null;
validateServletListenerAnnotatedType(ProcessAnnotatedTypeObserver.getListenerEvent().getAnnotatedType());
@@ -159,12 +161,13 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bg")
+ // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForTagLibraryListener() {
assert ProcessAnnotatedTypeObserver.getTagLibraryListenerEvent() != null;
validateTagLibraryListenerAnnotatedType(ProcessAnnotatedTypeObserver.getTagLibraryListenerEvent().getAnnotatedType());
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "12.3", id = "bj")
public void testProcessAnnotatedTypeEventFiredForServlet() {
assert ProcessAnnotatedTypeObserver.getServletEvent() != null;
@@ -173,6 +176,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bk")
+ // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForFilter() {
assert ProcessAnnotatedTypeObserver.getFilterEvent() != null;
validateFilterAnnotatedType(ProcessAnnotatedTypeObserver.getFilterEvent().getAnnotatedType());
@@ -180,6 +184,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bd")
+ // WELDINT-23
public void testProcessAnnotatedTypeEventFiredForJsfManagedBean() {
assert ProcessAnnotatedTypeObserver.getJsfManagedBeanEvent() != null;
validateJsfManagedBeanAnnotatedType(ProcessAnnotatedTypeObserver.getJsfManagedBeanEvent().getAnnotatedType());
15 years, 2 months
Weld SVN: r4406 - api/trunk/cdi/src/main/java/javax/enterprise/inject.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 12:38:30 -0400 (Thu, 29 Oct 2009)
New Revision: 4406
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
Log:
link
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java 2009-10-29 16:30:20 UTC (rev 4405)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java 2009-10-29 16:38:30 UTC (rev 4406)
@@ -274,6 +274,9 @@
* <p>A producer method or field is a method or field of a bean class annotated
* {@link javax.enterprise.inject.Produces @Produces}.</p>
*
+ * <p>A common pattern in generic code is a producer method that injects an
+ * {@link javax.enterprise.inject.spi.InjectionPoint} object.</p>
+ *
* <h4>Resources</h4>
*
* <p>A resource is a bean that represents a reference to a resource, persistence
15 years, 2 months
Weld SVN: r4405 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 12:30:20 -0400 (Thu, 29 Oct 2009)
New Revision: 4405
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
link
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-29 16:27:25 UTC (rev 4404)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-29 16:30:20 UTC (rev 4405)
@@ -54,8 +54,9 @@
* <li>the event object is assignable to the type observed by the observer
* method,</li>
* <li>the observer method has all the event qualifiers of the event, and</li>
- * <li>either the event is not a container lifecycle event, or the observer
- * method belongs to an
+ * <li>either the event is not a
+ * {@linkplain javax.enterprise.inject.spi container lifecycle event}, or
+ * the observer method belongs to an
* {@linkplain javax.enterprise.inject.spi.Extension extension}.
* </ul>
*
15 years, 2 months
Weld SVN: r4404 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 12:27:25 -0400 (Thu, 29 Oct 2009)
New Revision: 4404
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
Log:
more on extensions
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java 2009-10-29 16:11:40 UTC (rev 4403)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java 2009-10-29 16:27:25 UTC (rev 4404)
@@ -18,24 +18,25 @@
package javax.enterprise.inject.spi;
/**
- * <p>Service interface implemented by service providers that
- * observe container lifecycle events. Service providers must
- * be declared in <tt>META-INF/services</tt></p>
+ * <p>Service interface implemented by extensions. An extension
+ * is a service provider declared in <tt>META-INF/services</tt>.</p>
*
- * <p>The container instantiates a single instance of each
- * service provider at the beginning of the application
- * initialization process and maintains a reference to it until
- * the application shuts down.</p>
- *
- * <p>Service providers may have observer methods, which may
- * observe any event, including any container lifecycle event,
+ * <p>Service providers may have
+ * {@linkplain javax.enterprise.event.Observes observer methods},
+ * which may observe any event, including any
+ * {@linkplain javax.enterprise.inject.spi container lifecycle event},
* and obtain an injected
* {@link javax.enterprise.inject.spi.BeanManager}.<p>
*
+ * <p>The container instantiates a single instance of each
+ * extension at the beginning of the application initialization
+ * process and maintains a reference to it until the application
+ * shuts down. The container delivers event notifications to this
+ * instance by calling its observer methods.</p>
+ *
* <p>Service providers are made available for injection as beans
* with the qualifier {@link javax.context.Default @Default}.</p>
*
- *
* @author Gavin King
* @author Pete Muir
*
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 16:11:40 UTC (rev 4403)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 16:27:25 UTC (rev 4404)
@@ -55,11 +55,11 @@
* <h3>Container lifecycle events</h3>
*
* <p>During the application initialization process, the container fires
- * a series of events, allowing portable extensions to integrate with the
- * container initialization process. Observers of these events must be
- * service providers of the service
- * {@link javax.enterprise.inject.spi.Extension} declared in
- * <tt>META-INF/services</tt>.</p>
+ * a series of {@linkplain javax.enterprise.event events}, allowing
+ * portable extensions to integrate with the container initialization
+ * process. Observer methods of these events must belong to
+ * {@linkplain javax.enterprise.inject.spi.Extension extensions} declared
+ * in <tt>META-INF/services</tt>.</p>
*
* @see javax.enterprise.inject
* @see javax.enterprise.context.spi
15 years, 2 months
Weld SVN: r4403 - in api/trunk/cdi/src/main/java/javax/enterprise: inject/spi and 1 other directory.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 12:11:40 -0400 (Thu, 29 Oct 2009)
New Revision: 4403
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java
Log:
container lifecycle events
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-29 13:15:45 UTC (rev 4402)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-29 16:11:40 UTC (rev 4403)
@@ -26,16 +26,18 @@
/**
* <p>Identifies the event parameter of an observer method. May be applied to
- * a parameter of a method of a bean class.</p>
+ * a parameter of a method of a bean class or
+ * {@linkplain javax.enterprise.inject.spi.Extension extension}.</p>
*
* <pre>
* public void afterLogin(@Observes LoggedInEvent event) { ... }
* </pre>
*
* <p>An observer method is a non-abstract method of a managed bean class or
- * session bean class. An observer method may be either static or non-static.
- * If the bean is a session bean, the observer method must be either a business
- * method of the EJB or a static method of the bean class.</p>
+ * session bean class (or of an extension). An observer method may be either
+ * static or non-static. If the bean is a session bean, the observer method
+ * must be either a business method of the EJB or a static method of the bean
+ * class.</p>
*
* <p>Each observer method must have exactly one event parameter, of the same
* type as the event type it observes. Event qualifiers may be declared
@@ -48,7 +50,7 @@
*
* <p>The event parameter type may contain a type variable or wildcard.</p>
*
- * <p>A bean may declare multiple observer methods.</p>
+ * <p>A bean (or extension) may declare multiple observer methods.</p>
*
* <p>Observer methods are inherited by bean subclasses.</p>
*
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-29 13:15:45 UTC (rev 4402)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-29 16:11:40 UTC (rev 4403)
@@ -44,15 +44,19 @@
* specific set of qualifiers. Any Java type may be observed by an
* observer method.</p>
*
- * <p>An observer method is a method of a bean class with a parameter
- * annotated {@link javax.enterprise.event.Observes @Observes}.</p>
+ * <p>An observer method is a method of a bean class or
+ * {@linkplain javax.enterprise.inject.spi.Extension extension} with a
+ * parameter annotated {@link javax.enterprise.event.Observes @Observes}.</p>
*
* <p>An observer method will be notified of an event if:</p>
*
* <ul>
- * <li>the type observed by the observer method is one of the event types
- * of the event, and</li>
- * <li>the observer method has all the event qualifiers of the event.</li>
+ * <li>the event object is assignable to the type observed by the observer
+ * method,</li>
+ * <li>the observer method has all the event qualifiers of the event, and</li>
+ * <li>either the event is not a container lifecycle event, or the observer
+ * method belongs to an
+ * {@linkplain javax.enterprise.inject.spi.Extension extension}.
* </ul>
*
* <p>If the observer method is a
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java 2009-10-29 13:15:45 UTC (rev 4402)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Extension.java 2009-10-29 16:11:40 UTC (rev 4403)
@@ -28,7 +28,8 @@
* the application shuts down.</p>
*
* <p>Service providers may have observer methods, which may
- * observe container initialization events and obtain an injected
+ * observe any event, including any container lifecycle event,
+ * and obtain an injected
* {@link javax.enterprise.inject.spi.BeanManager}.<p>
*
* <p>Service providers are made available for injection as beans
15 years, 2 months
Weld SVN: r4402 - in core/trunk: bom and 26 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-29 09:15:45 -0400 (Thu, 29 Oct 2009)
New Revision: 4402
Added:
core/trunk/impl/src/main/java/org/jboss/weld/messages/
core/trunk/impl/src/main/java/org/jboss/weld/messages/BeanMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/BootstrapMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/ContextMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/ConversationMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/EventMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/JsfMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/ReflectionMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/messages/UtilMessages.java
core/trunk/impl/src/main/java/org/jboss/weld/util/log/
core/trunk/impl/src/main/java/org/jboss/weld/util/log/Categories.java
core/trunk/impl/src/main/java/org/jboss/weld/util/log/IMessageConveyerFactory.java
core/trunk/impl/src/main/java/org/jboss/weld/util/log/LoggerFactory.java
core/trunk/impl/src/main/java/org/jboss/weld/util/log/MessageConveyerFactoryLoader.java
core/trunk/impl/src/main/resources/org/
core/trunk/impl/src/main/resources/org/jboss/
core/trunk/impl/src/main/resources/org/jboss/weld/
core/trunk/impl/src/main/resources/org/jboss/weld/messages/
core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/context_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/event_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/util_en.properties
Removed:
core/trunk/logging/
Modified:
core/trunk/bom/pom.xml
core/trunk/impl/pom.xml
core/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacadeBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java
core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java
core/trunk/impl/src/main/java/org/jboss/weld/context/ConversationContext.java
core/trunk/impl/src/main/java/org/jboss/weld/context/DependentInstancesStore.java
core/trunk/impl/src/main/java/org/jboss/weld/context/SessionContext.java
core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/AbstractAttributeBackedBeanStore.java
core/trunk/impl/src/main/java/org/jboss/weld/conversation/AbstractConversationManager.java
core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationEntry.java
core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java
core/trunk/impl/src/main/java/org/jboss/weld/conversation/NumericConversationIdGenerator.java
core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java
core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java
core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java
core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/ScopeModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java
core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/ServiceLoader.java
core/trunk/jboss-as/build.xml
core/trunk/osgi-bundle/pom.xml
core/trunk/parent/pom.xml
core/trunk/pom.xml
core/trunk/tests/pom.xml
Log:
switch to slf4j and cal10n
Modified: core/trunk/bom/pom.xml
===================================================================
--- core/trunk/bom/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/bom/pom.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>2</version>
+ <version>4-SNAPSHOT</version>
</parent>
<name>Weld Core BOM</name>
@@ -77,7 +77,7 @@
<cdi.tck.version>1.0.0-SNAPSHOT</cdi.tck.version>
<atinject.tck.version>1.0.0-PFD-3</atinject.tck.version>
<jboss.interceptor.version>1.0.0-SNAPSHOT</jboss.interceptor.version>
- <slf4j.version>1.5.8</slf4j.version>
+ <slf4j.version>1.5.9.RC1</slf4j.version>
</properties>
<dependencyManagement>
@@ -111,12 +111,6 @@
<dependency>
<groupId>org.jboss.weld</groupId>
- <artifactId>weld-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.weld</groupId>
<artifactId>weld-core-test</artifactId>
<version>${project.version}</version>
</dependency>
@@ -150,19 +144,23 @@
<artifactId>google-collections</artifactId>
<version>${google.collections.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-ext</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
- <scope>test</scope>
</dependency>
</dependencies>
Modified: core/trunk/impl/pom.xml
===================================================================
--- core/trunk/impl/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/pom.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>weld-core-parent</artifactId>
<groupId>org.jboss.weld</groupId>
@@ -16,23 +17,18 @@
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-spi</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-logging</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-api</artifactId>
<optional>true</optional>
@@ -43,7 +39,7 @@
<artifactId>servlet-api</artifactId>
<optional>true</optional>
</dependency>
-
+
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
@@ -55,19 +51,19 @@
<artifactId>jta</artifactId>
<optional>true</optional>
</dependency>
-
+
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<optional>true</optional>
</dependency>
-
+
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<optional>true</optional>
</dependency>
-
+
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
@@ -78,49 +74,89 @@
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
-
+
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
</dependency>
-
+
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<optional>true</optional>
</dependency>
-
+
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.jboss.interceptor</groupId>
- <artifactId>jboss-interceptor-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.interceptor</groupId>
+ <artifactId>jboss-interceptor-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.interceptor</groupId>
+ <artifactId>jboss-interceptor</artifactId>
+ </dependency>
- <dependency>
- <groupId>org.jboss.interceptor</groupId>
- <artifactId>jboss-interceptor</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-ext</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
</dependencies>
-
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>ch.qos.cal10n.plugins</groupId>
+ <artifactId>maven-cal10n-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>verify-messages</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <enumTypes>
+ <!-- list every enum type you would like to see checked -->
+ <enumType>org.jboss.weld.messages.BeanMessages</enumType>
+ <enumType>org.jboss.weld.messages.BootstrapMessages</enumType>
+ <enumType>org.jboss.weld.messages.ContextMessages</enumType>
+ <enumType>org.jboss.weld.messages.ConversationMessages</enumType>
+ <enumType>org.jboss.weld.messages.EventMessages</enumType>
+ <enumType>org.jboss.weld.messages.JsfMessages</enumType>
+ <enumType>org.jboss.weld.messages.ReflectionMessages</enumType>
+ <enumType>org.jboss.weld.messages.UtilMessages</enumType>
+ </enumTypes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
- <profile>
- <id>javax.xml.ws</id>
- <activation>
- <jdk>1.5</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.xml.ws</groupId>
- <artifactId>jaxws-api</artifactId>
- </dependency>
- </dependencies>
- </profile>
+ <profile>
+ <id>javax.xml.ws</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
</profiles>
</project>
Modified: core/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -75,8 +75,6 @@
import org.jboss.weld.introspector.WeldAnnotated;
import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.manager.api.WeldManager;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.metadata.cache.ScopeModel;
@@ -162,8 +160,6 @@
return getContext() + " -> " + getManager();
}
}
-
- private static final Log log = Logging.getLog(BeanManagerImpl.class);
private static final long serialVersionUID = 3021562879133838561L;
@@ -812,7 +808,6 @@
{
//checkEventType(observer.getObservedType());
observers.add(observer);
- log.trace("Added observer " + observer);
for (BeanManagerImpl childActivity : childActivities)
{
childActivity.addObserver(observer);
@@ -1174,10 +1169,6 @@
{
originalInjectionPoint = currentInjectionPoint.get().pop();
}
- else
- {
- log.trace("No current injection point to replace #0", injectionPoint);
- }
currentInjectionPoint.get().push(injectionPoint);
return originalInjectionPoint;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,15 @@
*/
package org.jboss.weld.bean;
+import static org.jboss.weld.messages.BeanMessages.CREATING_BEAN;
+import static org.jboss.weld.messages.BeanMessages.QUALIFIERS_USED;
+import static org.jboss.weld.messages.BeanMessages.USING_DEFAULT_NAME;
+import static org.jboss.weld.messages.BeanMessages.USING_DEFAULT_QUALIFIER;
+import static org.jboss.weld.messages.BeanMessages.USING_NAME;
+import static org.jboss.weld.messages.BeanMessages.USING_SCOPE_FROM_STEREOTYPE;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.HashSet;
@@ -43,11 +52,10 @@
import org.jboss.weld.introspector.WeldParameter;
import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MergedStereotypes;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
/**
* An abstract bean representation common for all beans
@@ -66,7 +74,7 @@
private boolean proxyable;
// Logger
- private final Log log = Logging.getLog(AbstractBean.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
// The binding types
protected Set<Annotation> bindings;
// The name
@@ -132,7 +140,7 @@
}
initDefaultBindings();
initPrimitive();
- log.trace("Building Weld bean metadata for #0", getType());
+ log.trace(CREATING_BEAN, getType());
initName();
initScopeType();
initSerializable();
@@ -223,21 +231,21 @@
this.bindings = new HashSet<Annotation>();
this.bindings.addAll(getAnnotatedItem().getMetaAnnotations(Qualifier.class));
initDefaultBindings();
- log.trace("Using binding types " + bindings + " specified by annotations");
+ log.trace(QUALIFIERS_USED, bindings, this);
}
protected void initDefaultBindings()
{
if (bindings.size() == 0)
{
- log.trace("Adding default @Current binding type");
+ log.trace(USING_DEFAULT_QUALIFIER, this);
this.bindings.add(CURRENT_LITERAL);
}
if (bindings.size() == 1)
{
if (bindings.iterator().next().annotationType().equals(Named.class))
{
- log.trace("Adding default @Current binding type");
+ log.trace(USING_DEFAULT_QUALIFIER, this);
this.bindings.add(CURRENT_LITERAL);
}
}
@@ -267,13 +275,11 @@
String javaName = getAnnotatedItem().getAnnotation(Named.class).value();
if ("".equals(javaName))
{
- log.trace("Using default name (specified by annotations)");
beanNameDefaulted = true;
}
else
{
- if (log.isTraceEnabled())
- log.trace("Using name " + javaName + " specified by annotations");
+ log.trace(USING_NAME, javaName, this);
this.name = javaName;
return;
}
@@ -282,6 +288,7 @@
if (beanNameDefaulted || getMergedStereotypes().isBeanNameDefaulted())
{
this.name = getDefaultName();
+ log.trace(USING_DEFAULT_NAME, name, this);
return;
}
}
@@ -328,8 +335,7 @@
if (possibleScopeTypes.size() == 1)
{
this.scopeType = possibleScopeTypes.iterator().next().annotationType();
- if (log.isTraceEnabled())
- log.trace("Scope " + scopeType + " specified by stereotype");
+ log.trace(USING_SCOPE_FROM_STEREOTYPE, scopeType, this, getMergedStereotypes());
return true;
}
else if (possibleScopeTypes.size() > 1)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,11 @@
*/
package org.jboss.weld.bean;
+import static org.jboss.weld.messages.BeanMessages.USING_DEFAULT_SCOPE;
+import static org.jboss.weld.messages.BeanMessages.USING_SCOPE;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -39,8 +44,8 @@
import javax.enterprise.inject.spi.Interceptor;
import javax.inject.Scope;
+import org.jboss.interceptor.model.InterceptionModel;
import org.jboss.interceptor.model.InterceptionModelBuilder;
-import org.jboss.interceptor.model.InterceptionModel;
import org.jboss.interceptor.model.InterceptorClassMetadataImpl;
import org.jboss.interceptor.util.InterceptionUtils;
import org.jboss.interceptor.util.proxy.TargetInstanceProxy;
@@ -58,13 +63,12 @@
import org.jboss.weld.injection.MethodInjectionPoint;
import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.introspector.WeldMethod;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.util.Beans;
import org.jboss.weld.util.Proxies;
+import org.jboss.weld.util.Reflections;
import org.jboss.weld.util.Strings;
-import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
/**
* An abstract bean representation common for class-based beans
@@ -77,7 +81,7 @@
public abstract class AbstractClassBean<T> extends AbstractBean<T, Class<T>>
{
// Logger
- private static final LogProvider log = Logging.getLogProvider(AbstractClassBean.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
// The item representation
protected WeldClass<T> annotatedItem;
// The injectable fields of each type in the type hierarchy, with the actual type at the bottom
@@ -230,7 +234,6 @@
*/
protected void initType()
{
- log.trace("Bean type specified in Java");
this.type = getAnnotatedItem().getJavaClass();
}
@@ -265,7 +268,7 @@
if (getAnnotatedItem().isAnnotationPresent(scopeTypes.iterator().next().annotationType()))
{
this.scopeType = scopeTypes.iterator().next().annotationType();
- log.trace("Scope " + scopeType + " specified by annotation");
+ log.trace(USING_SCOPE, scopeType, this);
}
break;
}
@@ -283,7 +286,7 @@
if (this.scopeType == null)
{
this.scopeType = Dependent.class;
- log.trace("Using default @Dependent scope");
+ log.trace(USING_DEFAULT_SCOPE, this);
}
}
@@ -322,7 +325,6 @@
protected String getDefaultName()
{
String name = Strings.decapitalize(getAnnotatedItem().getSimpleName());
- log.trace("Default name of " + type + " is " + name);
return name;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,11 @@
*/
package org.jboss.weld.bean;
+import static org.jboss.weld.messages.BeanMessages.USING_DEFAULT_SCOPE;
+import static org.jboss.weld.messages.BeanMessages.USING_SCOPE;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
@@ -41,12 +46,11 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.introspector.WeldMember;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.util.Beans;
import org.jboss.weld.util.Names;
import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
/**
* The implicit producer bean
@@ -58,7 +62,7 @@
*/
public abstract class AbstractProducerBean<X, T, S extends Member> extends AbstractReceiverBean<X, T, S>
{
- private static final LogProvider log = Logging.getLogProvider(AbstractProducerBean.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
private Producer<T> producer;
@@ -221,7 +225,7 @@
if (scopeAnnotations.size() == 1)
{
this.scopeType = scopeAnnotations.iterator().next().annotationType();
- log.trace("Scope " + scopeType + " specified by annotation");
+ log.trace(USING_SCOPE, scopeType, this);
return;
}
@@ -230,7 +234,7 @@
if (this.scopeType == null)
{
this.scopeType = Dependent.class;
- log.trace("Using default @Dependent scope");
+ log.trace(USING_DEFAULT_SCOPE, this);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,10 @@
*/
package org.jboss.weld.bean;
+import static org.jboss.weld.messages.BeanMessages.CIRCULAR_CALL;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.reflect.Member;
import javax.enterprise.context.spi.CreationalContext;
@@ -25,8 +29,7 @@
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.context.WeldCreationalContext;
import org.jboss.weld.introspector.WeldMember;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* @author pmuir
@@ -35,7 +38,7 @@
public abstract class AbstractReceiverBean<X, T, S extends Member> extends AbstractBean<T, S>
{
- private static final LogProvider log = Logging.getLogProvider(AbstractReceiverBean.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
private AbstractClassBean<X> declaringBean;
private boolean policy;
@@ -73,7 +76,7 @@
WeldCreationalContext<?> creationalContextImpl = (WeldCreationalContext<?>) creationalContext;
if (creationalContextImpl.containsIncompleteInstance(getDeclaringBean()))
{
- log.warn("Executing producer field or method " + getAnnotatedItem() + " on incomplete declaring bean " + getDeclaringBean() + " due to circular injection");
+ log.warn(CIRCULAR_CALL, getAnnotatedItem(), getDeclaringBean());
return creationalContextImpl.getIncompleteInstance(getDeclaringBean());
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,7 +16,10 @@
*/
package org.jboss.weld.bean;
-import java.lang.annotation.Annotation;
+import static org.jboss.weld.messages.BeanMessages.ERROR_DESTROYING;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -24,14 +27,10 @@
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.spi.AnnotatedMethod;
import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InjectionTarget;
-import org.jboss.interceptor.model.InterceptionModel;
-import org.jboss.interceptor.model.InterceptionModelBuilder;
-import org.jboss.interceptor.model.InterceptorClassMetadataImpl;
import org.jboss.interceptor.proxy.InterceptionHandlerFactory;
import org.jboss.interceptor.proxy.InterceptorProxyCreatorImpl;
import org.jboss.interceptor.registry.InterceptorRegistry;
@@ -49,12 +48,13 @@
import org.jboss.weld.introspector.WeldConstructor;
import org.jboss.weld.introspector.WeldField;
import org.jboss.weld.introspector.WeldMethod;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.util.Beans;
import org.jboss.weld.util.Names;
import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLogger.Level;
/**
* Represents a simple bean
@@ -66,7 +66,8 @@
public class ManagedBean<T> extends AbstractClassBean<T>
{
// Logger
- private static LogProvider log = Logging.getLogProvider(ManagedBean.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
+ private static final XLogger xLog = loggerFactory().getXLogger(BEAN);
// The constructor
private ConstructorInjectionPoint<T> constructor;
@@ -167,7 +168,8 @@
}
catch (Exception e)
{
- log.error("Error destroying " + toString(), e);
+ log.error(ERROR_DESTROYING, this, instance);
+ xLog.throwing(Level.DEBUG, e);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -57,8 +57,6 @@
import org.jboss.weld.injection.InjectionContextImpl;
import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.introspector.WeldMethod;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Beans;
import org.jboss.weld.util.Proxies;
@@ -72,7 +70,6 @@
*/
public class SessionBean<T> extends AbstractClassBean<T>
{
- private final Log log = Logging.getLog(SessionBean.class);
// The EJB descriptor
private InternalEjbDescriptor<T> ejbDescriptor;
@@ -173,7 +170,6 @@
T instance = proxyClass.newInstance();
ctx.push(instance);
((ProxyObject) instance).setHandler(new EnterpriseBeanProxyMethodHandler<T>(SessionBean.this, ctx));
- log.trace("Enterprise bean instance created for bean {0}", this);
return instance;
}
catch (InstantiationException e)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacadeBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacadeBean.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacadeBean.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,10 @@
*/
package org.jboss.weld.bean.builtin.facade;
+import static org.jboss.weld.messages.BeanMessages.DYNAMIC_LOOKUP_OF_BUILT_IN_NOT_ALLOWED;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -26,13 +30,12 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bean.builtin.AbstractBuiltInBean;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
public abstract class AbstractFacadeBean<T> extends AbstractBuiltInBean<T>
{
- private static final Log log = Logging.getLog(AbstractFacadeBean.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
protected AbstractFacadeBean(String idSuffix, BeanManagerImpl manager)
{
@@ -57,7 +60,7 @@
}
else
{
- log.warn("Dynamic lookup of " + toString() + " is not supported");
+ log.warn(DYNAMIC_LOOKUP_OF_BUILT_IN_NOT_ALLOWED, toString());
return null;
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,10 +16,13 @@
*/
package org.jboss.weld.bean.proxy;
+import static org.jboss.weld.messages.BeanMessages.CALL_PROXIED_METHOD;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.Arrays;
import javassist.util.proxy.MethodHandler;
@@ -28,9 +31,8 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.context.WeldCreationalContext;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
/**
* A Javassist MethodHandler that delegates method calls to a proxied bean. If
@@ -46,7 +48,7 @@
private static final long serialVersionUID = -5391564935097267888L;
// The log provider
- private static transient LogProvider log = Logging.getLogProvider(ClientProxyMethodHandler.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
// The bean
private transient Bean<?> bean;
// The bean index in the manager
@@ -114,7 +116,7 @@
try
{
Object returnValue = Reflections.lookupMethod(proxiedMethod, proxiedInstance).invoke(proxiedInstance, args);
- log.trace("Executed method " + proxiedMethod + " on " + proxiedInstance + " with parameters " + Arrays.toString(args) + " and got return value " + returnValue == null ? null : returnValue);
+ log.trace(CALL_PROXIED_METHOD, proxiedMethod, proxiedInstance, args, returnValue == null ? null : returnValue);
return returnValue;
}
catch (InvocationTargetException e)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,9 +16,13 @@
*/
package org.jboss.weld.bean.proxy;
+import static org.jboss.weld.messages.BeanMessages.CALL_PROXIED_METHOD;
+import static org.jboss.weld.messages.BeanMessages.CREATED_SESSION_BEAN_PROXY;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.io.Serializable;
import java.lang.reflect.Method;
-import java.util.Arrays;
import java.util.Collection;
import javassist.util.proxy.MethodHandler;
@@ -29,9 +33,8 @@
import org.jboss.weld.ejb.api.SessionObjectReference;
import org.jboss.weld.introspector.MethodSignature;
import org.jboss.weld.introspector.jlr.MethodSignatureImpl;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
/**
* Method handler for enterprise bean client proxies
@@ -46,7 +49,7 @@
private static final long serialVersionUID = 2107723373882153667L;
// The log provider
- static final transient Log log = Logging.getLog(EnterpriseBeanProxyMethodHandler.class);
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
private final SessionObjectReference reference;
private final Class<?> objectInterface;
@@ -68,7 +71,7 @@
this.clientCanCallRemoveMethods = bean.isClientCanCallRemoveMethods();
this.reference = bean.createReference();
this.stateful = bean.getEjbDescriptor().isStateful();
- log.trace("Created enterprise bean proxy method handler for " + bean);
+ log.trace(CREATED_SESSION_BEAN_PROXY, bean);
}
/**
@@ -116,7 +119,7 @@
Object proxiedInstance = reference.getBusinessObject(businessInterface);
Method proxiedMethod = Reflections.lookupMethod(method, proxiedInstance);
Object returnValue = Reflections.invokeAndWrap(proxiedMethod, proxiedInstance, args);
- log.trace("Executed " + method + " on " + proxiedInstance + " with parameters " + Arrays.toString(args) + " and got return value " + returnValue);
+ log.trace(CALL_PROXIED_METHOD, method, proxiedInstance, args, returnValue);
return returnValue;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,13 @@
*/
package org.jboss.weld.bootstrap;
+import static org.jboss.weld.messages.BootstrapMessages.FOUND_BEAN;
+import static org.jboss.weld.messages.BootstrapMessages.FOUND_DECORATOR;
+import static org.jboss.weld.messages.BootstrapMessages.FOUND_INTERCEPTOR;
+import static org.jboss.weld.messages.BootstrapMessages.FOUND_OBSERVER_METHOD;
+import static org.jboss.weld.util.log.Categories.BOOTSTRAP;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.reflect.Member;
import java.util.Set;
@@ -56,17 +63,16 @@
import org.jboss.weld.introspector.WeldField;
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.jsf.JsfApiAbstraction;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.persistence.PersistenceApiAbstraction;
import org.jboss.weld.servlet.ServletApiAbstraction;
import org.jboss.weld.util.Reflections;
import org.jboss.weld.ws.WSApiAbstraction;
+import org.slf4j.cal10n.LocLogger;
public class AbstractBeanDeployer<E extends BeanDeployerEnvironment>
{
- private static final LogProvider log = Logging.getLogProvider(AbstractBeanDeployer.class);
+ private static final LocLogger log = loggerFactory().getLogger(BOOTSTRAP);
private final BeanManagerImpl manager;
private final E environment;
@@ -91,13 +97,13 @@
{
bean.initialize(getEnvironment());
manager.addDecorator(bean);
- log.debug("Bean: " + bean);
+ log.debug(FOUND_DECORATOR, bean);
}
for (InterceptorImpl<?> bean: getEnvironment().getInterceptors())
{
bean.initialize(getEnvironment());
manager.addInterceptor(bean);
- log.debug("Interceptor: " + bean);
+ log.debug(FOUND_INTERCEPTOR, bean);
}
for (RIBean<?> bean : beans)
{
@@ -134,11 +140,11 @@
}
}
manager.addBean(bean);
- log.debug("Bean: " + bean);
+ log.debug(FOUND_BEAN, bean);
}
for (ObserverMethodImpl<?, ?> observer : getEnvironment().getObservers())
{
- log.debug("Observer : " + observer);
+ log.debug(FOUND_OBSERVER_METHOD, observer);
observer.initialize();
ProcessObserverMethodImpl.fire(manager, observer);
manager.addObserver(observer);
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,12 @@
*/
package org.jboss.weld.bootstrap;
+import static org.jboss.weld.messages.BootstrapMessages.ENABLED_DECORATORS;
+import static org.jboss.weld.messages.BootstrapMessages.ENABLED_INTERCEPTORS;
+import static org.jboss.weld.messages.BootstrapMessages.ENABLED_POLICIES;
+import static org.jboss.weld.util.log.Categories.BOOTSTRAP;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bean.builtin.DefaultValidatorBean;
import org.jboss.weld.bean.builtin.DefaultValidatorFactoryBean;
@@ -39,14 +45,13 @@
import org.jboss.weld.ejb.EjbDescriptors;
import org.jboss.weld.ejb.spi.EjbServices;
import org.jboss.weld.event.ObserverMethodImpl;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.spi.ResourceLoader;
import org.jboss.weld.security.spi.SecurityServices;
import org.jboss.weld.servlet.HttpSessionManager;
import org.jboss.weld.transaction.spi.TransactionServices;
import org.jboss.weld.validation.spi.ValidationServices;
import org.jboss.weld.xml.BeansXmlParser;
+import org.slf4j.cal10n.LocLogger;
/**
* @author pmuir
@@ -55,7 +60,7 @@
public class BeanDeployment
{
- private static final Log log = Logging.getLog(BeanDeployment.class);
+ private static final LocLogger log = loggerFactory().getLogger(BOOTSTRAP);
private final BeanDeploymentArchive beanDeploymentArchive;
private final BeanManagerImpl beanManager;
@@ -123,9 +128,9 @@
{
beanManager.setEnabledInterceptorClasses(parser.getEnabledInterceptorClasses());
}
- log.debug("Enabled policies for " + this + ": " + beanManager.getEnabledPolicyClasses() + " " + beanManager.getEnabledPolicyStereotypes());
- log.debug("Enabled decorator types for " + beanManager + ": " + beanManager.getEnabledDecoratorClasses());
- log.debug("Enabled interceptor types for " + beanManager + ": " + beanManager.getEnabledInterceptorClasses());
+ log.debug(ENABLED_POLICIES, this.beanManager, beanManager.getEnabledPolicyClasses(), beanManager.getEnabledPolicyStereotypes());
+ log.debug(ENABLED_DECORATORS, this.beanManager, beanManager.getEnabledDecoratorClasses());
+ log.debug(ENABLED_INTERCEPTORS, this.beanManager, beanManager.getEnabledInterceptorClasses());
}
// TODO Move class stuff into startContainer phase
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,12 @@
*/
package org.jboss.weld.bootstrap;
+import static org.jboss.weld.messages.BootstrapMessages.JTA_UNAVAILABLE;
+import static org.jboss.weld.messages.BootstrapMessages.VALIDATING_BEANS;
+import static org.jboss.weld.messages.BootstrapMessages.VERSION;
+import static org.jboss.weld.util.log.Categories.BOOTSTRAP;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -55,8 +61,6 @@
import org.jboss.weld.ejb.EJBApiAbstraction;
import org.jboss.weld.ejb.EjbDescriptors;
import org.jboss.weld.jsf.JsfApiAbstraction;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.persistence.PersistenceApiAbstraction;
@@ -68,6 +72,7 @@
import org.jboss.weld.util.Names;
import org.jboss.weld.util.serviceProvider.ServiceLoader;
import org.jboss.weld.ws.WSApiAbstraction;
+import org.slf4j.cal10n.LocLogger;
/**
* Common bootstrapping functionality that is run at application startup and
@@ -78,6 +83,8 @@
public class WeldBootstrap implements Bootstrap
{
+ private static final LocLogger log = loggerFactory().getLogger(BOOTSTRAP);
+
/**
*
* A Deployment visitor which can find the transitive closure of Bean
@@ -141,13 +148,10 @@
}
}
-
- // The log provider
- private static Log log = Logging.getLog(WeldBootstrap.class);
static
{
- log.info("Weld " + Names.version(WeldBootstrap.class.getPackage()));
+ log.info(VERSION, Names.version(WeldBootstrap.class.getPackage()));
}
// The Bean manager
@@ -174,7 +178,7 @@
if (!deployment.getServices().contains(TransactionServices.class))
{
- log.info("Transactional services not available. Injection of @Current UserTransaction not available. Transactional observers will be invoked synchronously.");
+ log.info(JTA_UNAVAILABLE);
}
// TODO Reinstate if we can find a good way to detect.
// if (!deployment.getServices().contains(EjbServices.class))
@@ -285,7 +289,7 @@
entry.getValue().deployBeans(environment);
}
AfterBeanDiscoveryImpl.fire(deploymentManager, deployment, beanDeployments, extensionDeployerEnvironment);
- log.debug("Weld initialized. Validating beans.");
+ log.debug(VALIDATING_BEANS);
}
return this;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,11 @@
*/
package org.jboss.weld.context;
+import static org.jboss.weld.messages.ContextMessages.CONTEXTUAL_INSTANCE_REMOVED;
+import static org.jboss.weld.messages.ContextMessages.CONTEXT_CLEARED;
+import static org.jboss.weld.util.log.Categories.CONTEXT;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.util.concurrent.locks.ReentrantLock;
@@ -27,8 +32,7 @@
import org.jboss.weld.serialization.spi.ContextualStore;
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.ContextualInstance;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* Base for the Context implementations. Delegates calls to the abstract
@@ -43,7 +47,7 @@
*/
public abstract class AbstractMapContext extends AbstractContext
{
- private static LogProvider log = Logging.getLogProvider(AbstractMapContext.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONTEXT);
private static ReentrantLock creationLock = new ReentrantLock();
@@ -130,13 +134,13 @@
private <T> void destroy(String id)
{
- log.trace("Destroying " + id);
if (getBeanStore() == null)
{
throw new IllegalStateException("No bean store available for " + toString());
}
ContextualInstance<T> beanInstance = getBeanStore().get(id);
beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
+ log.trace(CONTEXTUAL_INSTANCE_REMOVED, id, this);
}
@@ -145,7 +149,7 @@
*/
public void destroy()
{
- log.trace("Destroying context");
+ log.trace(CONTEXT_CLEARED, this);
if (getBeanStore() == null)
{
throw new IllegalStateException("No bean store available for " + toString());
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -22,13 +22,21 @@
*/
package org.jboss.weld.context;
+import static org.jboss.weld.messages.ContextMessages.APPLICATION_ENDED;
+import static org.jboss.weld.messages.ContextMessages.APPLICATION_STARTED;
+import static org.jboss.weld.messages.ContextMessages.REQUEST_ENDED;
+import static org.jboss.weld.messages.ContextMessages.REQUEST_STARTED;
+import static org.jboss.weld.messages.ContextMessages.SESSION_ENDED;
+import static org.jboss.weld.messages.ContextMessages.SESSION_RESTORED;
+import static org.jboss.weld.util.log.Categories.CONTEXT;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import org.jboss.weld.Container;
import org.jboss.weld.bootstrap.api.Lifecycle;
import org.jboss.weld.bootstrap.api.Service;
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* An implementation of the Weld lifecycle that supports restoring
@@ -40,7 +48,7 @@
public class ContextLifecycle implements Lifecycle, Service
{
- public static final LogProvider log = Logging.getLogProvider(ContextLifecycle.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONTEXT);
private final AbstractApplicationContext applicationContext;
private final AbstractApplicationContext singletonContext;
@@ -61,14 +69,14 @@
public void restoreSession(String id, BeanStore sessionBeanStore)
{
- log.trace("Restoring session " + id);
+ log.trace(SESSION_RESTORED, id);
sessionContext.setBeanStore(sessionBeanStore);
sessionContext.setActive(true);
}
public void endSession(String id, BeanStore sessionBeanStore)
{
- log.trace("Ending session " + id);
+ log.trace(SESSION_ENDED, id);
sessionContext.setActive(true);
sessionContext.destroy();
sessionContext.setBeanStore(null);
@@ -77,7 +85,7 @@
public void beginRequest(String id, BeanStore requestBeanStore)
{
- log.trace("Starting request " + id);
+ log.trace(REQUEST_STARTED, id);
requestContext.setBeanStore(requestBeanStore);
requestContext.setActive(true);
dependentContext.setActive(true);
@@ -85,7 +93,7 @@
public void endRequest(String id, BeanStore requestBeanStore)
{
- log.trace("Ending request " + id);
+ log.trace(REQUEST_ENDED, id);
requestContext.setBeanStore(requestBeanStore);
dependentContext.setActive(false);
requestContext.destroy();
@@ -116,7 +124,7 @@
public void beginApplication(BeanStore applicationBeanStore)
{
- log.trace("Starting application");
+ log.trace(APPLICATION_STARTED, "");
applicationContext.setBeanStore(applicationBeanStore);
applicationContext.setActive(true);
singletonContext.setBeanStore(new ConcurrentHashMapBeanStore());
@@ -125,7 +133,7 @@
public void endApplication()
{
- log.trace("Ending application");
+ log.trace(APPLICATION_ENDED, "");
applicationContext.destroy();
applicationContext.setActive(false);
applicationContext.setBeanStore(null);
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/ConversationContext.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/ConversationContext.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/ConversationContext.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -24,9 +24,6 @@
import javax.enterprise.context.ConversationScoped;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
-
/**
* The conversation context
*
@@ -34,7 +31,6 @@
*/
public class ConversationContext extends AbstractThreadLocalMapContext
{
- private static LogProvider log = Logging.getLogProvider(ConversationContext.class);
/**
* Constructor
@@ -42,7 +38,6 @@
public ConversationContext()
{
super(ConversationScoped.class);
- log.trace("Created conversation context");
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/DependentInstancesStore.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/DependentInstancesStore.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/DependentInstancesStore.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,14 +16,17 @@
*/
package org.jboss.weld.context;
+import static org.jboss.weld.messages.ContextMessages.DEPENDENT_INSTANCE_ATTACHED;
+import static org.jboss.weld.util.log.Categories.CONTEXT;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.jboss.weld.context.api.ContextualInstance;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* A store for dependent instances created under a given key
@@ -34,7 +37,7 @@
{
private static final long serialVersionUID = -2349574791148336833L;
- private static Log log = Logging.getLog(DependentInstancesStore.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONTEXT);
// A object -> List of contextual instances mapping
private List<ContextualInstance<?>> dependentInstances;
@@ -55,18 +58,16 @@
*/
public <T> void addDependentInstance(ContextualInstance<T> contextualInstance)
{
- log.trace("Registered dependent instance #0", contextualInstance);
+ log.trace(DEPENDENT_INSTANCE_ATTACHED, contextualInstance);
dependentInstances.add(contextualInstance);
}
/**
* Destroys all dependent objects
*
- * @param key The key to remove
*/
public void destroyDependentInstances()
{
- log.trace("Destroying dependent instances");
for (ContextualInstance<?> injectedInstance : dependentInstances)
{
destroy(injectedInstance);
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/SessionContext.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/SessionContext.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/SessionContext.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -25,8 +25,6 @@
import javax.enterprise.context.SessionScoped;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
/**
* The session context
@@ -35,7 +33,6 @@
*/
public class SessionContext extends AbstractThreadLocalMapContext
{
- private static LogProvider log = Logging.getLogProvider(SessionContext.class);
/**
* Constructor
@@ -43,7 +40,6 @@
public SessionContext()
{
super(SessionScoped.class);
- log.trace("Created session context");
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/AbstractAttributeBackedBeanStore.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/AbstractAttributeBackedBeanStore.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/AbstractAttributeBackedBeanStore.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,12 @@
*/
package org.jboss.weld.context.beanstore;
+import static org.jboss.weld.messages.ContextMessages.CONTEXTUAL_INSTANCE_ADDED;
+import static org.jboss.weld.messages.ContextMessages.CONTEXTUAL_INSTANCE_FOUND;
+import static org.jboss.weld.messages.ContextMessages.CONTEXT_CLEARED;
+import static org.jboss.weld.util.log.Categories.CONTEXT;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
@@ -23,10 +29,9 @@
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.ContextualInstance;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.util.Names;
import org.jboss.weld.util.collections.EnumerationList;
+import org.slf4j.cal10n.LocLogger;
/**
* Provides common BeanStore operations
@@ -36,8 +41,7 @@
*/
public abstract class AbstractAttributeBackedBeanStore implements BeanStore
{
- // The log provider
- private static LogProvider log = Logging.getLogProvider(AbstractAttributeBackedBeanStore.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONTEXT);
/**
* Gets a bean from the store
@@ -50,7 +54,7 @@
{
String key = getNamingScheme().getKey(id);
ContextualInstance<T> instance = (ContextualInstance<T>) getAttribute(key);
- log.trace("Looked for " + key + " and got " + instance);
+ log.trace(CONTEXTUAL_INSTANCE_FOUND, id, instance, this);
return instance;
}
@@ -63,7 +67,7 @@
{
removeAttribute(attributeName);
}
- log.trace("Bean store cleared");
+ log.trace(CONTEXT_CLEARED, this);
}
/**
@@ -113,7 +117,7 @@
{
String key = getNamingScheme().getKey(id);
setAttribute(key, beanInstance);
- log.trace("Added Contextual type " + beanInstance.getContextual() + " under key " + key);
+ log.trace(CONTEXTUAL_INSTANCE_ADDED, beanInstance.getContextual(), key, this);
}
/**
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/AbstractConversationManager.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/AbstractConversationManager.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/AbstractConversationManager.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -22,6 +22,19 @@
*/
package org.jboss.weld.conversation;
+import static org.jboss.weld.messages.ConversationMessages.CLEANING_UP_CONVERSATION;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_LOCK_UNAVAILABLE;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_SWITCHED;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_TERMINATION_SCHEDULED;
+import static org.jboss.weld.messages.ConversationMessages.DESTROY_ALL_LRC;
+import static org.jboss.weld.messages.ConversationMessages.DESTROY_LRC;
+import static org.jboss.weld.messages.ConversationMessages.DESTROY_TRANSIENT_COVERSATION;
+import static org.jboss.weld.messages.ConversationMessages.LRC_COUNT;
+import static org.jboss.weld.messages.ConversationMessages.NO_CONVERSATION_TO_RESTORE;
+import static org.jboss.weld.messages.ConversationMessages.UNABLE_TO_RESTORE_CONVERSATION;
+import static org.jboss.weld.util.log.Categories.CONVERSATION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
@@ -37,8 +50,7 @@
import org.jboss.weld.context.ContextLifecycle;
import org.jboss.weld.context.ConversationContext;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* An abstract conversation manager
@@ -48,7 +60,7 @@
*/
public abstract class AbstractConversationManager implements ConversationManager
{
- private static LogProvider log = Logging.getLogProvider(AbstractConversationManager.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONVERSATION);
// The conversation terminator
@Inject
@@ -71,7 +83,6 @@
*/
public AbstractConversationManager()
{
- log.trace("Created " + getClass());
longRunningConversations = new ConcurrentHashMap<String, ConversationEntry>();
}
@@ -81,7 +92,7 @@
{
// No incoming conversation ID, nothing to do here, continue with
// a transient conversation
- log.trace("No conversation id to restore");
+ log.trace(NO_CONVERSATION_TO_RESTORE);
return;
}
if (!longRunningConversations.containsKey(cid))
@@ -89,7 +100,7 @@
// We got an incoming conversation ID but it was not in the map of
// known ones, nothing to do. Log and return to continue with a
// transient conversation
- log.warn("Could not restore long-running conversation " + cid);
+ log.warn(UNABLE_TO_RESTORE_CONVERSATION, cid, "id not known");
return;
}
ConversationEntry resumedConversationEntry = longRunningConversations.get(cid);
@@ -104,7 +115,8 @@
}
catch (InterruptedException e)
{
- log.debug("Interrupted while trying to acquire lock");
+ log.debug(CONVERSATION_LOCK_UNAVAILABLE);
+ Thread.currentThread().interrupt();
return;
}
// If we can't cancel the termination, release the lock, return and
@@ -120,7 +132,7 @@
// match the fetched long-running one
String oldConversation = currentConversation.toString();
currentConversation.switchTo(resumedConversationEntry.getConversation());
- log.trace("Conversation switched from " + oldConversation + " to " + currentConversation);
+ log.trace(CONVERSATION_SWITCHED, oldConversation, currentConversation);
}
}
@@ -128,7 +140,7 @@
// long-running conversations
public void cleanupConversation()
{
- log.trace("Cleaning up conversation for " + currentConversation);
+ log.trace(CLEANING_UP_CONVERSATION, currentConversation);
String cid = currentConversation.getUnderlyingId();
if (!currentConversation.isTransient())
{
@@ -150,14 +162,15 @@
ConversationEntry conversationEntry = ConversationEntry.of(getBeanStore(cid), currentConversation, terminationHandle);
longRunningConversations.put(cid, conversationEntry);
}
- log.trace("Scheduled " + currentConversation + " for termination, there are now " + longRunningConversations.size() + " long-running conversations");
+ log.trace(CONVERSATION_TERMINATION_SCHEDULED, currentConversation);
+ log.trace(LRC_COUNT, longRunningConversations.size());
}
else
{
// If the conversation is not long-running it can be a transient
// conversation that has been so from the start or it can be a
// long-running conversation that has been demoted during the request
- log.trace("Destroying transient conversation " + currentConversation);
+ log.trace(DESTROY_TRANSIENT_COVERSATION, currentConversation);
ConversationEntry longRunningConversation = longRunningConversations.remove(cid);
if (longRunningConversation != null)
{
@@ -219,17 +232,19 @@
*/
public void run()
{
- log.debug("Conversation " + cid + " timed out. Destroying it");
+ log.debug(DESTROY_LRC, cid, "conversation timed out");
longRunningConversations.remove(cid).destroy();
- log.trace("There are now " + longRunningConversations.size() + " long-running conversations");
+ log.trace(LRC_COUNT, longRunningConversations.size());
}
}
public void destroyAllConversations()
{
- log.debug("Destroying " + longRunningConversations.size() + " long-running conversations");
+ log.debug(DESTROY_ALL_LRC, "session ended");
+ log.trace(LRC_COUNT, longRunningConversations.size());
for (ConversationEntry conversationEntry : longRunningConversations.values())
{
+ log.debug(DESTROY_LRC, conversationEntry, "session ended");
conversationEntry.destroy();
}
longRunningConversations.clear();
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationEntry.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationEntry.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationEntry.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,14 +16,22 @@
*/
package org.jboss.weld.conversation;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_LOCKED;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_TERMINATION_CANCELLATION_FAILED;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_TERMINATION_CANCELLED;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_UNAVAILBLE;
+import static org.jboss.weld.messages.ConversationMessages.CONVERSATION_UNLOCKED;
+import static org.jboss.weld.messages.ConversationMessages.ILLEGAL_CONVERSATION_UNLOCK_ATTEMPT;
+import static org.jboss.weld.util.log.Categories.CONVERSATION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
import org.jboss.weld.context.ConversationContext;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* Represents a long-running conversation entry
@@ -32,7 +40,7 @@
*/
public class ConversationEntry
{
- private static LogProvider log = Logging.getLogProvider(ConversationEntry.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONVERSATION);
// The conversation
private ConversationImpl conversation;
@@ -56,7 +64,6 @@
this.conversation = new ConversationImpl(conversation);
this.terminationHandle = terminationHandle;
this.concurrencyLock = new ReentrantLock();
- log.trace("Created new conversation entry for conversation " + conversation);
}
/**
@@ -85,11 +92,11 @@
boolean success = terminationHandle.cancel(false);
if (success)
{
- log.trace("Termination of conversation " + conversation + " cancelled");
+ log.trace(CONVERSATION_TERMINATION_CANCELLED, conversation);
}
else
{
- log.warn("Failed to cancel termination of conversation " + conversation);
+ log.warn(CONVERSATION_TERMINATION_CANCELLATION_FAILED, conversation);
}
return success;
}
@@ -99,7 +106,6 @@
*/
public void destroy()
{
- log.debug("Destroying conversation " + conversation);
if (!terminationHandle.isCancelled())
{
cancelTermination();
@@ -107,7 +113,6 @@
ConversationContext terminationContext = new ConversationContext();
terminationContext.setBeanStore(beanStore);
terminationContext.destroy();
- log.trace("Conversation " + conversation + " destroyed");
}
/**
@@ -122,11 +127,11 @@
boolean success = concurrencyLock.tryLock(timeout, TimeUnit.MILLISECONDS);
if (success)
{
- log.trace("Conversation " + conversation + " locked");
+ log.trace(CONVERSATION_LOCKED, conversation);
}
else
{
- log.warn("Failed to lock conversation " + conversation + " in " + timeout + "ms");
+ log.warn(CONVERSATION_UNAVAILBLE, timeout, conversation);
}
return success;
}
@@ -145,11 +150,11 @@
if (concurrencyLock.isHeldByCurrentThread())
{
concurrencyLock.unlock();
- log.trace("Unlocked conversation " + conversation);
+ log.trace(CONVERSATION_UNLOCKED, conversation);
}
else
{
- log.warn("Unlock attempt by non-owner on conversation " + conversation);
+ log.warn(ILLEGAL_CONVERSATION_UNLOCK_ATTEMPT, conversation, "not owner");
}
return !concurrencyLock.isLocked();
}
@@ -162,7 +167,6 @@
public void reScheduleTermination(Future<?> terminationHandle)
{
this.terminationHandle = terminationHandle;
- log.trace("Conversation " + conversation + " re-scheduled for termination");
}
public ConversationImpl getConversation()
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,12 @@
*/
package org.jboss.weld.conversation;
+import static org.jboss.weld.messages.ConversationMessages.DEMOTED_LRC;
+import static org.jboss.weld.messages.ConversationMessages.PROMOTED_TRANSIENT;
+import static org.jboss.weld.messages.ConversationMessages.SWITCHED_CONVERSATION;
+import static org.jboss.weld.util.log.Categories.CONVERSATION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.io.Serializable;
import javax.enterprise.context.Conversation;
@@ -24,8 +30,7 @@
import javax.inject.Inject;
import javax.inject.Named;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
/**
* The current conversation implementation
@@ -44,7 +49,7 @@
*/
private static final long serialVersionUID = 5262382965141841363L;
- private static LogProvider log = Logging.getLogProvider(ConversationImpl.class);
+ private static final LocLogger log = loggerFactory().getLogger(CONVERSATION);
// The conversation ID
private String id;
@@ -86,7 +91,6 @@
this.id = conversationIdGenerator.nextId();
this.timeout = timeout;
this._transient = true;
- log.debug("Created a new conversation " + this);
}
public void begin()
@@ -95,7 +99,7 @@
{
throw new IllegalStateException("Attempt to call begin() on a long-running conversation");
}
- log.debug("Promoted conversation " + id + " to long-running");
+ log.debug(PROMOTED_TRANSIENT, id);
this._transient = false;
}
@@ -119,7 +123,7 @@
{
throw new IllegalStateException("Attempt to call end() on a transient conversation");
}
- log.debug("Demoted conversation " + id + " to transient");
+ log.debug(DEMOTED_LRC, id);
this._transient = true;
}
@@ -164,11 +168,10 @@
*/
public void switchTo(ConversationImpl conversation)
{
- log.debug("Switched conversation from " + this);
+ log.debug(SWITCHED_CONVERSATION, this, conversation);
id = conversation.getUnderlyingId();
this._transient = conversation.isTransient();
timeout = conversation.getTimeout();
- log.debug(" to " + this);
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -24,9 +24,6 @@
import javax.enterprise.context.SessionScoped;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
-
/**
* A ConversationTerminator implementation using Java SE scheduling
*
@@ -38,13 +35,10 @@
{
private static final long serialVersionUID = 7258623232951724618L;
- private static LogProvider log = Logging.getLogProvider(JavaSEConversationTerminator.class);
-
private transient ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
public Future<?> scheduleForTermination(Runnable terminationTask, long timeoutInMilliseconds)
{
- log.trace("Recieved a termination task to be run in " + timeoutInMilliseconds + "ms");
return executor.schedule(terminationTask, timeoutInMilliseconds, TimeUnit.MILLISECONDS);
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/NumericConversationIdGenerator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/NumericConversationIdGenerator.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/NumericConversationIdGenerator.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -21,9 +21,6 @@
import javax.enterprise.context.SessionScoped;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
-
/**
* A ConversationIdGenerator implementation using running numerical values
*
@@ -36,7 +33,6 @@
{
private static final long serialVersionUID = -587408626962044442L;
- private static LogProvider log = Logging.getLogProvider(NumericConversationIdGenerator.class);
// The next conversation ID
private AtomicInteger id;
@@ -51,7 +47,6 @@
public String nextId()
{
int nextId = id.getAndIncrement();
- log.trace("Generated new conversation id " + nextId);
return String.valueOf(nextId);
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/ServletConversationManager.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -31,8 +31,6 @@
import javax.servlet.http.HttpSession;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.servlet.ConversationBeanStore;
/**
@@ -46,8 +44,6 @@
{
private static final long serialVersionUID = 1647848566880659085L;
- private static LogProvider log = Logging.getLogProvider(ServletConversationManager.class);
-
private static final long CONVERSATION_TIMEOUT_IN_MS = 10 * 60 * 1000;
private static final long CONVERSATION_CONCURRENT_ACCESS_TIMEOUT_IN_MS = 1 * 1000;
private static final String CONVERSATION_ID_NAME = "cid";
@@ -64,7 +60,6 @@
@ConversationInactivityTimeout
public static long getConversationTimeoutInMilliseconds()
{
- log.trace("Produced conversation timeout " + CONVERSATION_TIMEOUT_IN_MS);
return CONVERSATION_TIMEOUT_IN_MS;
}
@@ -72,7 +67,6 @@
@ConversationConcurrentAccessTimeout
public static long getConversationConcurrentAccessTimeout()
{
- log.trace("Produced conversation concurrent access timeout " + CONVERSATION_CONCURRENT_ACCESS_TIMEOUT_IN_MS);
return CONVERSATION_CONCURRENT_ACCESS_TIMEOUT_IN_MS;
}
@@ -80,7 +74,6 @@
@ConversationIdName
public static String getConversationIdName()
{
- log.trace("Produced conversation id name " + CONVERSATION_ID_NAME);
return CONVERSATION_ID_NAME;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,9 +16,15 @@
*/
package org.jboss.weld.event;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
+import static org.jboss.weld.messages.EventMessages.ASYNC_OBSERVER_FAILURE;
+import static org.jboss.weld.messages.EventMessages.ASYNC_TX_FIRE;
+import static org.jboss.weld.util.log.Categories.EVENT;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+import org.slf4j.cal10n.LocLogger;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLogger.Level;
+
/**
* A deferred event notification that will be delivered during the appropriate
* transaction phase, but asynchronously from the thread which generated the
@@ -29,7 +35,8 @@
*/
public class AsynchronousTransactionalEventNotification<T> extends DeferredEventNotification<T>
{
- private static Log log = Logging.getLog(DeferredEventNotification.class);
+ private static final LocLogger log = loggerFactory().getLogger(EVENT);
+ private static final XLogger xLog = loggerFactory().getXLogger(EVENT);
public AsynchronousTransactionalEventNotification(T event, ObserverMethodImpl<?, T> observer)
{
@@ -42,12 +49,13 @@
// Let the event be deferred again as just an asynchronous event
try
{
- log.trace("Sending event [" + event + "] asynchronously to transaction observer " + observer);
+ log.trace(ASYNC_TX_FIRE, event, observer);
observer.sendEventAsynchronously(event);
}
catch (Exception e)
{
- log.error("Failure while queuing observer for event [" + event + "]", e);
+ log.error(ASYNC_OBSERVER_FAILURE, event);
+ xLog.throwing(Level.DEBUG, e);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,13 +16,19 @@
*/
package org.jboss.weld.event;
+import static org.jboss.weld.messages.EventMessages.ASYNC_FIRE;
+import static org.jboss.weld.messages.EventMessages.ASYNC_OBSERVER_FAILURE;
+import static org.jboss.weld.util.log.Categories.EVENT;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import org.jboss.weld.Container;
import org.jboss.weld.bootstrap.api.Lifecycle;
import org.jboss.weld.context.ContextLifecycle;
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
+import org.slf4j.cal10n.LocLogger;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLogger.Level;
/**
* A task that will notify the observer of a specific event at some future time.
@@ -31,7 +37,8 @@
*/
public class DeferredEventNotification<T> implements Runnable
{
- private static Log log = Logging.getLog(DeferredEventNotification.class);
+ private static final LocLogger log = loggerFactory().getLogger(EVENT);
+ private static final XLogger xLog = loggerFactory().getXLogger(EVENT);
// The observer
protected final ObserverMethodImpl<?, T> observer;
@@ -54,7 +61,7 @@
{
try
{
- log.debug("Sending event [" + event + "] directly to observer " + observer);
+ log.debug(ASYNC_FIRE, event, observer);
new RunInRequest()
{
@@ -69,7 +76,8 @@
}
catch (Exception e)
{
- log.error("Failure while notifying an observer of event [" + event + "]", e);
+ log.error(ASYNC_OBSERVER_FAILURE, event);
+ xLog.throwing(Level.DEBUG, e);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,11 @@
*/
package org.jboss.weld.jsf;
+import static org.jboss.weld.messages.JsfMessages.FOUND_CONVERSATION_FROM_REQUEST;
+import static org.jboss.weld.messages.JsfMessages.RESUMING_CONVERSATION;
+import static org.jboss.weld.util.log.Categories.JSF;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import javax.enterprise.inject.AnnotationLiteral;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
@@ -24,10 +29,9 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.Container;
import org.jboss.weld.conversation.ConversationIdName;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.servlet.ServletHelper;
import org.jboss.weld.util.Reflections;
+import org.slf4j.cal10n.LocLogger;
/**
* Helper class for JSF related operations
@@ -37,7 +41,7 @@
*/
public class JsfHelper
{
- private static LogProvider log = Logging.getLogProvider(JsfHelper.class);
+ private static final LocLogger log = loggerFactory().getLogger(JSF);
/**
* Checks if the current request is a JSF postback. The JsfApiAbstraction is
@@ -70,7 +74,7 @@
BeanManagerImpl moduleBeanManager = JsfHelper.getModuleBeanManager(facesContext);
String cidName = moduleBeanManager.getInstanceByType(String.class, new AnnotationLiteral<ConversationIdName>(){});
String cid = facesContext.getExternalContext().getRequestParameterMap().get(cidName);
- log.trace("Found conversation id " + cid + " in request parameter");
+ log.trace(FOUND_CONVERSATION_FROM_REQUEST, cid);
return cid;
}
@@ -82,7 +86,7 @@
public static String getConversationId(FacesContext facesContext)
{
String cid = getConversationIdFromRequest(facesContext);
- log.debug("Resuming conversation with id " + cid);
+ log.debug(RESUMING_CONVERSATION, cid);
return cid;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -25,6 +25,11 @@
import static org.jboss.weld.jsf.JsfHelper.getConversationId;
import static org.jboss.weld.jsf.JsfHelper.getHttpSession;
import static org.jboss.weld.jsf.JsfHelper.getModuleBeanManager;
+import static org.jboss.weld.messages.JsfMessages.CLEANING_UP_CONVERSATION;
+import static org.jboss.weld.messages.JsfMessages.INITIATING_CONVERSATION;
+import static org.jboss.weld.messages.JsfMessages.SKIPPING_CLEANING_UP_CONVERSATION;
+import static org.jboss.weld.util.log.Categories.JSF;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
@@ -39,10 +44,9 @@
import org.jboss.weld.context.SessionContext;
import org.jboss.weld.conversation.ConversationImpl;
import org.jboss.weld.conversation.ConversationManager;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.servlet.ConversationBeanStore;
import org.jboss.weld.servlet.HttpSessionManager;
+import org.slf4j.cal10n.LocLogger;
/**
* <p>
@@ -66,7 +70,7 @@
*/
public class WeldPhaseListener implements PhaseListener
{
- private static LogProvider log = Logging.getLogProvider(WeldPhaseListener.class);
+ private static final LocLogger log = loggerFactory().getLogger(JSF);
/**
* Execute before every phase in the JSF life cycle. The order this
@@ -110,7 +114,7 @@
*/
private void beforeRestoreView(FacesContext facesContext)
{
- log.trace("Initiating the session and conversation before the Restore View phase");
+ log.trace(INITIATING_CONVERSATION, "Restore View");
initiateSessionAndConversation(facesContext);
}
@@ -124,13 +128,13 @@
ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
if (sessionContext.isActive())
{
- log.trace("Cleaning up the conversation after the Render Response phase");
+ log.trace(CLEANING_UP_CONVERSATION, "Render Response", "response complete");
moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
conversationContext.setActive(false);
}
else
{
- log.trace("Skipping conversation cleanup after the Render Response phase because session has been terminated.");
+ log.trace(SKIPPING_CLEANING_UP_CONVERSATION, "Render Response", "session has been terminated");
}
}
@@ -143,12 +147,12 @@
SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
if (sessionContext.isActive())
{
- log.trace("Cleaning up the conversation after the " + phaseId + " phase as the response has been marked complete");
+ log.trace(CLEANING_UP_CONVERSATION, phaseId, "the response has been marked complete");
moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
}
else
{
- log.trace("Skipping conversation cleanup after the response has been marked complete because the session has been terminated.");
+ log.trace(SKIPPING_CLEANING_UP_CONVERSATION, phaseId, "session has been terminated");
}
}
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/BeanMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/BeanMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/BeanMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,35 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.bean")
+@LocaleData({
+ @Locale("en")
+})
+public enum BeanMessages
+{
+
+ FOUND_INJECTABLE_CONSTRUCTORS,
+ FOUND_ONE_INJECTABLE_CONSTRUCTOR,
+ FOUND_DEFAULT_CONSTRUCTOR,
+ FOUND_POST_CONSTRUCT_METHODS,
+ FOUND_ONE_POST_CONSTRUCT_METHOD,
+ FOUND_PRE_DESTROY_METHODS,
+ FOUND_ONE_PRE_DESTROY_METHOD,
+ CREATED_SESSION_BEAN_PROXY,
+ CALL_PROXIED_METHOD,
+ DYNAMIC_LOOKUP_OF_BUILT_IN_NOT_ALLOWED,
+ QUALIFIERS_USED,
+ USING_DEFAULT_QUALIFIER,
+ CREATING_BEAN,
+ USING_DEFAULT_NAME,
+ USING_NAME,
+ USING_SCOPE_FROM_STEREOTYPE,
+ USING_SCOPE,
+ USING_DEFAULT_SCOPE,
+ CIRCULAR_CALL,
+ ERROR_DESTROYING
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/BeanMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/BootstrapMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/BootstrapMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/BootstrapMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,25 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.bootstrap")
+@LocaleData({
+ @Locale("en")
+})
+public enum BootstrapMessages
+{
+
+ VALIDATING_BEANS,
+ JTA_UNAVAILABLE,
+ VERSION,
+ ENABLED_POLICIES,
+ ENABLED_DECORATORS,
+ ENABLED_INTERCEPTORS,
+ FOUND_BEAN,
+ FOUND_INTERCEPTOR,
+ FOUND_DECORATOR,
+ FOUND_OBSERVER_METHOD,
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/BootstrapMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/ContextMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/ContextMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/ContextMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,26 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.context")
+@LocaleData({
+ @Locale("en")
+})
+public enum ContextMessages
+{
+
+ CONTEXTUAL_INSTANCE_FOUND,
+ CONTEXT_CLEARED,
+ CONTEXTUAL_INSTANCE_ADDED,
+ CONTEXTUAL_INSTANCE_REMOVED,
+ SESSION_RESTORED,
+ SESSION_ENDED,
+ REQUEST_STARTED,
+ REQUEST_ENDED,
+ APPLICATION_STARTED,
+ APPLICATION_ENDED,
+ DEPENDENT_INSTANCE_ATTACHED
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/ContextMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/ConversationMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/ConversationMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/ConversationMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,35 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.conversation")
+@LocaleData({
+ @Locale("en")
+})
+public enum ConversationMessages
+{
+
+ NO_CONVERSATION_TO_RESTORE,
+ UNABLE_TO_RESTORE_CONVERSATION,
+ CONVERSATION_LOCK_UNAVAILABLE,
+ CONVERSATION_SWITCHED,
+ CLEANING_UP_CONVERSATION,
+ CONVERSATION_TERMINATION_SCHEDULED,
+ CONVERSATION_TERMINATION_CANCELLED,
+ CONVERSATION_TERMINATION_CANCELLATION_FAILED,
+ DESTROY_LRC_COMPLETE,
+ LRC_COUNT,
+ DESTROY_TRANSIENT_COVERSATION,
+ DESTROY_LRC,
+ DESTROY_ALL_LRC,
+ CONVERSATION_LOCKED,
+ CONVERSATION_UNLOCKED,
+ CONVERSATION_UNAVAILBLE,
+ ILLEGAL_CONVERSATION_UNLOCK_ATTEMPT,
+ PROMOTED_TRANSIENT,
+ DEMOTED_LRC,
+ SWITCHED_CONVERSATION
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/ConversationMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/EventMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/EventMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/EventMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,18 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.event")
+@LocaleData({
+ @Locale("en")
+})
+public enum EventMessages
+{
+
+ ASYNC_FIRE,
+ ASYNC_OBSERVER_FAILURE,
+ ASYNC_TX_FIRE
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/EventMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/JsfMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/JsfMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/JsfMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,20 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.jsf")
+@LocaleData({
+ @Locale("en")
+})
+public enum JsfMessages
+{
+
+ CLEANING_UP_CONVERSATION,
+ SKIPPING_CLEANING_UP_CONVERSATION,
+ INITIATING_CONVERSATION,
+ FOUND_CONVERSATION_FROM_REQUEST,
+ RESUMING_CONVERSATION
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/JsfMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/ReflectionMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/ReflectionMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/ReflectionMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,21 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.reflection")
+@LocaleData({
+ @Locale("en")
+})
+public enum ReflectionMessages
+{
+
+ MISSING_RETENTION,
+ MISSING_TARGET,
+ MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE,
+ TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE,
+ MISSING_TARGET_METHOD_FIELD_TYPE,
+ MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/ReflectionMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/messages/UtilMessages.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/messages/UtilMessages.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/messages/UtilMessages.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,17 @@
+package org.jboss.weld.messages;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.util")
+@LocaleData({
+ @Locale("en")
+})
+public enum UtilMessages
+{
+
+ SERVICE_LOADER_LOADING_ERROR,
+ SECURITY_EXCEPTION_SCANNING
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/messages/UtilMessages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,10 @@
*/
package org.jboss.weld.metadata.cache;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_RETENTION;
+import static org.jboss.weld.util.log.Categories.REFLECTION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -23,9 +27,8 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.introspector.WeldAnnotation;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
+import org.slf4j.cal10n.LocLogger;
/**
* Abstract representation of an annotation model
@@ -34,7 +37,7 @@
*/
public abstract class AnnotationModel<T extends Annotation>
{
- private static final Log log = Logging.getLog(AnnotationModel.class);
+ private static final LocLogger log = loggerFactory().getLogger(REFLECTION);
// The underlying annotation
private WeldAnnotation<T> annotatedAnnotation;
@@ -88,7 +91,7 @@
if (annotatedAnnotation.isAnnotationPresent(Retention.class) && !annotatedAnnotation.getAnnotation(Retention.class).value().equals(RetentionPolicy.RUNTIME))
{
this.valid = false;
- log.debug("#0 is missing @Retention(RUNTIME)", annotatedAnnotation);
+ log.debug(MISSING_RETENTION, annotatedAnnotation);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -25,8 +25,6 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.introspector.WeldMethod;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Reflections;
import org.jboss.weld.util.collections.Arrays2;
@@ -43,7 +41,6 @@
private static final Set<Class<? extends Annotation>> META_ANNOTATIONS = Arrays2.<Class<? extends Annotation>>asSet(Qualifier.class);
- private static final Log log = Logging.getLog(BindingTypeModel.class);
// The non-binding types
private Set<WeldMethod<?, ?>> nonBindingTypes;
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -17,31 +17,35 @@
package org.jboss.weld.metadata.cache;
-import org.jboss.weld.introspector.WeldMethod;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
-import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.util.collections.Arrays2;
-import org.jboss.weld.util.Reflections;
-import org.jboss.weld.DefinitionException;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_TARGET;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE;
+import static org.jboss.weld.messages.ReflectionMessages.TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE;
+import static org.jboss.weld.util.log.Categories.REFLECTION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
-import javax.interceptor.InterceptorBinding;
-import javax.enterprise.inject.Nonbinding;
import java.lang.annotation.Annotation;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
import java.lang.reflect.InvocationTargetException;
import java.util.Set;
+import javax.enterprise.inject.Nonbinding;
+import javax.interceptor.InterceptorBinding;
+
+import org.jboss.weld.DefinitionException;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.util.Reflections;
+import org.jboss.weld.util.collections.Arrays2;
+import org.slf4j.cal10n.LocLogger;
+
/**
* @author Marius Bogoevici
*/
public class InterceptorBindingModel<T extends Annotation> extends AnnotationModel<T>
{
private static final Set<Class<? extends Annotation>> META_ANNOTATIONS = Arrays2.<Class<? extends Annotation>>asSet(InterceptorBinding.class);
- private static final Log log = Logging.getLog(BindingTypeModel.class);
+ private static final LocLogger log = loggerFactory().getLogger(REFLECTION);
private Set<WeldMethod<?,?>> nonBindingTypes;
private Set<Annotation> inheritedInterceptionBindingTypes;
private Set<Annotation> metaAnnotations;
@@ -59,6 +63,7 @@
}
}
+ @Override
protected Set<Class<? extends Annotation>> getMetaAnnotationTypes()
{
return META_ANNOTATIONS;
@@ -86,7 +91,7 @@
if (!getAnnotatedAnnotation().isAnnotationPresent(Target.class))
{
this.valid = false;
- log.debug("#0 is missing @Target", getAnnotatedAnnotation());
+ log.debug(MISSING_TARGET, getAnnotatedAnnotation());
}
else
{
@@ -95,7 +100,7 @@
&& !Arrays2.unorderedEquals(targetElementTypes, ElementType.TYPE))
{
this.valid = false;
- log.debug("#0 is not declared @Target(TYPE, METHOD) or @Target(TYPE)");
+ log.debug(MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE, getAnnotatedAnnotation());
}
}
}
@@ -109,7 +114,7 @@
if (!Arrays2.containsAll(inheritedBinding.annotationType().getAnnotation(Target.class).value(), ElementType.METHOD))
{
this.valid = false;
- log.debug("#0 is declared @Target(TYPE, METHOD), but inherits #1, which is declared @Target(TYPE)",
+ log.debug(TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE,
getAnnotatedAnnotation(), inheritedBinding);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/ScopeModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/ScopeModel.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/ScopeModel.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -19,6 +19,10 @@
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_TARGET;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_TARGET_METHOD_FIELD_TYPE;
+import static org.jboss.weld.util.log.Categories.REFLECTION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
import java.lang.annotation.Annotation;
import java.lang.annotation.Target;
@@ -27,10 +31,9 @@
import javax.enterprise.context.NormalScope;
import javax.inject.Scope;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.collections.Arrays2;
+import org.slf4j.cal10n.LocLogger;
/**
*
@@ -44,7 +47,7 @@
private static final Set<Class<? extends Annotation>> META_ANNOTATIONS = Arrays2.asSet(Scope.class, NormalScope.class);
- private static final Log log = Logging.getLog(ScopeModel.class);
+ private static final LocLogger log = loggerFactory().getLogger(REFLECTION);
private final boolean normal;
private final boolean passivating;
@@ -84,12 +87,12 @@
if (!getAnnotatedAnnotation().isAnnotationPresent(Target.class))
{
this.valid = false;
- log.debug("#0 is missing @Target annotation.", getAnnotatedAnnotation());
+ log.debug(MISSING_TARGET, getAnnotatedAnnotation());
}
else if (!Arrays2.unorderedEquals(getAnnotatedAnnotation().getAnnotation(Target.class).value(), METHOD, FIELD, TYPE))
{
this.valid = false;
- log.debug("#0 is has incorrect @Target annotation. Should be @Target(METHOD, FIELD, TYPE).", getAnnotatedAnnotation());
+ log.debug(MISSING_TARGET_METHOD_FIELD_TYPE, getAnnotatedAnnotation());
}
}
@@ -118,6 +121,7 @@
*
* @return The ScopeType class
*/
+ @Override
protected Set<Class<? extends Annotation>> getMetaAnnotationTypes()
{
return META_ANNOTATIONS;
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -19,6 +19,10 @@
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_TARGET;
+import static org.jboss.weld.messages.ReflectionMessages.MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD;
+import static org.jboss.weld.util.log.Categories.REFLECTION;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
import java.lang.annotation.Annotation;
import java.lang.annotation.Target;
@@ -34,10 +38,9 @@
import javax.interceptor.InterceptorBinding;
import org.jboss.weld.DefinitionException;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.collections.Arrays2;
+import org.slf4j.cal10n.LocLogger;
/**
* A meta model for a stereotype, allows us to cache a stereotype and to
@@ -49,7 +52,7 @@
public class StereotypeModel<T extends Annotation> extends AnnotationModel<T>
{
private static final Set<Class<? extends Annotation>> META_ANNOTATIONS = Arrays2.<Class<? extends Annotation>>asSet(Stereotype.class);
- private static final Log log = Logging.getLog(StereotypeModel.class);
+ private static final LocLogger log = loggerFactory().getLogger(REFLECTION);
// Is the stereotype a policy
private boolean policy;
@@ -163,7 +166,7 @@
if (!getAnnotatedAnnotation().isAnnotationPresent(Target.class))
{
this.valid = false;
- log.debug("#0 is missing @Target annotation.", getAnnotatedAnnotation());
+ log.debug(MISSING_TARGET, getAnnotatedAnnotation());
}
else if (!(
Arrays2.unorderedEquals(getAnnotatedAnnotation().getAnnotation(Target.class).value(), METHOD, FIELD, TYPE) ||
@@ -174,7 +177,7 @@
))
{
this.valid = false;
- log.debug("#0 is has incorrect @Target annotation. Should be @Target(METHOD, FIELD, TYPE, PARAMETER), @Target(METHOD, TYPE), @Target(METHOD), @Target(TYPE) or @Target(FIELD).", getAnnotatedAnnotation());
+ log.debug(MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD, getAnnotatedAnnotation());
}
}
@@ -215,6 +218,7 @@
*
* @return The Stereotype class
*/
+ @Override
protected Set<Class<? extends Annotation>> getMetaAnnotationTypes()
{
return META_ANNOTATIONS;
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -31,8 +31,6 @@
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.weld.conversation.ConversationManager;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
/**
* Implementation of the Weld lifecycle that can react to servlet events
@@ -48,8 +46,6 @@
private final ContextLifecycle lifecycle;
public static final String REQUEST_ATTRIBUTE_NAME = ServletLifecycle.class.getName() + ".requestBeanStore";
-
- private static LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
/**
*
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,16 @@
*/
package org.jboss.weld.util;
+import static org.jboss.weld.messages.BeanMessages.FOUND_DEFAULT_CONSTRUCTOR;
+import static org.jboss.weld.messages.BeanMessages.FOUND_INJECTABLE_CONSTRUCTORS;
+import static org.jboss.weld.messages.BeanMessages.FOUND_ONE_INJECTABLE_CONSTRUCTOR;
+import static org.jboss.weld.messages.BeanMessages.FOUND_ONE_POST_CONSTRUCT_METHOD;
+import static org.jboss.weld.messages.BeanMessages.FOUND_ONE_PRE_DESTROY_METHOD;
+import static org.jboss.weld.messages.BeanMessages.FOUND_POST_CONSTRUCT_METHODS;
+import static org.jboss.weld.messages.BeanMessages.FOUND_PRE_DESTROY_METHODS;
+import static org.jboss.weld.util.log.Categories.BEAN;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -63,12 +73,11 @@
import org.jboss.weld.introspector.WeldMember;
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.introspector.WeldParameter;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.BindingTypeModel;
import org.jboss.weld.metadata.cache.InterceptorBindingModel;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.persistence.PersistenceApiAbstraction;
+import org.slf4j.cal10n.LocLogger;
import com.google.common.base.Supplier;
import com.google.common.collect.Multimap;
@@ -83,9 +92,9 @@
*/
public class Beans
{
+ // TODO Convert messages
+ private static final LocLogger log = loggerFactory().getLogger(BEAN);
- private static final Log log = Logging.getLog(Beans.class);
-
/**
* Indicates if a bean's scope type is passivating
*
@@ -185,7 +194,7 @@
public static WeldMethod<?, ?> getPostConstruct(WeldClass<?> type)
{
Set<WeldMethod<?, ?>> postConstructMethods = type.getAnnotatedWeldMethods(PostConstruct.class);
- log.trace("Found " + postConstructMethods + " constructors annotated with @Initializer for " + type);
+ log.trace(FOUND_POST_CONSTRUCT_METHODS, postConstructMethods, type);
if (postConstructMethods.size() > 1)
{
throw new DefinitionException("Cannot have more than one post construct method annotated with @PostConstruct for " + type);
@@ -193,7 +202,7 @@
else if (postConstructMethods.size() == 1)
{
WeldMethod<?, ?> postConstruct = postConstructMethods.iterator().next();
- log.trace("Exactly one post construct method (" + postConstruct + ") for " + type);
+ log.trace(FOUND_ONE_POST_CONSTRUCT_METHOD, postConstruct, type);
return postConstruct;
}
else
@@ -205,7 +214,7 @@
public static WeldMethod<?, ?> getPreDestroy(WeldClass<?> type)
{
Set<WeldMethod<?, ?>> preDestroyMethods = type.getAnnotatedWeldMethods(PreDestroy.class);
- log.trace("Found " + preDestroyMethods + " constructors annotated with @Initializer for " + type);
+ log.trace(FOUND_PRE_DESTROY_METHODS, preDestroyMethods, type);
if (preDestroyMethods.size() > 1)
{
// TODO actually this is wrong, in EJB you can have @PreDestroy methods
@@ -215,7 +224,7 @@
else if (preDestroyMethods.size() == 1)
{
WeldMethod<?, ?> preDestroy = preDestroyMethods.iterator().next();
- log.trace("Exactly one post construct method (" + preDestroy + ") for " + type);
+ log.trace(FOUND_ONE_PRE_DESTROY_METHOD, preDestroy, type);
return preDestroy;
}
else
@@ -607,7 +616,7 @@
{
ConstructorInjectionPoint<T> constructor = null;
Set<WeldConstructor<T>> initializerAnnotatedConstructors = type.getAnnotatedWeldConstructors(Inject.class);
- log.trace("Found " + initializerAnnotatedConstructors + " constructors annotated with @Initializer for " + type);
+ log.trace(FOUND_INJECTABLE_CONSTRUCTORS, initializerAnnotatedConstructors, type);
if (initializerAnnotatedConstructors.size() > 1)
{
if (initializerAnnotatedConstructors.size() > 1)
@@ -618,13 +627,13 @@
else if (initializerAnnotatedConstructors.size() == 1)
{
constructor = ConstructorInjectionPoint.of(declaringBean, initializerAnnotatedConstructors.iterator().next());
- log.trace("Exactly one constructor (" + constructor + ") annotated with @Initializer defined, using it as the bean constructor for " + type);
+ log.trace(FOUND_ONE_INJECTABLE_CONSTRUCTOR, constructor, type);
}
else if (type.getNoArgsWeldConstructor() != null)
{
constructor = ConstructorInjectionPoint.of(declaringBean, type.getNoArgsWeldConstructor());
- log.trace("Exactly one constructor (" + constructor + ") defined, using it as the bean constructor for " + type);
+ log.trace(FOUND_DEFAULT_CONSTRUCTOR, constructor, type);
}
if (constructor == null)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -16,6 +16,10 @@
*/
package org.jboss.weld.util;
+import static org.jboss.weld.messages.UtilMessages.SECURITY_EXCEPTION_SCANNING;
+import static org.jboss.weld.util.log.Categories.UTIL;
+import static org.jboss.weld.util.log.LoggerFactory.loggerFactory;
+
import java.beans.Introspector;
import java.io.Serializable;
import java.lang.annotation.Annotation;
@@ -41,9 +45,10 @@
import javax.inject.Qualifier;
import org.jboss.weld.DeploymentException;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.util.reflection.ParameterizedTypeImpl;
+import org.slf4j.cal10n.LocLogger;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLogger.Level;
/**
* Utility class for static reflection-type operations
@@ -54,7 +59,8 @@
public class Reflections
{
- private static final Log log = Logging.getLog(Reflections.class);
+ private static final LocLogger log = loggerFactory().getLogger(UTIL);
+ private static final XLogger xLog = loggerFactory().getXLogger(UTIL);
public static final Type[] EMPTY_TYPES = {};
@@ -172,7 +178,8 @@
catch (AccessControlException e)
{
// TODO Hmm, is this a hack?
- log.trace("Security exception scanning " + clazz.getName(), e);
+ log.trace(SECURITY_EXCEPTION_SCANNING, clazz);
+ xLog.throwing(Level.TRACE, e);
}
}
Added: core/trunk/impl/src/main/java/org/jboss/weld/util/log/Categories.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/log/Categories.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/log/Categories.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,35 @@
+package org.jboss.weld.util.log;
+
+public enum Categories
+{
+
+ BOOTSTRAP("WeldBootstrap"),
+ UTIL("WeldUtilities"),
+ BEAN("Bean"),
+ SERVLET("Servlet"),
+ REFLECTION("Reflection"),
+ JSF("JSF"),
+ EVENT("Event"),
+ CONVERSATION("Conversation"),
+ CONTEXT("Context");
+
+ private static final String LOG_PREFIX = "org.jboss.weld.";
+
+ private final String name;
+
+ Categories(String name)
+ {
+ this.name = createName(name);
+ }
+
+ String getName()
+ {
+ return name;
+ }
+
+ private static String createName(String name)
+ {
+ return new StringBuilder().append(LOG_PREFIX).append(name).toString();
+ }
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/util/log/Categories.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/util/log/IMessageConveyerFactory.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/log/IMessageConveyerFactory.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/log/IMessageConveyerFactory.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,26 @@
+package org.jboss.weld.util.log;
+
+import java.util.Locale;
+
+import ch.qos.cal10n.IMessageConveyor;
+
+public interface IMessageConveyerFactory
+{
+
+ /**
+ * Get the message conveyer for the default locale.
+ *
+ * By default, Locale.getDefault() will be used as the locale, but a custom
+ * implementation of MessageConveyerFactory may choose to use an alternative
+ * locale.
+ *
+ */
+ public abstract IMessageConveyor getDefaultMessageConveyer();
+
+ /**
+ * Get the message conveyer for the given locale.
+ *
+ */
+ public abstract IMessageConveyor getMessageConveyer(Locale locale);
+
+}
\ No newline at end of file
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/util/log/IMessageConveyerFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/util/log/LoggerFactory.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/log/LoggerFactory.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/log/LoggerFactory.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,37 @@
+package org.jboss.weld.util.log;
+
+import org.slf4j.cal10n.LocLogger;
+import org.slf4j.cal10n.LocLoggerFactory;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+import ch.qos.cal10n.IMessageConveyor;
+
+public class LoggerFactory
+{
+
+ private static LoggerFactory INSTANCE = new LoggerFactory();
+
+ private final LocLoggerFactory locLoggerFactory;
+
+ private LoggerFactory()
+ {
+ IMessageConveyor messageConveyor = new MessageConveyerFactoryLoader().getMessageConveyerFactory().getDefaultMessageConveyer();
+ this.locLoggerFactory = new LocLoggerFactory(messageConveyor);
+ }
+
+ public LocLogger getLogger(Categories category)
+ {
+ return locLoggerFactory.getLocLogger(category.getName());
+ }
+
+ public XLogger getXLogger(Categories category)
+ {
+ return XLoggerFactory.getXLogger(category.getName());
+ }
+
+ public static LoggerFactory loggerFactory()
+ {
+ return INSTANCE;
+ }
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/util/log/LoggerFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/impl/src/main/java/org/jboss/weld/util/log/MessageConveyerFactoryLoader.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/log/MessageConveyerFactoryLoader.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/log/MessageConveyerFactoryLoader.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,70 @@
+package org.jboss.weld.util.log;
+
+import java.util.Locale;
+
+import org.jboss.weld.util.serviceProvider.ServiceLoader;
+
+import ch.qos.cal10n.IMessageConveyor;
+import ch.qos.cal10n.MessageConveyor;
+
+/**
+ * A factory for message conveyers, that looks for service providers which will
+ * convey a message.
+ *
+ * If none are found, the default {@link MessageConveyor} is used.
+ *
+ * @author pmuir
+ *
+ */
+public class MessageConveyerFactoryLoader
+{
+
+ private static IMessageConveyerFactory load()
+ {
+ ServiceLoader<IMessageConveyerFactory> serviceLoader = ServiceLoader.load(IMessageConveyerFactory.class);
+ int i = 0;
+ for (IMessageConveyerFactory f : serviceLoader)
+ {
+ if (i > 0)
+ {
+ throw new IllegalStateException("Maximum one service provider for IMessageConveyerFactory allowed, got " + serviceLoader);
+ }
+ return f;
+ }
+ return new DefaultMessageConveyerFactory();
+ }
+
+ private static class DefaultMessageConveyerFactory implements IMessageConveyerFactory
+ {
+ private final IMessageConveyor defaultMessageConveyer;
+
+ public DefaultMessageConveyerFactory()
+ {
+ this.defaultMessageConveyer = new MessageConveyor(Locale.ENGLISH);
+ }
+
+ public IMessageConveyor getDefaultMessageConveyer()
+ {
+ return defaultMessageConveyer;
+ }
+
+ public IMessageConveyor getMessageConveyer(Locale locale)
+ {
+ return new MessageConveyor(locale);
+ }
+
+ }
+
+ private IMessageConveyerFactory factory;
+
+ public MessageConveyerFactoryLoader()
+ {
+ this.factory = load();
+ }
+
+ public IMessageConveyerFactory getMessageConveyerFactory()
+ {
+ return factory;
+ }
+
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/util/log/MessageConveyerFactoryLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/ServiceLoader.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/ServiceLoader.java 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/ServiceLoader.java 2009-10-29 13:15:45 UTC (rev 4402)
@@ -27,9 +27,12 @@
import java.util.Iterator;
import java.util.Set;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
import org.jboss.weld.util.Reflections;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+import org.slf4j.ext.XLogger.Level;
/**
* This class handles looking up service providers on the class path. It
@@ -49,7 +52,8 @@
public class ServiceLoader<S> implements Iterable<S>
{
- private Log log = Logging.getLog(ServiceLoader.class);
+ private static Logger log = LoggerFactory.getLogger(ServiceLoader.class);
+ private static XLogger xLog = XLoggerFactory.getXLogger(ServiceLoader.class);
private static final String SERVICES = "META-INF/services/";
@@ -201,23 +205,27 @@
}
catch (NoClassDefFoundError e)
{
- log.warn("Error loading #0", line, e);
+ log.warn("Error loading line", line);
+ xLog.throwing(Level.DEBUG, e);
throw e;
}
catch (InstantiationException e)
{
- log.warn("Error loading #0", line, e);
+ log.warn("Error loading line", line);
+ xLog.throwing(Level.DEBUG, e);
throw e;
}
catch (IllegalAccessException e)
{
- log.warn("Error loading #0", line, e);
+ log.warn("Error loading line", line);
+ xLog.throwing(Level.DEBUG, e);
throw e;
}
}
}
catch (Exception e)
{
+ // TODO Don't use exceptions for flow control!
// try the next line
}
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,20 @@
+FOUND_INJECTABLE_CONSTRUCTORS=Found {0} constructors annotated with @Inject for {1}
+FOUND_DEFAULT_CONSTRUCTOR=Exactly one constructor ({0}) defined, using it as the bean constructor for {1}
+FOUND_ONE_POST_CONSTRUCT_METHOD=Exactly one post construct method ({0}) for {1}
+FOUND_POST_CONSTRUCT_METHODS=Found {0} methods annotated with @PostConstruct for {1}
+FOUND_ONE_INJECTABLE_CONSTRUCTOR=Exactly one constructor ({0}) annotated with @Inject defined, using it as the bean constructor for {1}
+FOUND_ONE_PRE_DESTROY_METHOD=Exactly one pre destroy method ({0}) for {1}
+FOUND_PRE_DESTROY_METHODS=Found {0} methods annotated with @reDestroy for {1}
+CREATED_SESSION_BEAN_PROXY=Created session bean proxy for {0}
+CALL_PROXIED_METHOD=Called {0} on {1} with parameters {2} which returned {3}
+DYNAMIC_LOOKUP_OF_BUILT_IN_NOT_ALLOWED=Dynamic lookup of {0} is not supported
+QUALIFIERS_USED=Using qualifiers {0} for {1}
+USING_DEFAULT_QUALIFIER=Adding @Default qualifier for {0}
+USING_DEFAULT_NAME=Using default name {0} for {1}
+USING_NAME=Using name {0} for {1}
+CREATING_BEAN=Building bean metadata for {0}
+USING_SCOPE_FROM_STEREOTYPE=Using scope {0} for {1} from merged stereotypes {2}
+USING_SCOPE=Using scope {0} for {1}
+USING_DEFAULT_SCOPE=Using default @Dependent scope for {0}
+CIRCULAR_CALL=Executing producer field or method {0} on incomplete declaring bean {1} due to circular injection
+ERROR_DESTROYING=Error destroying an instance {0} of {1}
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,10 @@
+VALIDATING_BEANS=Weld initialized. Validating beans
+JTA_UNAVAILABLE=Transactional services not available. Injection of @Current UserTransaction not available. Transactional observers will be invoked synchronously.
+VERSION=Weld {0}
+ENABLED_POLICIES=Enabled policies for {0}: {1} {2}
+ENABLED_DECORATORS=Enabled decorator types for {0}: {1}
+ENABLED_INTERCEPTORS=Enabled interceptor types for {0}: {1}
+FOUND_BEAN=Bean: {0}
+FOUND_INTERCEPTOR=Interceptor: {0}
+FOUND_DECORATOR=Decorator: {0}
+FOUND_OBSERVER_METHOD=ObserverMethod: {0}
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/context_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/context_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/context_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,11 @@
+CONTEXTUAL_INSTANCE_FOUND=Looked for {0} and got {1} in {2}
+CONTEXT_CLEARED=Context {0} cleared
+CONTEXTUAL_INSTANCE_REMOVED=Removed {0} from {1}
+CONTEXTUAL_INSTANCE_ADDED=Added {0} with key {1} to {2}
+SESSION_RESTORED=Restoring session {0}
+SESSION_ENDED=Ending session {0}
+REQUEST_STARTED=Starting request {0}
+REQUEST_ENDED=Ending request {0}
+APPLICATION_STARTED=Starting application {0}
+APPLICATION_ENDED=Ending application {0}
+DEPENDENT_INSTANCE_ATTACHED=Attached dependent instance {0} to {1}
\ No newline at end of file
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/context_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,21 @@
+NO_CONVERSATION_TO_RESTORE=No conversation id to restore
+UNABLE_TO_RESTORE_CONVERSATION=Could not restore long-running conversation {0} because {1}
+CONVERSATION_LOCK_UNAVAILABLE=Interrupted while trying to acquire lock
+CONVERSATION_LOCKED=Lock acquired on conversation {0}
+CONVERSATION_UNAVAILBLE=Failed to acquire conversation lock in {0} for {1}
+CONVERSATION_UNLOCKED=Lock released on conversation {0}
+ILLEGAL_CONVERSATION_UNLOCK_ATTEMPT=Attempt to release lock on conversation {0} failed because {1}
+CONVERSATION_SWITCHED=Conversation switched from {0} to {1}
+CLEANING_UP_CONVERSATION=Cleaning up conversation {0}
+CONVERSATION_TERMINATION_SCHEDULED=Scheduled {0} for termination
+CONVERSATION_TERMINATION_CANCELLED=Termination of conversation {0} cancelled
+CONVERSATION_TERMINATION_CANCELLATION_FAILED=Failed to cancel termination of conversation {0}
+LRC_COUNT= {0} long-running conversations
+DESTROY_TRANSIENT_COVERSATION=Destroying transient conversation {0}
+DESTROY_LRC=Destroying long-running conversation {0} because {1}
+DESTROY_LRC_COMPLETE=Destroyed long-running conversation {0} because {1}
+DESTROY_ALL_LRC=Destroying all long-running conversations because {0}
+PROMOTED_TRANSIENT=Promoted conversation {0} to long-running
+DEMOTED_LRC=Returned long-running conversation {0} to transient
+SWITCHED_CONVERSATION=Switched conversation from {0} to {1}
+
\ No newline at end of file
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/event_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/event_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/event_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,3 @@
+ASYNC_FIRE=Sending event {0} directly to observer {1}
+ASYNC_TX_FIRE=Sending event {0} asynchronously to transactional observer {1}
+ASYNC_OBSERVER_FAILURE=Failure while notifying an observer of event {0}
\ No newline at end of file
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/event_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,5 @@
+CLEANING_UP_CONVERSATION=Cleaning up the conversation after the {0} phase because {1}
+SKIPPING_CLEANING_UP_CONVERSATION=Skipping conversation cleanup after the {0} phase because {1}
+INITIATING_CONVERSATION=Initiating conversation before the {0} phase
+FOUND_CONVERSATION_FROM_REQUEST=Found conversation id {0} in request parameter
+RESUMING_CONVERSATION=Resuming conversation with id {0}
\ No newline at end of file
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,6 @@
+MISSING_RETENTION={0} is missing @Retention(RUNTIME)
+MISSING_TARGET={0} is missing @Target
+MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE={0} is not declared @Target(TYPE, METHOD) or @Target(TYPE)
+TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE={0} is declared @Target(TYPE, METHOD), but inherits {1}, which is declared @Target(TYPE)
+MISSING_TARGET_METHOD_FIELD_TYPE={0} is not declared @Target(METHOD, FIELD, TYPE)
+MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD={0} is not declared @Target(METHOD, FIELD, TYPE, PARAMETER), @Target(METHOD, TYPE), @Target(METHOD), @Target(TYPE) or @Target(FIELD)
\ No newline at end of file
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/util_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/util_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/util_en.properties 2009-10-29 13:15:45 UTC (rev 4402)
@@ -0,0 +1,2 @@
+SERVICE_LOADER_LOADING_ERROR=Error loading service {0}
+SECURITY_EXCEPTION_SCANNING=Security exception scanning {0}
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/util_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/jboss-as/build.xml
===================================================================
--- core/trunk/jboss-as/build.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/jboss-as/build.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -47,14 +47,20 @@
</fileset>
</copy>
- <copy todir="target/weld.deployer/" overwrite="true">
+ <copy todir="${jboss.home}/client" overwrite="true">
<fileset dir="target/dependency/lib">
<include name="weld-api.jar" />
<include name="cdi-api.jar" />
- <include name="weld-logger.jar" />
</fileset>
</copy>
+ <copy todir="${jboss.home}/common/lib" overwrite="true">
+ <fileset dir="target/dependency/lib">
+ <include name="weld-api.jar" />
+ <include name="cdi-api.jar" />
+ </fileset>
+ </copy>
+
<delete dir="target/dependency" />
<copy todir="${jboss.home}/server/default/deployers/weld.deployer">
Modified: core/trunk/osgi-bundle/pom.xml
===================================================================
--- core/trunk/osgi-bundle/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/osgi-bundle/pom.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -138,11 +138,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-logging</artifactId>
- </dependency>
-
- <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
@@ -161,13 +156,6 @@
<groupId>org.jboss.interceptor</groupId>
<artifactId>jboss-interceptor</artifactId>
</dependency>
-
- <!-- Included due to bug in jboss-interceptor -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
</dependencies>
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/parent/pom.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -156,9 +156,9 @@
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>${log4j.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${slf4j.version}</version>
</dependency>
</dependencies>
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/pom.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -32,7 +32,6 @@
<modules>
<module>bom</module>
<module>parent</module>
- <module>logging</module>
<module>impl</module>
<module>tests</module>
<module>porting-package</module>
@@ -46,7 +45,6 @@
<modules>
<module>bom</module>
<module>parent</module>
- <module>logging</module>
<module>impl</module>
<module>osgi-bundle</module>
</modules>
Modified: core/trunk/tests/pom.xml
===================================================================
--- core/trunk/tests/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
+++ core/trunk/tests/pom.xml 2009-10-29 13:15:45 UTC (rev 4402)
@@ -33,6 +33,12 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness-jboss-as-52</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
<scope>test</scope>
</dependency>
15 years, 2 months