Hi Gurkan, cool changes! But for me there is something missing: The SimpleWebbeansConfigurator complains about a missing dependency WebBeansUtil.isDeploymentTypeEnabled(deploymentType) in line 126.
txs and LieGrue, strub --- [email protected] <[email protected]> schrieb am So, 22.3.2009: > Von: [email protected] <[email protected]> > Betreff: svn commit: r757142 - > /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java > An: [email protected] > Datum: Sonntag, 22. März 2009, 8:41 > Author: gerdogdu > Date: Sun Mar 22 07:41:46 2009 > New Revision: 757142 > > URL: http://svn.apache.org/viewvc?rev=757142&view=rev > Log: > Typo corrections. > > Modified: > > incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java (contents, > props changed) > > Modified: > incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java > URL: > http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java?rev=757142&r1=757141&r2=757142&view=diff > ============================================================================== > --- > incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java > (original) > +++ > incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java > Sun Mar 22 07:41:46 2009 > @@ -26,7 +26,6 @@ > import > org.apache.webbeans.component.ProducerFieldComponent; > import org.apache.webbeans.component.WebBeansType; > import org.apache.webbeans.container.ManagerImpl; > -import > org.apache.webbeans.deployment.DeploymentTypeManager; > import > org.apache.webbeans.exception.WebBeansConfigurationException; > import org.apache.webbeans.intercept.InterceptorUtil; > import org.apache.webbeans.util.AnnotationUtil; > @@ -34,10 +33,12 @@ > import org.apache.webbeans.util.WebBeansUtil; > > /** > - * Configures the simple web beans. > + * Configures Simple WebBeans Component. > * <p> > - * Contains useful static methods for creating simple web > beans. > + * Contains useful static methods for creating Simple > WebBeans Components. > * </p> > + * > + * @version $Rev$ $Date$ > */ > public final class SimpleWebBeansConfigurator > { > @@ -59,21 +60,20 @@ > public static void > checkSimpleWebBeanCondition(Class<?> clazz) throws > WebBeansConfigurationException > { > int modifier = > clazz.getModifiers(); > - > - > + > if > (AnnotationUtil.isAnnotationExistOnClass(clazz, > Decorator.class) && > AnnotationUtil.isAnnotationExistOnClass(clazz, > Interceptor.class)) > { > - throw new > WebBeansConfigurationException("WebBeans component > implementation class : " + clazz.getName() + " can not > annotated with both @Interceptor and @Decorator > annotations"); > + throw new > WebBeansConfigurationException("Simple WebBean Component > implementation class : " + clazz.getName() + " may not > annotated with both @Interceptor and @Decorator > annotation"); > } > > if > (!AnnotationUtil.isAnnotationExistOnClass(clazz, > Decorator.class) && > !AnnotationUtil.isAnnotationExistOnClass(clazz, > Interceptor.class)) > { > - > InterceptorUtil.checkSimpleWebBeansInterceptorConditions(clazz); > + > InterceptorUtil.checkSimpleWebBeansInterceptorConditions(clazz); > } > > if > (ClassUtil.isInterface(modifier)) > { > - throw new > WebBeansConfigurationException("Web Beans component > implementation class : " + clazz.getName() + " can not be > interface"); > + throw new > WebBeansConfigurationException("Simple WebBean Component > implementation class : " + clazz.getName() + " may not > defined as interface"); > } > } > > @@ -102,27 +102,28 @@ > } > > /** > - * Returns the newly created > simlple web bean component. > + * Returns the newly created > Simple WebBean Component. > * > - * @param clazz simple web bean > implementation class > - * @return the newly simple web > bean component > - * @throws > WebBeansConfigurationException if any configuration > exception occurs > + * @param clazz Simple WebBean > Component implementation class > + * @return the newly created > Simple WebBean Component > + * @throws > WebBeansConfigurationException if any configuration > exception > + * > occurs > */ > public static <T> > ComponentImpl<T> define(Class<T> clazz, > WebBeansType type) throws WebBeansConfigurationException > { > - ManagerImpl manager = > ManagerImpl.getManager(); > - > + ManagerImpl manager = > ManagerImpl.getManager(); > + > > checkSimpleWebBeanCondition(clazz); > > > ComponentImpl<T> component = new > ComponentImpl<T>(clazz, type); > - > + > > DefinitionUtil.defineSerializable(component); > > DefinitionUtil.defineStereoTypes(component, > clazz.getDeclaredAnnotations()); > - > - Class<? extends > Annotation> deploymentType = > DefinitionUtil.defineDeploymentType(component, > clazz.getDeclaredAnnotations(), "There are more than one > @DeploymentType annotation in the component class : " + > component.getReturnType().getName()); > + > + Class<? extends > Annotation> deploymentType = > DefinitionUtil.defineDeploymentType(component, > clazz.getDeclaredAnnotations(), "There are more than one > @DeploymentType annotation in Simple WebBean Component > implementation class : " + > component.getReturnType().getName()); > > // Check if the > deployment type is enabled. > - if > (!DeploymentTypeManager.getInstance().isDeploymentTypeEnabled(deploymentType)) > + if > (!WebBeansUtil.isDeploymentTypeEnabled(deploymentType)) > { > return > null; > } > @@ -130,20 +131,20 @@ > Annotation[] > clazzAnns = clazz.getDeclaredAnnotations(); > > > DefinitionUtil.defineApiTypes(component, > clazz); > - > DefinitionUtil.defineScopeType(component, clazzAnns, > "WebBeans component implementation class : " + > clazz.getName() + " must declare default @ScopeType > annotation"); > + > DefinitionUtil.defineScopeType(component, clazzAnns, "Simple > WebBean Component implementation class : " + clazz.getName() > + " stereotypes must declare same @ScopeType annotations"); > > WebBeansUtil.checkPassivationScope(component, > component.getScopeType().getAnnotation(ScopeType.class)); > > DefinitionUtil.defineBindingTypes(component, > clazzAnns); > - > DefinitionUtil.defineName(component, clazzAnns, > WebBeansUtil.getSimpleWebBeanDefaultName(clazz.getSimpleName())); > > - > + > DefinitionUtil.defineName(component, clazzAnns, > WebBeansUtil.getSimpleWebBeanDefaultName(clazz.getSimpleName())); > + > Constructor<T> > constructor = WebBeansUtil.defineConstructor(clazz); > > component.setConstructor(constructor); > > DefinitionUtil.addConstructorInjectionPointMetaData(component, > constructor); > > - > WebBeansUtil.checkSteroTypeRequirements(component, > clazz.getDeclaredAnnotations(), "WebBeans component > class : " + clazz.getName()); > + > WebBeansUtil.checkSteroTypeRequirements(component, > clazz.getDeclaredAnnotations(), "Simple WebBean Component > implementation class : " + clazz.getName()); > > > Set<ProducerComponentImpl<?>> > producerComponents = > DefinitionUtil.defineProducerMethods(component); > > manager.getBeans().addAll(producerComponents); > - > + > > Set<ProducerFieldComponent<?>> > producerFields = > DefinitionUtil.defineProduerFields(component); > > manager.getBeans().addAll(producerFields); > > > Propchange: > incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/SimpleWebBeansConfigurator.java > ------------------------------------------------------------------------------ > svn:keywords = Rev Date > > >
