Weld SVN: r3869 - ri/branches.
by weld-commits@lists.jboss.org
Author: rogerk
Date: 2009-10-07 14:46:40 -0400 (Wed, 07 Oct 2009)
New Revision: 3869
Removed:
ri/branches/1.0.0.PREVIEW5/
Log:
remove
15 years, 1 month
Weld SVN: r3868 - in ri/trunk: api/src/main/java/javax/enterprise/context and 129 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-07 14:23:35 -0400 (Wed, 07 Oct 2009)
New Revision: 3868
Modified:
ri/trunk/api/src/main/java/javax/decorator/Decorates.java
ri/trunk/api/src/main/java/javax/decorator/Decorator.java
ri/trunk/api/src/main/java/javax/decorator/package-info.java
ri/trunk/api/src/main/java/javax/enterprise/context/ApplicationScoped.java
ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java
ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java
ri/trunk/api/src/main/java/javax/enterprise/context/ContextNotActiveException.java
ri/trunk/api/src/main/java/javax/enterprise/context/Conversation.java
ri/trunk/api/src/main/java/javax/enterprise/context/ConversationScoped.java
ri/trunk/api/src/main/java/javax/enterprise/context/Dependent.java
ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java
ri/trunk/api/src/main/java/javax/enterprise/context/NormalScope.java
ri/trunk/api/src/main/java/javax/enterprise/context/RequestScoped.java
ri/trunk/api/src/main/java/javax/enterprise/context/SessionScoped.java
ri/trunk/api/src/main/java/javax/enterprise/context/spi/Context.java
ri/trunk/api/src/main/java/javax/enterprise/context/spi/Contextual.java
ri/trunk/api/src/main/java/javax/enterprise/context/spi/CreationalContext.java
ri/trunk/api/src/main/java/javax/enterprise/event/Event.java
ri/trunk/api/src/main/java/javax/enterprise/event/Notify.java
ri/trunk/api/src/main/java/javax/enterprise/event/ObserverException.java
ri/trunk/api/src/main/java/javax/enterprise/event/Observes.java
ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java
ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Alternative.java
ri/trunk/api/src/main/java/javax/enterprise/inject/AmbiguousResolutionException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/AnnotationLiteral.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Any.java
ri/trunk/api/src/main/java/javax/enterprise/inject/CreationException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Default.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Disposes.java
ri/trunk/api/src/main/java/javax/enterprise/inject/IllegalProductException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/InjectionException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Instance.java
ri/trunk/api/src/main/java/javax/enterprise/inject/New.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Nonbinding.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Produces.java
ri/trunk/api/src/main/java/javax/enterprise/inject/ResolutionException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java
ri/trunk/api/src/main/java/javax/enterprise/inject/TypeLiteral.java
ri/trunk/api/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/UnsatisfiedResolutionException.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterDeploymentValidation.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Annotated.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedCallable.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedConstructor.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMember.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedParameter.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Decorator.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Extension.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionPoint.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionTarget.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InterceptionType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/PassivationCapable.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Model.java
ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java
ri/trunk/api/src/main/java/javax/interceptor/Interceptor.java
ri/trunk/api/src/main/java/javax/interceptor/InterceptorBinding.java
ri/trunk/api/src/main/java/javax/interceptor/package-info.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
ri/trunk/dist/apl.txt
ri/trunk/dist/build.xml
ri/trunk/dist/lgpl.txt
ri/trunk/dist/readme.txt
ri/trunk/dist/release-process.txt
ri/trunk/dist/versions.properties
ri/trunk/embedded-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/embedded-tck-runner/src/test/resources/jndi.properties
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/Container.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ContextualStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/DefinitionException.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/DeploymentException.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/InconsistentSpecializationException.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/Logger.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/NullableDependencyException.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/SimpleInjectionTarget.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/SingleThreadExecutorServices.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/UnserializableDependencyException.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractReceiverBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethod.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingDecorator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/InterceptorImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewSessionBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerField.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethod.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/RIBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractBuiltInBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/DefaultValidatorBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/DefaultValidatorFactoryBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ExtensionBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InjectionPointBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ManagerBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/PrincipalBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/UserTransactionBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacade.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/FacadeBeanResolvableTransformer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/EEResourceProducerField.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/PersistenceContextProducerField.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/ClassInterceptionHandlerFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorBindingsAdapter.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorInterceptionHandlerFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyInstance.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyProvider.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanInstance.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/Marker.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployerEnvironment.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AbstractBeanDiscoveryEvent.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AbstractContainerEvent.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AfterBeanDiscoveryImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AfterDeploymentValidationImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/BeforeBeanDiscoveryImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/BeforeShutdownImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/ProcessAnnotatedTypeImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/ProcessObserverMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/ProcessProducerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractThreadLocalMapContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ContextLifecycle.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ConversationContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ForwardingContextual.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ForwardingWBCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/RequestContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SerializableContextual.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SerializableContextualInstance.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SessionContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/WBCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/AbstractAttributeBackedBeanStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/NamingScheme.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/AbstractConversationManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/JavaSEConversationTerminator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/NumericConversationIdGenerator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EjbDescriptors.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/InternalEjbDescriptor.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/SessionBeanInterceptor.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContextStack.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/Namespace.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELContextListener.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansExpressionFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansMethodExpression.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansValueExpression.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/AsynchronousTransactionalEventNotification.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/Status.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionSynchronizedRunnable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/Exceptions.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/InjectionContextImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/WBInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotationStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ConstructorSignature.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBConstructor.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBField.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMember.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMethod.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBParameter.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/MethodSignature.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBCallable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBConstructor.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMember.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBParameter.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBCallable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBMember.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/ConstructorSignatureImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBAnnotationImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/ConversationAwareViewHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/FacesUrlTransformer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfApiAbstraction.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfHelper.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/WebBeansPhaseListener.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/AnyLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/BindingTypeLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/DefaultLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/InjectLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/InterceptorBindingTypeLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/NewLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/NormalScopeLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/ScopeLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/StereotypeLiteral.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/TypeStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/AnnotationModel.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/BindingTypeModel.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/InterceptorBindingModel.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/MergedStereotypes.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/MetaAnnotationStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/ScopeModel.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/StereotypeModel.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/persistence/PersistenceApiAbstraction.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ForwardingResolvable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/InterceptorResolvable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/NameBasedResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/NewResolvableTransformer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/Resolvable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ResolvableFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ResolvableTransformer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ResolvableWBClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeDecoratorResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeDisposerResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeInterceptorResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeObserverResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ClassTransformer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/DefaultResourceLoader.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationBeanStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpRequestSessionBeanStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Beans.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Names.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Proxies.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Strings.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Types.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/Arrays2.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ConcurrentCache.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/EnumerationList.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ListComparator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterable.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingELContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingELResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingExpressionFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingMethodExpression.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingValueExpression.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/reflection/ParameterizedTypeImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/serviceProvider/ServiceLoader.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ws/WSApiAbstraction.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/BeansXmlParser.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AbstractProducer.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Any.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/BeanDisambiguator.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Plain.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Spare.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotated.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedCallable.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedConstructor.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedField.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedMember.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedMethod.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedParameter.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedType.java
ri/trunk/jboss-as/build.properties
ri/trunk/jboss-as/build.xml
ri/trunk/jboss-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
ri/trunk/jboss-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/tck/jbossas/WebBeansProfileServiceDeploymentExceptionTransformer.java
ri/trunk/jboss-tck-runner/src/test/resources/jndi.properties
ri/trunk/lib/maven/LICENSE.txt
ri/trunk/lib/maven/NOTICE.txt
ri/trunk/lib/maven/README.txt
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/JDKProvider.java
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log.java
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log4JProvider.java
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogProvider.java
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Logging.java
ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java
ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/TestAppender.java
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/BeansImpl.java
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/ContextsImpl.java
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/ELImpl.java
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/ManagersImpl.java
ri/trunk/porting-package/src/main/resources/META-INF/jboss-test-harness.properties
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingBootstrap.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/InterceptorBindings.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwadingBusinessInterfaceDescriptor.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbDescriptor.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/AbstractResourceServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/ForwardingJpaInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/ForwardingResourceInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/ExecutorServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/ForwardingResourceLoader.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/security/spi/SecurityServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/validation/spi/ValidationServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/BootstrapTest.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockBootstrap.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockDeployment.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbInjectionServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockResourceLoader.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockResourceServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockSecurityServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockService.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockTransactionServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockValidationServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockBeanDeploymentArchive.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockDeployment.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEELifecycle.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEjBServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEjbDescriptor.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEjbInjectionServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockHttpSession.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockResourceLoader.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockResourceServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockSecurityServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletContext.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletLifecycle.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockValidationServices.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/TestContainer.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/cluster/AbstractClusterTest.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/cluster/SwitchableMockEELifecycle.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/cluster/SwitchableSingletonProvider.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/el/EL.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/test/AbstractWebBeansTest.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/test/harness/AbstractStandaloneContainersImpl.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/test/harness/ServletLifecycleContainersImpl.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/test/harness/StandaloneContainersImpl.java
ri/trunk/tests/src/main/resources/META-INF/jboss-test-harness.properties
ri/trunk/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/tests/src/test/java/com/acme/RoadRunner.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/ExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Game.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Generator.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Random.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Translator.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Cow.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Dummy.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Field.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Fox.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/NightTime.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/BeanWithInjection.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/MyBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SameBeanTypeInChildActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SpecialBindingType.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Cow.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Donkey.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Dummy.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Dusk.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Field.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Horse.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NightTime.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScope.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/Bean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/Child.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/DeclaringTypeTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/ExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/Parent.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/AnnotatedTypeDecoratorTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotated.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedCallable.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedConstructor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedField.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedMember.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedMethod.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedParameter.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedType.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/NotAnnotated.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Bar.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/CheckableInjectionServices.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InjectionServicesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/WBStartupTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Fodder.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Horse.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/NaiveClusterTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Stable.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/SwitchableContainerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplictionScopedObject.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ContextTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/StringHolder.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleBeanImpl.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleDecorator1.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleDecorator2.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleDecoratorTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/Beer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/BeerProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/ELResolverTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/AccessibleManagerResolutionTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Cat.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Chicken.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Cow.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Horse.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Pig.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/DeadlyAnimal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/DeadlySpider.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/DefangedTarantula.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Hound.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/HoundLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Salmon.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/ScottishFish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/SeaBass.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/ServletEnvironmentTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/ServletLifecycleTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Sole.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Spider.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Tame.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Tarantula.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/TarantulaProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Tuna.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Whitefish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Random.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/BowlerHatException.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/EnterpriseBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/Fedora.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/FedoraImpl.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/Hat.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/HatRemote.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/AlteStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/BeanImpl.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/BeanLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/FrankfurtAmMain.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/GeschichtslosStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Giessen.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/GrossStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/GutenbergMuseum.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IndirectOrderProcessor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Kassel.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/KleinStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/LandgraffenSchloss.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Mainz.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Marburg.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/MockCreationalContext.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/NeueStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessorLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/RoemerPassage.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Schloss.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/SchoeneStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/UniStadt.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/NormalScopedBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/SimpleEventTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/Updated.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/AbstractHtmlUnitTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/TxEventTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/Updated.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ExceptionHandlingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/FooException.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Lorry_Broken.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Ship.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ShipProducer_Broken.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/Important.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBinding.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/IntegerCollectionInjection.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ListInstance.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ListStringInstance.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedCollectionInjection.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedListInjection.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/Target.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Car.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/CarFactory.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/FooDisposer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/FooProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Government.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Important.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/IntInjection.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/ManagerProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/ManagerProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBinding.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NullProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Ball.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/BallImpl.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Pass.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Shot.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ball.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Defender.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Goalkeeper.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/PrimaryInterceptionBinding.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SecondaryInterceptionBinding.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleBeanImpl.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleBeanWithStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleDecorator.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleInterceptor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleInterceptorStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleInterceptorTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/TwoBindingsInterceptor.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupInstanceTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/AbstractFactory.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/DummyParent.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntFactory.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntegerFactory.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/SomeBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/Wbri279Test.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/Sheep.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/Cat.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/CatLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/EjbDescriptorLookupTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/ManagerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/ExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/External.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/Random.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/WebBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/security/SecurityTest.java
ri/trunk/tests/src/test/resources/META-INF/jboss-test-harness.properties
ri/trunk/tests/src/test/resources/jndi.properties
Log:
set eol-style to native
Property changes on: ri/trunk/api/src/main/java/javax/decorator/Decorates.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/decorator/Decorator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/decorator/package-info.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/ApplicationScoped.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/ContextNotActiveException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/Conversation.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/ConversationScoped.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/Dependent.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/NormalScope.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/RequestScoped.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/SessionScoped.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/spi/Context.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/context/spi/Contextual.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/context/spi/Contextual.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/context/spi/Contextual.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,52 +1,52 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.enterprise.context.spi;
-
-import javax.enterprise.inject.CreationException;
-
-/**
- * The contract between a context and a contextual type This interface should
- * not be implemented directly by the application.
- *
- * @author Nicklas Karlsson
- * @author Pete Muir
- */
-public interface Contextual<T>
-{
- /**
- * Create a new instance of the contextual type
- *
- * @param creationalContext
- * the creational context in which incompletely initialized
- * contexts may be placed
- * @return the contextual instance
- * @throws CreationException
- * if a checked exception occurs whilst creating the instance
- */
- public T create(CreationalContext<T> creationalContext);
-
- /**
- * Destroys an instance of the contexual type
- *
- * @param instance
- * the insance to destroy
- * @param creationalContext
- * the creational context used to create the instance
- */
- public void destroy(T instance, CreationalContext<T> creationalContext);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.context.spi;
+
+import javax.enterprise.inject.CreationException;
+
+/**
+ * The contract between a context and a contextual type This interface should
+ * not be implemented directly by the application.
+ *
+ * @author Nicklas Karlsson
+ * @author Pete Muir
+ */
+public interface Contextual<T>
+{
+ /**
+ * Create a new instance of the contextual type
+ *
+ * @param creationalContext
+ * the creational context in which incompletely initialized
+ * contexts may be placed
+ * @return the contextual instance
+ * @throws CreationException
+ * if a checked exception occurs whilst creating the instance
+ */
+ public T create(CreationalContext<T> creationalContext);
+
+ /**
+ * Destroys an instance of the contexual type
+ *
+ * @param instance
+ * the insance to destroy
+ * @param creationalContext
+ * the creational context used to create the instance
+ */
+ public void destroy(T instance, CreationalContext<T> creationalContext);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/spi/Contextual.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/spi/CreationalContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/Event.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/Notify.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/ObserverException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/Observes.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Alternative.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/AmbiguousResolutionException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/AnnotationLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Any.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/CreationException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Default.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Disposes.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/IllegalProductException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/IllegalProductException.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/IllegalProductException.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,49 +1,49 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package javax.enterprise.inject;
-
-
-/**
- * Thrown if a producer method returns a null value or a producer field contains
- * a null value, and the scope of the method or field is not @Dependent
- */
-public class IllegalProductException extends InjectionException
-{
-
- private static final long serialVersionUID = -6280627846071966243L;
-
- public IllegalProductException()
- {
- super();
- }
-
- public IllegalProductException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public IllegalProductException(String message)
- {
- super(message);
- }
-
- public IllegalProductException(Throwable cause)
- {
- super(cause);
- }
-
-}
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.enterprise.inject;
+
+
+/**
+ * Thrown if a producer method returns a null value or a producer field contains
+ * a null value, and the scope of the method or field is not @Dependent
+ */
+public class IllegalProductException extends InjectionException
+{
+
+ private static final long serialVersionUID = -6280627846071966243L;
+
+ public IllegalProductException()
+ {
+ super();
+ }
+
+ public IllegalProductException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public IllegalProductException(String message)
+ {
+ super(message);
+ }
+
+ public IllegalProductException(Throwable cause)
+ {
+ super(cause);
+ }
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/IllegalProductException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/InjectionException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Instance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/New.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Nonbinding.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Produces.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/ResolutionException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/ResolutionException.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/ResolutionException.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,48 +1,48 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package javax.enterprise.inject;
-
-
-/**
- * Thrown if resolution fails
- */
-public class ResolutionException extends InjectionException
-{
-
- private static final long serialVersionUID = -6280627846071966243L;
-
- public ResolutionException()
- {
- super();
- }
-
- public ResolutionException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public ResolutionException(String message)
- {
- super(message);
- }
-
- public ResolutionException(Throwable cause)
- {
- super(cause);
- }
-
-}
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.enterprise.inject;
+
+
+/**
+ * Thrown if resolution fails
+ */
+public class ResolutionException extends InjectionException
+{
+
+ private static final long serialVersionUID = -6280627846071966243L;
+
+ public ResolutionException()
+ {
+ super();
+ }
+
+ public ResolutionException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ResolutionException(String message)
+ {
+ super(message);
+ }
+
+ public ResolutionException(Throwable cause)
+ {
+ super(cause);
+ }
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/ResolutionException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/TypeLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/UnsatisfiedResolutionException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterDeploymentValidation.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Annotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedCallable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedConstructor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMember.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedParameter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,21 +1,21 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface BeforeShutdown
-{
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface BeforeShutdown
+{
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Decorator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Extension.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionPoint.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionTarget.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InterceptionType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/PassivationCapable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,26 +1,26 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessAnnotatedType<X>
-{
- public AnnotatedType<X> getAnnotatedType();
-
- public void setAnnotatedType(AnnotatedType<X> t!
ype);
-
- public void veto();
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessAnnotatedType<X>
+{
+ public AnnotatedType<X> getAnnotatedType();
+
+ public void setAnnotatedType(AnnotatedType<X> type);
+
+ public void veto();
}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,26 +1,26 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessBean<X>
-{
- public Annotated getAnnotated();
-
- public Bean<X> getBean();
-
- public void addDefinitionError(Thro!
wable t);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessBean<X>
+{
+ public Annotated getAnnotated();
+
+ public Bean<X> getBean();
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,22 +1,22 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessManagedBean<X> extends ProcessBean<X>
-{
- public AnnotatedType<X> getAnnotatedBeanClass();
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessManagedBean<X> extends ProcessBean<X>
+{
+ public AnnotatedType<X> getAnnotatedBeanClass();
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,26 +1,26 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessProcessObserverMethod<X, T>
-{
- public AnnotatedMethod<X> getAnnotatedMethod();
-
- public ObserverMethod<X, T> getO!
bserverMethod();
-
- public void addDefinitionError(Throwable t);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessProcessObserverMethod<X, T>
+{
+ public AnnotatedMethod<X> getAnnotatedMethod();
+
+ public ObserverMethod<X, T> getObserverMethod();
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,29 +1,29 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.enterprise.inject.spi;
-
-public interface ProcessProducer<T, X>
-{
- public AnnotatedMember<T> getAnnotatedMember();
-
- public Producer<X> getProducer();
-
- pub!
lic void setProducer(Producer<X> producer);
-
- public void addDefinitionError(Throwable t);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.inject.spi;
+
+public interface ProcessProducer<T, X>
+{
+ public AnnotatedMember<T> getAnnotatedMember();
+
+ public Producer<X> getProducer();
+
+ public void setProducer(Producer<X> producer);
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,22 +1,22 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessProducerField<T, X> extends ProcessBean<X>
-{
- public AnnotatedField<T> getAnnotatedProducerField();
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessProducerField<T, X> extends ProcessBean<X>
+{
+ public AnnotatedField<T> getAnnotatedProducerField();
}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessProducerMethod<T, X> extends ProcessBean<X>
-{
- public AnnotatedMethod<T> getAnnotatedProducerMethod();
-
- public A!
nnotatedParameter<T> getAnnotatedDisposedParameter();
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessProducerMethod<T, X> extends ProcessBean<X>
+{
+ public AnnotatedMethod<T> getAnnotatedProducerMethod();
+
+ public AnnotatedParameter<T> getAnnotatedDisposedParameter();
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,27 +1,27 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.enterprise.inject.spi;
-
-public interface ProcessSessionBean<X> extends ProcessBean<Object>
-{
- public AnnotatedType<X> getAnnotatedBeanClass();
-
- public String !
getEjbName();
-
- public SessionBeanType getSessionBeanType();
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.inject.spi;
+
+public interface ProcessSessionBean<X> extends ProcessBean<Object>
+{
+ public AnnotatedType<X> getAnnotatedBeanClass();
+
+ public String getEjbName();
+
+ public SessionBeanType getSessionBeanType();
}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-import java.util.Set;
-
-import javax.enterprise.context.spi.CreationalContext;
-
-/**
- * The interface javax.enterprise.inject.spi.Producer pro!
vides a generic
- * operation for producing an instance of a type.
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public interface Producer<T>
-{
- public T produce(CreationalContext<T> ctx);
-
- public void dispose(T instance);
-
- public Set<InjectionPoint> getInjectionPoints();
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+
+/**
+ * The interface javax.enterprise.inject.spi.Producer provides a generic
+ * operation for producing an instance of a type.
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public interface Producer<T>
+{
+ public T produce(CreationalContext<T> ctx);
+
+ public void dispose(T instance);
+
+ public Set<InjectionPoint> getInjectionPoints();
}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Model.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/interceptor/Interceptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/interceptor/InterceptorBinding.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/api/src/main/java/javax/interceptor/package-info.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,42 +1,42 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * The conversation context concurrent access wait timeout on a lock
- *
- * @author Nicklas Karlsson
- */
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface ConversationConcurrentAccessTimeout
-{
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * The conversation context concurrent access wait timeout on a lock
+ *
+ * @author Nicklas Karlsson
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+public @interface ConversationConcurrentAccessTimeout
+{
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationConcurrentAccessTimeout.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,32 +1,32 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-/**
- * Generates conversation ID:s for the conversation manager
- *
- * @author Nicklas Karlsson
- * @see org.jboss.webbeans.conversation.ConversationManager#beginOrRestoreConversation(String)
- */
-public interface ConversationIdGenerator
-{
- /**
- * Gets the next ID for a new conversation
- * @return The ID
- */
- public abstract String nextId();
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+/**
+ * Generates conversation ID:s for the conversation manager
+ *
+ * @author Nicklas Karlsson
+ * @see org.jboss.webbeans.conversation.ConversationManager#beginOrRestoreConversation(String)
+ */
+public interface ConversationIdGenerator
+{
+ /**
+ * Gets the next ID for a new conversation
+ * @return The ID
+ */
+ public abstract String nextId();
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdGenerator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,42 +1,42 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * The conversation id request parameter name
- *
- * @author Nicklas Karlsson
- */
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface ConversationIdName
-{
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * The conversation id request parameter name
+ *
+ * @author Nicklas Karlsson
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+public @interface ConversationIdName
+{
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationIdName.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,42 +1,42 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * The conversation context inactivity timeout
- *
- * @author Nicklas Karlsson
- */
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface ConversationInactivityTimeout
-{
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * The conversation context inactivity timeout
+ *
+ * @author Nicklas Karlsson
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+public @interface ConversationInactivityTimeout
+{
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationInactivityTimeout.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,56 +1,56 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.util.Set;
-
-import javax.enterprise.context.Conversation;
-
-/**
- * A conversation manager responsible for starting, resuming and ending conversations
- *
- * @author Nicklas Karlsson
- * @see org.jboss.webbeans.conversation.ConversationManager
- */
-public interface ConversationManager
-{
- /**
- * Begins or restores a conversation
- *
- * @param cid The incoming conversation ID. Can be null in cases of transient conversations
- */
- public abstract void beginOrRestoreConversation(String cid);
-
- /**
- * Cleans up the current conversation, destroying transient conversation and handling
- * long-running conversations
- */
- public abstract void cleanupConversation();
-
- /**
- * Destroys all long-running conversations
- */
- public abstract void destroyAllConversations();
-
- /**
- * Gets the currently managed long-running conversations
- *
- * @return the conversations
- */
- public abstract Set<Conversation> getLongRunningConversations();
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.util.Set;
+
+import javax.enterprise.context.Conversation;
+
+/**
+ * A conversation manager responsible for starting, resuming and ending conversations
+ *
+ * @author Nicklas Karlsson
+ * @see org.jboss.webbeans.conversation.ConversationManager
+ */
+public interface ConversationManager
+{
+ /**
+ * Begins or restores a conversation
+ *
+ * @param cid The incoming conversation ID. Can be null in cases of transient conversations
+ */
+ public abstract void beginOrRestoreConversation(String cid);
+
+ /**
+ * Cleans up the current conversation, destroying transient conversation and handling
+ * long-running conversations
+ */
+ public abstract void cleanupConversation();
+
+ /**
+ * Destroys all long-running conversations
+ */
+ public abstract void destroyAllConversations();
+
+ /**
+ * Gets the currently managed long-running conversations
+ *
+ * @return the conversations
+ */
+ public abstract Set<Conversation> getLongRunningConversations();
+
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationManager.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.util.concurrent.Future;
-
-/**
- * A conversation terminator for scheduling inactivity timeout destructions
- *
- * @author Nicklas Karlsson
- *
- */
-public interface ConversationTerminator
-{
- /**
- * Schedules a termination
- *
- * @param terminationTask The termination task to run
- * @param timeoutInMilliseconds The timeout in milliseconds
- *
- * @return A handle for manipulating the task later on
- */
- public abstract Future<?> scheduleForTermination(Runnable terminationTask, long timeoutInMilliseconds);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.util.concurrent.Future;
+
+/**
+ * A conversation terminator for scheduling inactivity timeout destructions
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public interface ConversationTerminator
+{
+ /**
+ * Schedules a termination
+ *
+ * @param terminationTask The termination task to run
+ * @param timeoutInMilliseconds The timeout in milliseconds
+ *
+ * @return A handle for manipulating the task later on
+ */
+ public abstract Future<?> scheduleForTermination(Runnable terminationTask, long timeoutInMilliseconds);
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/conversation/ConversationTerminator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/dist/apl.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/dist/build.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/dist/lgpl.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/dist/readme.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/dist/release-process.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/dist/versions.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/embedded-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/embedded-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/embedded-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,2 +1,2 @@
-org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.local.LocalTestLauncher
-
+org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.local.LocalTestLauncher
+
Property changes on: ri/trunk/embedded-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/embedded-tck-runner/src/test/resources/jndi.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/Container.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/ContextualStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/DefinitionException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/DeploymentException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/InconsistentSpecializationException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/Logger.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/NullableDependencyException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/SimpleInjectionTarget.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/SingleThreadExecutorServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/UnserializableDependencyException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,344 +1,344 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.enterprise.context.Dependent;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Alternative;
-import javax.enterprise.inject.IllegalProductException;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.New;
-import javax.enterprise.inject.UnproxyableResolutionException;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.Decorator;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.webbeans.bean.AbstractClassBean;
-import org.jboss.webbeans.bean.AbstractProducerBean;
-import org.jboss.webbeans.bean.DecoratorImpl;
-import org.jboss.webbeans.bean.DisposalMethod;
-import org.jboss.webbeans.bean.NewManagedBean;
-import org.jboss.webbeans.bean.NewSessionBean;
-import org.jboss.webbeans.bean.RIBean;
-import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.introspector.WBAnnotated;
-import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
-import org.jboss.webbeans.resolution.ResolvableWBClass;
-import org.jboss.webbeans.util.Beans;
-import org.jboss.webbeans.util.Proxies;
-import org.jboss.webbeans.util.Reflections;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Multimaps;
-
-/**
- * Checks a list of beans for DeploymentExceptions and their subclasses
- *
- * @author Nicklas Karlsson
- *
- */
-public class Validator implements Service
-{
-
- private void validateBean(Bean<?> bean, BeanManagerImpl beanManager)
- {
- for (InjectionPoint ij : bean.getInjectionPoints())
- {
- validateInjectionPoint(ij, beanManager);
- }
- boolean normalScoped = beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(bean.getScope()).isNormal();
- if (normalScoped && !Beans.isBeanProxyable(bean))
- {
- throw new UnproxyableResolutionException("Normal scoped bean " + bean + " is not proxyable");
- }
- }
-
- /**
- * Validate an RIBean.
- *
- * This includes validating whether two beans specialize the same bean
- *
- * @param bean the bean to validate
- * @param beanManager the current manager
- * @param specializedBeans the existing specialized beans
- */
- private void validateRIBean(RIBean<?> bean, BeanManagerImpl beanManager, Collection<RIBean<?>> specializedBeans)
- {
- validateBean(bean, beanManager);
- if (!(bean instanceof NewManagedBean<?>) && !(bean instanceof NewSessionBean<?>))
- {
- RIBean<?> abstractBean = bean;
- if (abstractBean.isSpecializing())
- {
- if (specializedBeans.contains(abstractBean.getSpecializedBean()))
- {
- throw new InconsistentSpecializationException("Two beans cannot specialize the same bean: " + bean);
- }
- specializedBeans.add(abstractBean.getSpecializedBean());
- }
- if (Beans.isPassivationCapableBean(bean) && bean instanceof AbstractClassBean<?>)
- {
- AbstractClassBean<?> classBean = (AbstractClassBean<?>) bean;
- if (classBean.hasDecorators())
- {
- for (Decorator<?> decorator : classBean.getDecorators())
- {
- if (!Reflections.isSerializable(decorator.getBeanClass()))
- {
- throw new UnserializableDependencyException("The bean " + bean + " declares a passivating scope but has non-serializable decorator: " + decorator);
- }
- for (InjectionPoint ij : decorator.getInjectionPoints())
- {
- Bean<?> resolvedBean = beanManager.resolve(beanManager.getInjectableBeans(ij));
- validateInjectionPointPassivationCapable(ij, resolvedBean, beanManager);
- }
- }
- }
-
- }
- }
- }
-
- /**
- * Validate an injection point
- *
- * @param ij the injection point to validate
- * @param declaringBean the bean into which the injectionPoint has been injected, if null, certain validations aren't available
- * @param beanManager
- */
- public void validateInjectionPoint(InjectionPoint ij, BeanManagerImpl beanManager)
- {
- if (ij.getAnnotated().getAnnotation(New.class) != null && ij.getQualifiers().size() > 1)
- {
- throw new DefinitionException("The injection point " + ij + " is annotated with @New which cannot be combined with other binding types");
- }
- if (ij.getType().equals(InjectionPoint.class) && ij.getBean() == null)
- {
- throw new DefinitionException("Cannot inject an Injection point into a class which isn't a bean " + ij);
- }
- if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(ij.getBean().getScope()))
- {
- throw new DefinitionException("Cannot inject an InjectionPoint into a non @Dependent scoped bean " + ij);
- }
- if (ij.getType() instanceof TypeVariable<?>)
- {
- throw new DefinitionException("Cannot declare an injection point with a type variable " + ij);
- }
- checkFacadeInjectionPoint(ij, Instance.class);
- checkFacadeInjectionPoint(ij, Event.class);
- Annotation[] bindings = ij.getQualifiers().toArray(new Annotation[0]);
- WBAnnotated<?, ?> annotatedItem = ResolvableWBClass.of(ij.getType(), bindings, beanManager);
- Set<?> resolvedBeans = beanManager.getBeanResolver().resolve(beanManager.getInjectableBeans(ij));
- if (resolvedBeans.isEmpty())
- {
- throw new DeploymentException("Injection point has unstatisfied dependencies. Injection point: " + ij.toString() + "; Qualifiers: " + Arrays.toString(bindings));
- }
- if (resolvedBeans.size() > 1)
- {
- throw new DeploymentException("Injection point has ambiguous dependencies. Injection point: " + ij.toString() + "; Qualifiers: " + Arrays.toString(bindings) +"; Possible dependencies: " + resolvedBeans);
- }
- Bean<?> resolvedBean = (Bean<?>) resolvedBeans.iterator().next();
- if (beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(resolvedBean.getScope()).isNormal() && !Proxies.isTypeProxyable(ij.getType()))
- {
- throw new UnproxyableResolutionException("The injection point " + ij + " has non-proxyable dependencies");
- }
- if (Reflections.isPrimitive(annotatedItem.getJavaClass()) && resolvedBean.isNullable())
- {
- throw new NullableDependencyException("The injection point " + ij + " has nullable dependencies");
- }
- if (ij.getBean() != null && Beans.isPassivatingScope(ij.getBean(), beanManager) && (!ij.isTransient()) && !Beans.isPassivationCapableBean(resolvedBean))
- {
- validateInjectionPointPassivationCapable(ij, resolvedBean, beanManager);
- }
- }
-
- public void validateInjectionPointPassivationCapable(InjectionPoint ij, Bean<?> resolvedBean, BeanManagerImpl beanManager)
- {
- if (!ij.isTransient() && !Beans.isPassivationCapableBean(resolvedBean))
- {
- if (resolvedBean.getScope().equals(Dependent.class) && resolvedBean instanceof AbstractProducerBean<?, ?,?>)
- {
- throw new IllegalProductException("The bean " + ij.getBean() + " declares a passivating scope but the producer returned a non-serializable bean for injection: " + resolvedBean);
- }
- throw new UnserializableDependencyException("The bean " + ij.getBean() + " declares a passivating scope but has non-serializable dependency: " + resolvedBean);
- }
- }
-
- public void validateDeployment(BeanManagerImpl manager, BeanDeployerEnvironment environment)
- {
- validateBeans(manager.getDecorators(), new ArrayList<RIBean<?>>(), manager);
- validateBeans(manager.getBeans(), new ArrayList<RIBean<?>>(), manager);
- validateEnabledDecoratorClasses(manager);
- validateEnabledPolicies(manager);
- validateDisposalMethods(environment);
- validateBeanNames(manager);
- }
-
- public void validateBeans(Collection<? extends Bean<?>> beans, Collection<RIBean<?>> specializedBeans, BeanManagerImpl manager)
- {
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean<?>)
- {
- validateRIBean((RIBean<?>) bean, manager, specializedBeans);
- }
- else
- {
- validateBean(bean, manager);
- }
- }
- }
-
- public void validateBeanNames(BeanManagerImpl beanManager)
- {
- Multimap<String, Bean<?>> namedAccessibleBeans = Multimaps.newSetMultimap(new HashMap<String, Collection<Bean<?>>>(), new Supplier<Set<Bean<?>>>()
- {
-
- public Set<Bean<?>> get()
- {
- return new HashSet<Bean<?>>();
- }
-
- });
- for (Bean<?> bean : beanManager.getAccessibleBeans())
- {
- if (bean.getName() != null)
- {
- namedAccessibleBeans.put(bean.getName(), bean);
- }
- }
-
- List<String> accessibleNamespaces = new ArrayList<String>();
- for (String namespace : beanManager.getAccessibleNamespaces())
- {
- accessibleNamespaces.add(namespace);
- }
-
- for (String name : namedAccessibleBeans.keySet())
- {
- Set<Bean<?>> resolvedBeans = beanManager.getBeanResolver().resolve(namedAccessibleBeans.get(name));
- if (resolvedBeans.size() > 1)
- {
- throw new DeploymentException("An unresolvable ambiguous EL name exists for " + name + "; found " + resolvedBeans );
- }
- if (accessibleNamespaces.contains(name))
- {
- throw new DeploymentException("The bean name " + name + " is used as a prefix for another bean");
- }
- }
- }
-
- private void validateEnabledDecoratorClasses(BeanManagerImpl beanManager)
- {
- // TODO Move building this list to the boot or sth
- Set<Class<?>> decoratorBeanClasses = new HashSet<Class<?>>();
- for (DecoratorImpl<?> bean : beanManager.getDecorators())
- {
- decoratorBeanClasses.add(bean.getType());
- }
- for (Class<?> clazz : beanManager.getEnabledDecoratorClasses())
- {
- if (beanManager.getEnabledDecoratorClasses().indexOf(clazz) < beanManager.getEnabledDecoratorClasses().lastIndexOf(clazz))
- {
- throw new DeploymentException("Enabled decorator class" + clazz + " specified twice");
- }
- if (!decoratorBeanClasses.contains(clazz))
- {
- throw new DeploymentException("Enabled decorator class " + clazz + " is not the bean class of at least one decorator bean (detected decorator beans " + decoratorBeanClasses + ")");
- }
- }
- }
-
- private void validateEnabledPolicies(BeanManagerImpl beanManager)
- {
- List<Class<?>> seenPolicies = new ArrayList<Class<?>>();
- for (Class<? extends Annotation> stereotype : beanManager.getEnabledPolicyStereotypes())
- {
- if (!stereotype.isAnnotationPresent(Alternative.class))
- {
- throw new DeploymentException("Enabled policy sterotype " + stereotype + " is not annotated @Policy");
- }
- if (seenPolicies.contains(stereotype))
- {
- throw new DeploymentException("Cannot enable the same policy sterotype " + stereotype + " in beans.xml");
- }
- seenPolicies.add(stereotype);
- }
- for (Class<?> clazz : beanManager.getEnabledPolicyClasses())
- {
- if (!clazz.isAnnotationPresent(Alternative.class))
- {
- throw new DeploymentException("Enabled policy bean class " + clazz + " is not annotated @Policy");
- }
- if (seenPolicies.contains(clazz))
- {
- throw new DeploymentException("Cannot enable the same policy bean class " + clazz + " in beans.xml");
- }
- seenPolicies.add(clazz);
- }
- }
-
- private void validateDisposalMethods(BeanDeployerEnvironment environment)
- {
- Set<DisposalMethod<?, ?>> beans = environment.getUnresolvedDisposalBeans();
- if (!beans.isEmpty())
- {
- throw new DefinitionException("The following Disposal methods were declared but did not resolved to a producer method " + beans);
- }
- }
-
- private static void checkFacadeInjectionPoint(InjectionPoint injectionPoint, Class<?> type)
- {
- if (injectionPoint.getAnnotated().getBaseType().equals(type))
- {
- if (injectionPoint.getType() instanceof ParameterizedType)
- {
- ParameterizedType parameterizedType = (ParameterizedType) injectionPoint.getType();
- if (parameterizedType.getActualTypeArguments()[0] instanceof TypeVariable<?>)
- {
- throw new DefinitionException("An injection point of type " + type + " cannot have a type variable type parameter " + injectionPoint);
- }
- if (parameterizedType.getActualTypeArguments()[0] instanceof WildcardType)
- {
- throw new DefinitionException("An injection point of type " + type + " cannot have a wildcard type parameter " + injectionPoint);
- }
- }
- else
- {
- throw new DefinitionException("An injection point of type " + type + " must have a type parameter " + injectionPoint);
- }
- }
-
- }
-
- public void cleanup() {}
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Alternative;
+import javax.enterprise.inject.IllegalProductException;
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.New;
+import javax.enterprise.inject.UnproxyableResolutionException;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Decorator;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.AbstractProducerBean;
+import org.jboss.webbeans.bean.DecoratorImpl;
+import org.jboss.webbeans.bean.DisposalMethod;
+import org.jboss.webbeans.bean.NewManagedBean;
+import org.jboss.webbeans.bean.NewSessionBean;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.introspector.WBAnnotated;
+import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
+import org.jboss.webbeans.resolution.ResolvableWBClass;
+import org.jboss.webbeans.util.Beans;
+import org.jboss.webbeans.util.Proxies;
+import org.jboss.webbeans.util.Reflections;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
+
+/**
+ * Checks a list of beans for DeploymentExceptions and their subclasses
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public class Validator implements Service
+{
+
+ private void validateBean(Bean<?> bean, BeanManagerImpl beanManager)
+ {
+ for (InjectionPoint ij : bean.getInjectionPoints())
+ {
+ validateInjectionPoint(ij, beanManager);
+ }
+ boolean normalScoped = beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(bean.getScope()).isNormal();
+ if (normalScoped && !Beans.isBeanProxyable(bean))
+ {
+ throw new UnproxyableResolutionException("Normal scoped bean " + bean + " is not proxyable");
+ }
+ }
+
+ /**
+ * Validate an RIBean.
+ *
+ * This includes validating whether two beans specialize the same bean
+ *
+ * @param bean the bean to validate
+ * @param beanManager the current manager
+ * @param specializedBeans the existing specialized beans
+ */
+ private void validateRIBean(RIBean<?> bean, BeanManagerImpl beanManager, Collection<RIBean<?>> specializedBeans)
+ {
+ validateBean(bean, beanManager);
+ if (!(bean instanceof NewManagedBean<?>) && !(bean instanceof NewSessionBean<?>))
+ {
+ RIBean<?> abstractBean = bean;
+ if (abstractBean.isSpecializing())
+ {
+ if (specializedBeans.contains(abstractBean.getSpecializedBean()))
+ {
+ throw new InconsistentSpecializationException("Two beans cannot specialize the same bean: " + bean);
+ }
+ specializedBeans.add(abstractBean.getSpecializedBean());
+ }
+ if (Beans.isPassivationCapableBean(bean) && bean instanceof AbstractClassBean<?>)
+ {
+ AbstractClassBean<?> classBean = (AbstractClassBean<?>) bean;
+ if (classBean.hasDecorators())
+ {
+ for (Decorator<?> decorator : classBean.getDecorators())
+ {
+ if (!Reflections.isSerializable(decorator.getBeanClass()))
+ {
+ throw new UnserializableDependencyException("The bean " + bean + " declares a passivating scope but has non-serializable decorator: " + decorator);
+ }
+ for (InjectionPoint ij : decorator.getInjectionPoints())
+ {
+ Bean<?> resolvedBean = beanManager.resolve(beanManager.getInjectableBeans(ij));
+ validateInjectionPointPassivationCapable(ij, resolvedBean, beanManager);
+ }
+ }
+ }
+
+ }
+ }
+ }
+
+ /**
+ * Validate an injection point
+ *
+ * @param ij the injection point to validate
+ * @param declaringBean the bean into which the injectionPoint has been injected, if null, certain validations aren't available
+ * @param beanManager
+ */
+ public void validateInjectionPoint(InjectionPoint ij, BeanManagerImpl beanManager)
+ {
+ if (ij.getAnnotated().getAnnotation(New.class) != null && ij.getQualifiers().size() > 1)
+ {
+ throw new DefinitionException("The injection point " + ij + " is annotated with @New which cannot be combined with other binding types");
+ }
+ if (ij.getType().equals(InjectionPoint.class) && ij.getBean() == null)
+ {
+ throw new DefinitionException("Cannot inject an Injection point into a class which isn't a bean " + ij);
+ }
+ if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(ij.getBean().getScope()))
+ {
+ throw new DefinitionException("Cannot inject an InjectionPoint into a non @Dependent scoped bean " + ij);
+ }
+ if (ij.getType() instanceof TypeVariable<?>)
+ {
+ throw new DefinitionException("Cannot declare an injection point with a type variable " + ij);
+ }
+ checkFacadeInjectionPoint(ij, Instance.class);
+ checkFacadeInjectionPoint(ij, Event.class);
+ Annotation[] bindings = ij.getQualifiers().toArray(new Annotation[0]);
+ WBAnnotated<?, ?> annotatedItem = ResolvableWBClass.of(ij.getType(), bindings, beanManager);
+ Set<?> resolvedBeans = beanManager.getBeanResolver().resolve(beanManager.getInjectableBeans(ij));
+ if (resolvedBeans.isEmpty())
+ {
+ throw new DeploymentException("Injection point has unstatisfied dependencies. Injection point: " + ij.toString() + "; Qualifiers: " + Arrays.toString(bindings));
+ }
+ if (resolvedBeans.size() > 1)
+ {
+ throw new DeploymentException("Injection point has ambiguous dependencies. Injection point: " + ij.toString() + "; Qualifiers: " + Arrays.toString(bindings) +"; Possible dependencies: " + resolvedBeans);
+ }
+ Bean<?> resolvedBean = (Bean<?>) resolvedBeans.iterator().next();
+ if (beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(resolvedBean.getScope()).isNormal() && !Proxies.isTypeProxyable(ij.getType()))
+ {
+ throw new UnproxyableResolutionException("The injection point " + ij + " has non-proxyable dependencies");
+ }
+ if (Reflections.isPrimitive(annotatedItem.getJavaClass()) && resolvedBean.isNullable())
+ {
+ throw new NullableDependencyException("The injection point " + ij + " has nullable dependencies");
+ }
+ if (ij.getBean() != null && Beans.isPassivatingScope(ij.getBean(), beanManager) && (!ij.isTransient()) && !Beans.isPassivationCapableBean(resolvedBean))
+ {
+ validateInjectionPointPassivationCapable(ij, resolvedBean, beanManager);
+ }
+ }
+
+ public void validateInjectionPointPassivationCapable(InjectionPoint ij, Bean<?> resolvedBean, BeanManagerImpl beanManager)
+ {
+ if (!ij.isTransient() && !Beans.isPassivationCapableBean(resolvedBean))
+ {
+ if (resolvedBean.getScope().equals(Dependent.class) && resolvedBean instanceof AbstractProducerBean<?, ?,?>)
+ {
+ throw new IllegalProductException("The bean " + ij.getBean() + " declares a passivating scope but the producer returned a non-serializable bean for injection: " + resolvedBean);
+ }
+ throw new UnserializableDependencyException("The bean " + ij.getBean() + " declares a passivating scope but has non-serializable dependency: " + resolvedBean);
+ }
+ }
+
+ public void validateDeployment(BeanManagerImpl manager, BeanDeployerEnvironment environment)
+ {
+ validateBeans(manager.getDecorators(), new ArrayList<RIBean<?>>(), manager);
+ validateBeans(manager.getBeans(), new ArrayList<RIBean<?>>(), manager);
+ validateEnabledDecoratorClasses(manager);
+ validateEnabledPolicies(manager);
+ validateDisposalMethods(environment);
+ validateBeanNames(manager);
+ }
+
+ public void validateBeans(Collection<? extends Bean<?>> beans, Collection<RIBean<?>> specializedBeans, BeanManagerImpl manager)
+ {
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean<?>)
+ {
+ validateRIBean((RIBean<?>) bean, manager, specializedBeans);
+ }
+ else
+ {
+ validateBean(bean, manager);
+ }
+ }
+ }
+
+ public void validateBeanNames(BeanManagerImpl beanManager)
+ {
+ Multimap<String, Bean<?>> namedAccessibleBeans = Multimaps.newSetMultimap(new HashMap<String, Collection<Bean<?>>>(), new Supplier<Set<Bean<?>>>()
+ {
+
+ public Set<Bean<?>> get()
+ {
+ return new HashSet<Bean<?>>();
+ }
+
+ });
+ for (Bean<?> bean : beanManager.getAccessibleBeans())
+ {
+ if (bean.getName() != null)
+ {
+ namedAccessibleBeans.put(bean.getName(), bean);
+ }
+ }
+
+ List<String> accessibleNamespaces = new ArrayList<String>();
+ for (String namespace : beanManager.getAccessibleNamespaces())
+ {
+ accessibleNamespaces.add(namespace);
+ }
+
+ for (String name : namedAccessibleBeans.keySet())
+ {
+ Set<Bean<?>> resolvedBeans = beanManager.getBeanResolver().resolve(namedAccessibleBeans.get(name));
+ if (resolvedBeans.size() > 1)
+ {
+ throw new DeploymentException("An unresolvable ambiguous EL name exists for " + name + "; found " + resolvedBeans );
+ }
+ if (accessibleNamespaces.contains(name))
+ {
+ throw new DeploymentException("The bean name " + name + " is used as a prefix for another bean");
+ }
+ }
+ }
+
+ private void validateEnabledDecoratorClasses(BeanManagerImpl beanManager)
+ {
+ // TODO Move building this list to the boot or sth
+ Set<Class<?>> decoratorBeanClasses = new HashSet<Class<?>>();
+ for (DecoratorImpl<?> bean : beanManager.getDecorators())
+ {
+ decoratorBeanClasses.add(bean.getType());
+ }
+ for (Class<?> clazz : beanManager.getEnabledDecoratorClasses())
+ {
+ if (beanManager.getEnabledDecoratorClasses().indexOf(clazz) < beanManager.getEnabledDecoratorClasses().lastIndexOf(clazz))
+ {
+ throw new DeploymentException("Enabled decorator class" + clazz + " specified twice");
+ }
+ if (!decoratorBeanClasses.contains(clazz))
+ {
+ throw new DeploymentException("Enabled decorator class " + clazz + " is not the bean class of at least one decorator bean (detected decorator beans " + decoratorBeanClasses + ")");
+ }
+ }
+ }
+
+ private void validateEnabledPolicies(BeanManagerImpl beanManager)
+ {
+ List<Class<?>> seenPolicies = new ArrayList<Class<?>>();
+ for (Class<? extends Annotation> stereotype : beanManager.getEnabledPolicyStereotypes())
+ {
+ if (!stereotype.isAnnotationPresent(Alternative.class))
+ {
+ throw new DeploymentException("Enabled policy sterotype " + stereotype + " is not annotated @Policy");
+ }
+ if (seenPolicies.contains(stereotype))
+ {
+ throw new DeploymentException("Cannot enable the same policy sterotype " + stereotype + " in beans.xml");
+ }
+ seenPolicies.add(stereotype);
+ }
+ for (Class<?> clazz : beanManager.getEnabledPolicyClasses())
+ {
+ if (!clazz.isAnnotationPresent(Alternative.class))
+ {
+ throw new DeploymentException("Enabled policy bean class " + clazz + " is not annotated @Policy");
+ }
+ if (seenPolicies.contains(clazz))
+ {
+ throw new DeploymentException("Cannot enable the same policy bean class " + clazz + " in beans.xml");
+ }
+ seenPolicies.add(clazz);
+ }
+ }
+
+ private void validateDisposalMethods(BeanDeployerEnvironment environment)
+ {
+ Set<DisposalMethod<?, ?>> beans = environment.getUnresolvedDisposalBeans();
+ if (!beans.isEmpty())
+ {
+ throw new DefinitionException("The following Disposal methods were declared but did not resolved to a producer method " + beans);
+ }
+ }
+
+ private static void checkFacadeInjectionPoint(InjectionPoint injectionPoint, Class<?> type)
+ {
+ if (injectionPoint.getAnnotated().getBaseType().equals(type))
+ {
+ if (injectionPoint.getType() instanceof ParameterizedType)
+ {
+ ParameterizedType parameterizedType = (ParameterizedType) injectionPoint.getType();
+ if (parameterizedType.getActualTypeArguments()[0] instanceof TypeVariable<?>)
+ {
+ throw new DefinitionException("An injection point of type " + type + " cannot have a type variable type parameter " + injectionPoint);
+ }
+ if (parameterizedType.getActualTypeArguments()[0] instanceof WildcardType)
+ {
+ throw new DefinitionException("An injection point of type " + type + " cannot have a wildcard type parameter " + injectionPoint);
+ }
+ }
+ else
+ {
+ throw new DefinitionException("An injection point of type " + type + " must have a type parameter " + injectionPoint);
+ }
+ }
+
+ }
+
+ public void cleanup() {}
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractReceiverBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethod.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethod.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,250 +1,250 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.DefinitionException;
-import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.injection.MethodInjectionPoint;
-import org.jboss.webbeans.introspector.WBMethod;
-
-public class DisposalMethod<X, T> extends AbstractReceiverBean<X, T, Method>
-{
-
- protected MethodInjectionPoint<T, ?> disposalMethodInjectionPoint;
-
- protected DisposalMethod(BeanManagerImpl manager, WBMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
- {
- super(new StringBuilder().append(DisposalMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(disposalMethod.getSignature().toString()).toString(), declaringBean, manager);
- this.disposalMethodInjectionPoint = MethodInjectionPoint.of(this, disposalMethod);
- initBindings();
- initType();
- initTypes();
- initStereotypes();
- initPolicy();
- }
-
- @Override
- public void initialize(BeanDeployerEnvironment environment)
- {
- addInjectionPoint(disposalMethodInjectionPoint);
- super.initialize(environment);
- checkDisposalMethod();
- }
-
- @SuppressWarnings("unchecked")
- protected void initType()
- {
- this.type = (Class<T>) disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).get(0).getJavaClass();
- }
-
- @Override
- public WBMethod<T, ?> getAnnotatedItem()
- {
- return disposalMethodInjectionPoint;
- }
-
- public static <X, T> DisposalMethod<X, T> of(BeanManagerImpl manager, WBMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
- {
- return new DisposalMethod<X, T>(manager, disposalMethod, declaringBean);
- }
-
- @Override
- protected void initBindings()
- {
- // At least 1 parameter exists, already checked in constructor
- this.bindings = new HashSet<Annotation>();
- this.bindings.addAll(disposalMethodInjectionPoint.getWBParameters().get(0).getQualifiers());
- initDefaultBindings();
- }
-
- /**
- * Initializes the API types
- */
- @Override
- protected void initTypes()
- {
- Set<Type> types = new HashSet<Type>();
- types.addAll(disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).get(0).getTypeClosure());
- types.add(Object.class);
- super.types = types;
- }
-
- @Override
- public String getName()
- {
- return null;
- }
-
- @Override
- public Class<? extends Annotation> getScope()
- {
- return null;
- }
-
- @Override
- public Set<Type> getTypes()
- {
- return types;
- }
-
- @Override
- public String getDescription()
- {
- return disposalMethodInjectionPoint.toString();
- }
-
- @Override
- public boolean isNullable()
- {
- // Not relevant
- return false;
- }
-
- @Override
- public boolean isSerializable()
- {
- // Not relevant
- return false;
- }
-
- @Override
- public boolean isProxyable()
- {
- return true;
- }
-
- public T create(CreationalContext<T> creationalContext)
- {
- // Not Relevant
- return null;
- }
-
- public void invokeDisposeMethod(Object instance)
- {
- CreationalContext<T> creationalContext = manager.createCreationalContext(this);
- Object receiverInstance = getReceiver(creationalContext);
- if (receiverInstance == null)
- {
- disposalMethodInjectionPoint.invokeWithSpecialValue(null, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
- }
- else
- {
- disposalMethodInjectionPoint.invokeOnInstanceWithSpecialValue(receiverInstance, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
- }
- creationalContext.release();
- }
-
- private void checkDisposalMethod()
- {
- if (!disposalMethodInjectionPoint.getWBParameters().get(0).isAnnotationPresent(Disposes.class))
- {
- throw new DefinitionException(disposalMethodInjectionPoint.toString() + " doesn't have @Dispose as first parameter");
- }
- if (disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).size() > 1)
- {
- throw new DefinitionException(disposalMethodInjectionPoint.toString() + " has more than one @Dispose parameters");
- }
- if (disposalMethodInjectionPoint.getAnnotatedParameters(Observes.class).size() > 0)
- {
- throw new DefinitionException("@Observes is not allowed on disposal method, see " + disposalMethodInjectionPoint.toString());
- }
- if (disposalMethodInjectionPoint.getAnnotation(Inject.class) != null)
- {
- throw new DefinitionException("@Intitializer is not allowed on a disposal method, see " + disposalMethodInjectionPoint.toString());
- }
- if (disposalMethodInjectionPoint.getAnnotation(Produces.class) != null)
- {
- throw new DefinitionException("@Produces is not allowed on a disposal method, see " + disposalMethodInjectionPoint.toString());
- }
- if (getDeclaringBean() instanceof SessionBean<?>)
- {
- boolean methodDeclaredOnTypes = false;
- // TODO use annotated item?
- for (Type type : getDeclaringBean().getTypes())
- {
- if (type instanceof Class<?>)
- {
- Class<?> clazz = (Class<?>) type;
- try
- {
- clazz.getDeclaredMethod(disposalMethodInjectionPoint.getName(), disposalMethodInjectionPoint.getParameterTypesAsArray());
- methodDeclaredOnTypes = true;
- }
- catch (NoSuchMethodException nsme)
- {
- // No - op
- }
- }
- }
- if (!methodDeclaredOnTypes)
- {
- throw new DefinitionException("Producer method " + toString() + " must be declared on a business interface of " + getDeclaringBean());
- }
- }
- }
-
- @Override
- public Class<T> getType()
- {
- return type;
- }
-
- @Override
- protected String getDefaultName()
- {
- return disposalMethodInjectionPoint.getPropertyName();
- }
-
- public void destroy(T instance, CreationalContext<T> creationalContext)
- {
- // No-op. Producer method dependent objects are destroyed in producer method bean
- }
-
- @Override
- public AbstractBean<?, ?> getSpecializedBean()
- {
- // Doesn't support specialization
- return null;
- }
-
- @Override
- protected void initScopeType()
- {
- // Disposal methods aren't scoped
- }
-
- @Override
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- return Collections.emptySet();
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.DefinitionException;
+import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
+import org.jboss.webbeans.injection.MethodInjectionPoint;
+import org.jboss.webbeans.introspector.WBMethod;
+
+public class DisposalMethod<X, T> extends AbstractReceiverBean<X, T, Method>
+{
+
+ protected MethodInjectionPoint<T, ?> disposalMethodInjectionPoint;
+
+ protected DisposalMethod(BeanManagerImpl manager, WBMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
+ {
+ super(new StringBuilder().append(DisposalMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(disposalMethod.getSignature().toString()).toString(), declaringBean, manager);
+ this.disposalMethodInjectionPoint = MethodInjectionPoint.of(this, disposalMethod);
+ initBindings();
+ initType();
+ initTypes();
+ initStereotypes();
+ initPolicy();
+ }
+
+ @Override
+ public void initialize(BeanDeployerEnvironment environment)
+ {
+ addInjectionPoint(disposalMethodInjectionPoint);
+ super.initialize(environment);
+ checkDisposalMethod();
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void initType()
+ {
+ this.type = (Class<T>) disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).get(0).getJavaClass();
+ }
+
+ @Override
+ public WBMethod<T, ?> getAnnotatedItem()
+ {
+ return disposalMethodInjectionPoint;
+ }
+
+ public static <X, T> DisposalMethod<X, T> of(BeanManagerImpl manager, WBMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
+ {
+ return new DisposalMethod<X, T>(manager, disposalMethod, declaringBean);
+ }
+
+ @Override
+ protected void initBindings()
+ {
+ // At least 1 parameter exists, already checked in constructor
+ this.bindings = new HashSet<Annotation>();
+ this.bindings.addAll(disposalMethodInjectionPoint.getWBParameters().get(0).getQualifiers());
+ initDefaultBindings();
+ }
+
+ /**
+ * Initializes the API types
+ */
+ @Override
+ protected void initTypes()
+ {
+ Set<Type> types = new HashSet<Type>();
+ types.addAll(disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).get(0).getTypeClosure());
+ types.add(Object.class);
+ super.types = types;
+ }
+
+ @Override
+ public String getName()
+ {
+ return null;
+ }
+
+ @Override
+ public Class<? extends Annotation> getScope()
+ {
+ return null;
+ }
+
+ @Override
+ public Set<Type> getTypes()
+ {
+ return types;
+ }
+
+ @Override
+ public String getDescription()
+ {
+ return disposalMethodInjectionPoint.toString();
+ }
+
+ @Override
+ public boolean isNullable()
+ {
+ // Not relevant
+ return false;
+ }
+
+ @Override
+ public boolean isSerializable()
+ {
+ // Not relevant
+ return false;
+ }
+
+ @Override
+ public boolean isProxyable()
+ {
+ return true;
+ }
+
+ public T create(CreationalContext<T> creationalContext)
+ {
+ // Not Relevant
+ return null;
+ }
+
+ public void invokeDisposeMethod(Object instance)
+ {
+ CreationalContext<T> creationalContext = manager.createCreationalContext(this);
+ Object receiverInstance = getReceiver(creationalContext);
+ if (receiverInstance == null)
+ {
+ disposalMethodInjectionPoint.invokeWithSpecialValue(null, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
+ }
+ else
+ {
+ disposalMethodInjectionPoint.invokeOnInstanceWithSpecialValue(receiverInstance, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
+ }
+ creationalContext.release();
+ }
+
+ private void checkDisposalMethod()
+ {
+ if (!disposalMethodInjectionPoint.getWBParameters().get(0).isAnnotationPresent(Disposes.class))
+ {
+ throw new DefinitionException(disposalMethodInjectionPoint.toString() + " doesn't have @Dispose as first parameter");
+ }
+ if (disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).size() > 1)
+ {
+ throw new DefinitionException(disposalMethodInjectionPoint.toString() + " has more than one @Dispose parameters");
+ }
+ if (disposalMethodInjectionPoint.getAnnotatedParameters(Observes.class).size() > 0)
+ {
+ throw new DefinitionException("@Observes is not allowed on disposal method, see " + disposalMethodInjectionPoint.toString());
+ }
+ if (disposalMethodInjectionPoint.getAnnotation(Inject.class) != null)
+ {
+ throw new DefinitionException("@Intitializer is not allowed on a disposal method, see " + disposalMethodInjectionPoint.toString());
+ }
+ if (disposalMethodInjectionPoint.getAnnotation(Produces.class) != null)
+ {
+ throw new DefinitionException("@Produces is not allowed on a disposal method, see " + disposalMethodInjectionPoint.toString());
+ }
+ if (getDeclaringBean() instanceof SessionBean<?>)
+ {
+ boolean methodDeclaredOnTypes = false;
+ // TODO use annotated item?
+ for (Type type : getDeclaringBean().getTypes())
+ {
+ if (type instanceof Class<?>)
+ {
+ Class<?> clazz = (Class<?>) type;
+ try
+ {
+ clazz.getDeclaredMethod(disposalMethodInjectionPoint.getName(), disposalMethodInjectionPoint.getParameterTypesAsArray());
+ methodDeclaredOnTypes = true;
+ }
+ catch (NoSuchMethodException nsme)
+ {
+ // No - op
+ }
+ }
+ }
+ if (!methodDeclaredOnTypes)
+ {
+ throw new DefinitionException("Producer method " + toString() + " must be declared on a business interface of " + getDeclaringBean());
+ }
+ }
+ }
+
+ @Override
+ public Class<T> getType()
+ {
+ return type;
+ }
+
+ @Override
+ protected String getDefaultName()
+ {
+ return disposalMethodInjectionPoint.getPropertyName();
+ }
+
+ public void destroy(T instance, CreationalContext<T> creationalContext)
+ {
+ // No-op. Producer method dependent objects are destroyed in producer method bean
+ }
+
+ @Override
+ public AbstractBean<?, ?> getSpecializedBean()
+ {
+ // Doesn't support specialization
+ return null;
+ }
+
+ @Override
+ protected void initScopeType()
+ {
+ // Disposal methods aren't scoped
+ }
+
+ @Override
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingDecorator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/InterceptorImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewManagedBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewManagedBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,118 +1,118 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean;
-
-import java.lang.annotation.Annotation;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.Dependent;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.literal.NewLiteral;
-
-/**
- * Represents a @New simple bean
- *
- * @author Nicklas Karlsson
- */
-public class NewManagedBean<T> extends ManagedBean<T> implements NewBean
-{
-
- /**
- * Creates an instance of a NewSimpleBean from an annotated class
- *
- * @param clazz The annotated class
- * @param manager The Web Beans manager
- * @return a new NewSimpleBean instance
- */
- public static <T> NewManagedBean<T> of(WBClass<T> clazz, BeanManagerImpl manager)
- {
- return new NewManagedBean<T>(clazz, new StringBuilder().append(NewManagedBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(clazz.getName()).toString(), manager);
- }
-
- private Set<Annotation> bindings;
-
- /**
- * Protected constructor
- *
- * @param type An annotated class
- * @param manager The Web Beans manager
- */
- protected NewManagedBean(final WBClass<T> type, String idSuffix, BeanManagerImpl manager)
- {
- super(type, idSuffix, manager);
- this.bindings = new HashSet<Annotation>();
- this.bindings.add(new NewLiteral()
- {
-
- @Override
- public Class<?> value()
- {
- return type.getJavaClass();
- }
-
- });
- }
-
- /**
- * Gets the scope type
- *
- * @return @Dependent
- */
- @Override
- public Class<? extends Annotation> getScope()
- {
- return Dependent.class;
- }
-
- @Override
- public boolean isAlternative()
- {
- return false;
- }
-
- /**
- * Gets the name of the bean
- *
- * @return null
- */
- @Override
- public String getName()
- {
- return null;
- }
-
- /**
- * Gets the bindings
- *
- * @returns @New
- */
- @Override
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- @Override
- public boolean isSpecializing()
- {
- return false;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean;
+
+import java.lang.annotation.Annotation;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.Dependent;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.introspector.WBClass;
+import org.jboss.webbeans.literal.NewLiteral;
+
+/**
+ * Represents a @New simple bean
+ *
+ * @author Nicklas Karlsson
+ */
+public class NewManagedBean<T> extends ManagedBean<T> implements NewBean
+{
+
+ /**
+ * Creates an instance of a NewSimpleBean from an annotated class
+ *
+ * @param clazz The annotated class
+ * @param manager The Web Beans manager
+ * @return a new NewSimpleBean instance
+ */
+ public static <T> NewManagedBean<T> of(WBClass<T> clazz, BeanManagerImpl manager)
+ {
+ return new NewManagedBean<T>(clazz, new StringBuilder().append(NewManagedBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(clazz.getName()).toString(), manager);
+ }
+
+ private Set<Annotation> bindings;
+
+ /**
+ * Protected constructor
+ *
+ * @param type An annotated class
+ * @param manager The Web Beans manager
+ */
+ protected NewManagedBean(final WBClass<T> type, String idSuffix, BeanManagerImpl manager)
+ {
+ super(type, idSuffix, manager);
+ this.bindings = new HashSet<Annotation>();
+ this.bindings.add(new NewLiteral()
+ {
+
+ @Override
+ public Class<?> value()
+ {
+ return type.getJavaClass();
+ }
+
+ });
+ }
+
+ /**
+ * Gets the scope type
+ *
+ * @return @Dependent
+ */
+ @Override
+ public Class<? extends Annotation> getScope()
+ {
+ return Dependent.class;
+ }
+
+ @Override
+ public boolean isAlternative()
+ {
+ return false;
+ }
+
+ /**
+ * Gets the name of the bean
+ *
+ * @return null
+ */
+ @Override
+ public String getName()
+ {
+ return null;
+ }
+
+ /**
+ * Gets the bindings
+ *
+ * @returns @New
+ */
+ @Override
+ public Set<Annotation> getQualifiers()
+ {
+ return bindings;
+ }
+
+ @Override
+ public boolean isSpecializing()
+ {
+ return false;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewManagedBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewSessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewSessionBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewSessionBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,127 +1,127 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean;
-
-import java.lang.annotation.Annotation;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.Dependent;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.ejb.InternalEjbDescriptor;
-import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.literal.NewLiteral;
-import org.jboss.webbeans.resources.ClassTransformer;
-
-/**
- * Represents a @New enterprise bean
- *
- * @author Nicklas Karlsson
- */
-public class NewSessionBean<T> extends SessionBean<T> implements NewBean
-{
-
- /**
- * Creates an instance of a NewEnterpriseBean from an annotated class
- *
- * @param clazz The annotated class
- * @param manager The Web Beans manager
- * @return a new NewEnterpriseBean instance
- */
- public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
- {
- WBClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
- return new NewSessionBean<T>(type, ejbDescriptor, new StringBuilder().append(NewSessionBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(ejbDescriptor.getEjbName()).toString(), manager);
- }
-
- private Set<Annotation> bindings;
-
- /**
- * Protected constructor
- *
- * @param type An annotated class
- * @param manager The Web Beans manager
- */
- protected NewSessionBean(final WBClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
- {
- super(type, ejbDescriptor, idSuffix, manager);
- this.bindings = new HashSet<Annotation>();
- this.bindings.add(new NewLiteral()
- {
-
- @Override
- public Class<?> value()
- {
- return type.getJavaClass();
- }
-
- });
- }
-
- /**
- * Gets the scope type
- *
- * @return @Dependent
- */
- @Override
- public Class<? extends Annotation> getScope()
- {
- return Dependent.class;
- }
-
- @Override
- public boolean isAlternative()
- {
- return false;
- }
-
- /**
- * Gets the name of the bean
- *
- * @return null
- */
- @Override
- public String getName()
- {
- return null;
- }
-
- /**
- * Gets the bindings
- *
- * @returns @New
- */
- @Override
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- @Override
- public boolean isSpecializing()
- {
- return false;
- }
-
- @Override
- protected void checkScopeAllowed()
- {
- // No-op
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean;
+
+import java.lang.annotation.Annotation;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.Dependent;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.ejb.InternalEjbDescriptor;
+import org.jboss.webbeans.introspector.WBClass;
+import org.jboss.webbeans.literal.NewLiteral;
+import org.jboss.webbeans.resources.ClassTransformer;
+
+/**
+ * Represents a @New enterprise bean
+ *
+ * @author Nicklas Karlsson
+ */
+public class NewSessionBean<T> extends SessionBean<T> implements NewBean
+{
+
+ /**
+ * Creates an instance of a NewEnterpriseBean from an annotated class
+ *
+ * @param clazz The annotated class
+ * @param manager The Web Beans manager
+ * @return a new NewEnterpriseBean instance
+ */
+ public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
+ {
+ WBClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
+ return new NewSessionBean<T>(type, ejbDescriptor, new StringBuilder().append(NewSessionBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(ejbDescriptor.getEjbName()).toString(), manager);
+ }
+
+ private Set<Annotation> bindings;
+
+ /**
+ * Protected constructor
+ *
+ * @param type An annotated class
+ * @param manager The Web Beans manager
+ */
+ protected NewSessionBean(final WBClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
+ {
+ super(type, ejbDescriptor, idSuffix, manager);
+ this.bindings = new HashSet<Annotation>();
+ this.bindings.add(new NewLiteral()
+ {
+
+ @Override
+ public Class<?> value()
+ {
+ return type.getJavaClass();
+ }
+
+ });
+ }
+
+ /**
+ * Gets the scope type
+ *
+ * @return @Dependent
+ */
+ @Override
+ public Class<? extends Annotation> getScope()
+ {
+ return Dependent.class;
+ }
+
+ @Override
+ public boolean isAlternative()
+ {
+ return false;
+ }
+
+ /**
+ * Gets the name of the bean
+ *
+ * @return null
+ */
+ @Override
+ public String getName()
+ {
+ return null;
+ }
+
+ /**
+ * Gets the bindings
+ *
+ * @returns @New
+ */
+ @Override
+ public Set<Annotation> getQualifiers()
+ {
+ return bindings;
+ }
+
+ @Override
+ public boolean isSpecializing()
+ {
+ return false;
+ }
+
+ @Override
+ protected void checkScopeAllowed()
+ {
+ // No-op
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/NewSessionBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethod.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethod.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,294 +1,294 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.Set;
-
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.CreationException;
-import javax.enterprise.inject.Disposes;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.DefinitionException;
-import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.injection.MethodInjectionPoint;
-import org.jboss.webbeans.injection.ParameterInjectionPoint;
-import org.jboss.webbeans.introspector.WBMethod;
-import org.jboss.webbeans.introspector.WBParameter;
-import org.jboss.webbeans.util.Names;
-
-/**
- * Represents a producer method bean
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class ProducerMethod<X, T> extends AbstractProducerBean<X, T, Method>
-{
- // The underlying method
- private MethodInjectionPoint<T, X> method;
-
- private DisposalMethod<X, ?> disposalMethodBean;
-
- private ProducerMethod<?, ?> specializedBean;
-
- private final String id;
-
- /**
- * Creates a producer method Web Bean
- *
- * @param method The underlying method abstraction
- * @param declaringBean The declaring bean abstraction
- * @param manager the current manager
- * @return A producer Web Bean
- */
- public static <X, T> ProducerMethod<X, T> of(WBMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
- {
- return new ProducerMethod<X, T>(method, declaringBean, manager);
- }
-
- protected ProducerMethod(WBMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
- {
- super(new StringBuilder().append(ProducerMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(".").append(method.getSignature().toString()).toString(), declaringBean, manager);
- this.method = MethodInjectionPoint.of(this, method);
- initType();
- initTypes();
- initBindings();
- this.id = new StringBuilder().append(BEAN_ID_PREFIX).append(getClass().getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(getAnnotatedItem().getSignature().toString()).toString();
- initStereotypes();
- initPolicy();
- }
-
- public T produce(CreationalContext<T> creationalContext)
- {
- Object receiver = getReceiver(creationalContext);
- if (receiver != null)
- {
- return method.invokeOnInstance(receiver, manager, creationalContext, CreationException.class);
- }
- else
- {
- return method.invoke(receiver, manager, creationalContext, CreationException.class);
- }
- }
-
- /**
- * Initializes the bean and its metadata
- */
- @Override
- public void initialize(BeanDeployerEnvironment environment)
- {
- if (!isInitialized())
- {
- initProducerMethodInjectableParameters();
- super.initialize(environment);
- checkProducerMethod();
- initDisposalMethod(environment);
- }
- }
-
- /**
- * Initializes the injection points
- */
- protected void initProducerMethodInjectableParameters()
- {
- for (WBParameter<?, ?> parameter : method.getWBParameters())
- {
- addInjectionPoint(ParameterInjectionPoint.of(this, parameter));
- }
- }
-
- /**
- * Validates the producer method
- */
- protected void checkProducerMethod()
- {
- if (getAnnotatedItem().getAnnotatedWBParameters(Observes.class).size() > 0)
- {
- throw new DefinitionException("Producer method cannot have parameter annotated @Observes");
- }
- else if (getAnnotatedItem().getAnnotatedWBParameters(Disposes.class).size() > 0)
- {
- throw new DefinitionException("Producer method cannot have parameter annotated @Disposes");
- }
- else if (getDeclaringBean() instanceof SessionBean<?>)
- {
- boolean methodDeclaredOnTypes = false;
- // TODO use annotated item?
- for (Type type : getDeclaringBean().getTypes())
- {
- if (type instanceof Class)
- {
- Class<?> clazz = (Class<?>) type;
- try
- {
- clazz.getDeclaredMethod(getAnnotatedItem().getName(), getAnnotatedItem().getParameterTypesAsArray());
- methodDeclaredOnTypes = true;
- }
- catch (NoSuchMethodException nsme)
- {
- // No - op
- }
- }
- }
- if (!methodDeclaredOnTypes)
- {
- throw new DefinitionException("Producer method " + toString() + " must be declared on a business interface of " + getDeclaringBean());
- }
- }
- }
-
- /**
- * Initializes the remove method
- */
- protected void initDisposalMethod(BeanDeployerEnvironment environment)
- {
- Set<DisposalMethod<X, ?>> disposalBeans = environment.<X>resolveDisposalBeans(getTypes(), getQualifiers(), getDeclaringBean());
-
- if (disposalBeans.size() == 1)
- {
- this.disposalMethodBean = disposalBeans.iterator().next();
- }
- else if (disposalBeans.size() > 1)
- {
- // TODO List out found disposal methods
- throw new DefinitionException("Cannot declare multiple disposal methods for this producer method. Producer method: " + this + ". Disposal methods: " + disposalBeans);
- }
- }
-
- public void destroy(T instance, CreationalContext<T> creationalContext)
- {
- try
- {
- dispose(instance);
- }
- finally
- {
- if (getDeclaringBean().isDependent())
- {
- creationalContext.release();
- }
- }
- }
-
- public void dispose(T instance)
- {
- if (disposalMethodBean != null)
- {
- disposalMethodBean.invokeDisposeMethod(instance);
- }
- }
-
- /**
- * Gets the annotated item representing the method
- *
- * @return The annotated item
- */
- @Override
- public WBMethod<T, X> getAnnotatedItem()
- {
- return method;
- }
-
- /**
- * Returns the default name
- *
- * @return The default name
- */
- @Override
- protected String getDefaultName()
- {
- return method.getPropertyName();
- }
-
- /**
- * Returns the disposal method
- *
- * @return The method representation
- */
- public DisposalMethod<X, ?> getDisposalMethod()
- {
- return disposalMethodBean;
- }
-
- /**
- * Gets a string representation
- *
- * @return The string representation
- */
- @Override
- public String getDescription()
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append(Names.scopeTypeToString(getScope()));
- if (getName() == null)
- {
- buffer.append("unnamed producer method bean");
- }
- else
- {
- buffer.append("simple producer method bean '" + getName() + "'");
- }
- buffer.append(" [" + getBeanClass().getName() + "] for class type [" + getType().getName() + "] API types " + getTypes() + ", binding types " + getQualifiers());
- return buffer.toString();
- }
-
- @Override
- public AbstractBean<?, ?> getSpecializedBean()
- {
- return specializedBean;
- }
-
- @Override
- protected void preSpecialize(BeanDeployerEnvironment environment)
- {
- if (getDeclaringBean().getAnnotatedItem().getWBSuperclass().getDeclaredWBMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
- {
- throw new DefinitionException("Specialized producer method does not override a method on the direct superclass");
- }
- }
-
- @Override
- protected void specialize(BeanDeployerEnvironment environment)
- {
- WBMethod<?, ?> superClassMethod = getDeclaringBean().getAnnotatedItem().getWBSuperclass().getWBMethod(getAnnotatedItem().getAnnotatedMethod());
- if (environment.getProducerMethod(superClassMethod) == null)
- {
- throw new IllegalStateException(toString() + " does not specialize a bean");
- }
- this.specializedBean = environment.getProducerMethod(superClassMethod);
- }
-
- @Override
- public String getId()
- {
- return id;
- }
-
- @Override
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- return Collections.emptySet();
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.CreationException;
+import javax.enterprise.inject.Disposes;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.DefinitionException;
+import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
+import org.jboss.webbeans.injection.MethodInjectionPoint;
+import org.jboss.webbeans.injection.ParameterInjectionPoint;
+import org.jboss.webbeans.introspector.WBMethod;
+import org.jboss.webbeans.introspector.WBParameter;
+import org.jboss.webbeans.util.Names;
+
+/**
+ * Represents a producer method bean
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class ProducerMethod<X, T> extends AbstractProducerBean<X, T, Method>
+{
+ // The underlying method
+ private MethodInjectionPoint<T, X> method;
+
+ private DisposalMethod<X, ?> disposalMethodBean;
+
+ private ProducerMethod<?, ?> specializedBean;
+
+ private final String id;
+
+ /**
+ * Creates a producer method Web Bean
+ *
+ * @param method The underlying method abstraction
+ * @param declaringBean The declaring bean abstraction
+ * @param manager the current manager
+ * @return A producer Web Bean
+ */
+ public static <X, T> ProducerMethod<X, T> of(WBMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ {
+ return new ProducerMethod<X, T>(method, declaringBean, manager);
+ }
+
+ protected ProducerMethod(WBMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ {
+ super(new StringBuilder().append(ProducerMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(".").append(method.getSignature().toString()).toString(), declaringBean, manager);
+ this.method = MethodInjectionPoint.of(this, method);
+ initType();
+ initTypes();
+ initBindings();
+ this.id = new StringBuilder().append(BEAN_ID_PREFIX).append(getClass().getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(getAnnotatedItem().getSignature().toString()).toString();
+ initStereotypes();
+ initPolicy();
+ }
+
+ public T produce(CreationalContext<T> creationalContext)
+ {
+ Object receiver = getReceiver(creationalContext);
+ if (receiver != null)
+ {
+ return method.invokeOnInstance(receiver, manager, creationalContext, CreationException.class);
+ }
+ else
+ {
+ return method.invoke(receiver, manager, creationalContext, CreationException.class);
+ }
+ }
+
+ /**
+ * Initializes the bean and its metadata
+ */
+ @Override
+ public void initialize(BeanDeployerEnvironment environment)
+ {
+ if (!isInitialized())
+ {
+ initProducerMethodInjectableParameters();
+ super.initialize(environment);
+ checkProducerMethod();
+ initDisposalMethod(environment);
+ }
+ }
+
+ /**
+ * Initializes the injection points
+ */
+ protected void initProducerMethodInjectableParameters()
+ {
+ for (WBParameter<?, ?> parameter : method.getWBParameters())
+ {
+ addInjectionPoint(ParameterInjectionPoint.of(this, parameter));
+ }
+ }
+
+ /**
+ * Validates the producer method
+ */
+ protected void checkProducerMethod()
+ {
+ if (getAnnotatedItem().getAnnotatedWBParameters(Observes.class).size() > 0)
+ {
+ throw new DefinitionException("Producer method cannot have parameter annotated @Observes");
+ }
+ else if (getAnnotatedItem().getAnnotatedWBParameters(Disposes.class).size() > 0)
+ {
+ throw new DefinitionException("Producer method cannot have parameter annotated @Disposes");
+ }
+ else if (getDeclaringBean() instanceof SessionBean<?>)
+ {
+ boolean methodDeclaredOnTypes = false;
+ // TODO use annotated item?
+ for (Type type : getDeclaringBean().getTypes())
+ {
+ if (type instanceof Class)
+ {
+ Class<?> clazz = (Class<?>) type;
+ try
+ {
+ clazz.getDeclaredMethod(getAnnotatedItem().getName(), getAnnotatedItem().getParameterTypesAsArray());
+ methodDeclaredOnTypes = true;
+ }
+ catch (NoSuchMethodException nsme)
+ {
+ // No - op
+ }
+ }
+ }
+ if (!methodDeclaredOnTypes)
+ {
+ throw new DefinitionException("Producer method " + toString() + " must be declared on a business interface of " + getDeclaringBean());
+ }
+ }
+ }
+
+ /**
+ * Initializes the remove method
+ */
+ protected void initDisposalMethod(BeanDeployerEnvironment environment)
+ {
+ Set<DisposalMethod<X, ?>> disposalBeans = environment.<X>resolveDisposalBeans(getTypes(), getQualifiers(), getDeclaringBean());
+
+ if (disposalBeans.size() == 1)
+ {
+ this.disposalMethodBean = disposalBeans.iterator().next();
+ }
+ else if (disposalBeans.size() > 1)
+ {
+ // TODO List out found disposal methods
+ throw new DefinitionException("Cannot declare multiple disposal methods for this producer method. Producer method: " + this + ". Disposal methods: " + disposalBeans);
+ }
+ }
+
+ public void destroy(T instance, CreationalContext<T> creationalContext)
+ {
+ try
+ {
+ dispose(instance);
+ }
+ finally
+ {
+ if (getDeclaringBean().isDependent())
+ {
+ creationalContext.release();
+ }
+ }
+ }
+
+ public void dispose(T instance)
+ {
+ if (disposalMethodBean != null)
+ {
+ disposalMethodBean.invokeDisposeMethod(instance);
+ }
+ }
+
+ /**
+ * Gets the annotated item representing the method
+ *
+ * @return The annotated item
+ */
+ @Override
+ public WBMethod<T, X> getAnnotatedItem()
+ {
+ return method;
+ }
+
+ /**
+ * Returns the default name
+ *
+ * @return The default name
+ */
+ @Override
+ protected String getDefaultName()
+ {
+ return method.getPropertyName();
+ }
+
+ /**
+ * Returns the disposal method
+ *
+ * @return The method representation
+ */
+ public DisposalMethod<X, ?> getDisposalMethod()
+ {
+ return disposalMethodBean;
+ }
+
+ /**
+ * Gets a string representation
+ *
+ * @return The string representation
+ */
+ @Override
+ public String getDescription()
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(Names.scopeTypeToString(getScope()));
+ if (getName() == null)
+ {
+ buffer.append("unnamed producer method bean");
+ }
+ else
+ {
+ buffer.append("simple producer method bean '" + getName() + "'");
+ }
+ buffer.append(" [" + getBeanClass().getName() + "] for class type [" + getType().getName() + "] API types " + getTypes() + ", binding types " + getQualifiers());
+ return buffer.toString();
+ }
+
+ @Override
+ public AbstractBean<?, ?> getSpecializedBean()
+ {
+ return specializedBean;
+ }
+
+ @Override
+ protected void preSpecialize(BeanDeployerEnvironment environment)
+ {
+ if (getDeclaringBean().getAnnotatedItem().getWBSuperclass().getDeclaredWBMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
+ {
+ throw new DefinitionException("Specialized producer method does not override a method on the direct superclass");
+ }
+ }
+
+ @Override
+ protected void specialize(BeanDeployerEnvironment environment)
+ {
+ WBMethod<?, ?> superClassMethod = getDeclaringBean().getAnnotatedItem().getWBSuperclass().getWBMethod(getAnnotatedItem().getAnnotatedMethod());
+ if (environment.getProducerMethod(superClassMethod) == null)
+ {
+ throw new IllegalStateException(toString() + " does not specialize a bean");
+ }
+ this.specializedBean = environment.getProducerMethod(superClassMethod);
+ }
+
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ @Override
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/RIBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractBuiltInBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/DefaultValidatorBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/DefaultValidatorFactoryBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ExtensionBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InjectionPointBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ManagerBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/PrincipalBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/UserTransactionBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacade.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/FacadeBeanResolvableTransformer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/EEResourceProducerField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ee/PersistenceContextProducerField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/ClassInterceptionHandlerFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorBindingsAdapter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorInterceptionHandlerFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyInstance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,164 +1,164 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.proxy;
-
-import java.io.Serializable;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import javassist.util.proxy.MethodHandler;
-
-import javax.enterprise.context.spi.Context;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.context.WBCreationalContext;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.util.Reflections;
-
-/**
- * A Javassist MethodHandler that delegates method calls to a proxied bean. If
- * the transient bean has become null, it is looked up from the manager bean
- * list before the invocation.
- *
- * @author Nicklas Karlsson
- *
- * @see org.jboss.webbeans.bean.proxy.ClientProxyProvider
- */
-public class ClientProxyMethodHandler implements MethodHandler, Serializable
-{
-
- private static final long serialVersionUID = -5391564935097267888L;
- // The log provider
- private static transient LogProvider log = Logging.getLogProvider(ClientProxyMethodHandler.class);
- // The bean
- private transient Bean<?> bean;
- // The bean index in the manager
- private final int beanIndex;
-
- private final BeanManagerImpl manager;
-
- private static final ThreadLocal<WBCreationalContext<?>> currentCreationalContext = new ThreadLocal<WBCreationalContext<?>>();
-
- /**
- * Constructor
- *
- * @param bean The bean to proxy
- * @param beanIndex The index to the bean in the manager bean list
- */
- public ClientProxyMethodHandler(Bean<?> bean, BeanManagerImpl manager, int beanIndex)
- {
- this.bean = bean;
- this.beanIndex = beanIndex;
- this.manager = manager;
- log.trace("Created method handler for bean " + bean + " indexed as " + beanIndex);
- }
-
- /**
- * Invokes the method on the correct version of the instance as obtained by a
- * context lookup
- *
- * @param self the proxy instance.
- * @param proxiedMethod the overridden method declared in the super class or
- * interface.
- * @param proceed the forwarder method for invoking the overridden method. It
- * is null if the overridden mehtod is abstract or declared in the
- * interface.
- * @param args an array of objects containing the values of the arguments
- * passed in the method invocation on the proxy instance. If a
- * parameter type is a primitive type, the type of the array
- * element is a wrapper class.
- * @return the resulting value of the method invocation.
- *
- * @throws Throwable if the method invocation fails.
- */
- public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable
- {
- if (bean == null)
- {
- bean = manager.getBeans().get(beanIndex);
- }
- Object proxiedInstance = getProxiedInstance(bean);
- if ("touch".equals(proxiedMethod.getName()) && Marker.isMarker(0, proxiedMethod, args))
- {
- // Our "touch" method, which simply ensures the proxy does any object
- // instantiation needed, to avoid the annoying side effect of an object
- // getting lazy created
- return null;
- }
- if (proxiedMethod.getName().equals("equals") && proxiedMethod.getParameterTypes().length == 1 && proxiedMethod.getParameterTypes()[0] == Object.class && args[0] == self)
- {
- return true;
- }
- 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);
- return returnValue;
- }
- catch (InvocationTargetException e)
- {
- throw e.getCause();
- }
- }
-
- private <T> T getProxiedInstance(Bean<T> bean)
- {
- WBCreationalContext<T> creationalContext;
- boolean outer;
- if (currentCreationalContext.get() == null)
- {
- creationalContext = manager.createCreationalContext(bean);
- currentCreationalContext.set(creationalContext);
- outer = true;
- }
- else
- {
- creationalContext = currentCreationalContext.get().getCreationalContext(bean);
- outer = false;
- }
- try
- {
- Context context = manager.getContext(bean.getScope());
- return context.get(bean, creationalContext);
- }
- finally
- {
- if (outer)
- {
- currentCreationalContext.remove();
- }
- }
- }
-
- /**
- * Gets a string representation
- *
- * @return The string representation
- */
- @Override
- public String toString()
- {
- StringBuilder buffer = new StringBuilder();
- String beanInfo = bean == null ? "null bean" : bean.toString();
- buffer.append("Proxy method handler for " + beanInfo + " with index " + beanIndex);
- return buffer.toString();
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.proxy;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import javassist.util.proxy.MethodHandler;
+
+import javax.enterprise.context.spi.Context;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.context.WBCreationalContext;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.util.Reflections;
+
+/**
+ * A Javassist MethodHandler that delegates method calls to a proxied bean. If
+ * the transient bean has become null, it is looked up from the manager bean
+ * list before the invocation.
+ *
+ * @author Nicklas Karlsson
+ *
+ * @see org.jboss.webbeans.bean.proxy.ClientProxyProvider
+ */
+public class ClientProxyMethodHandler implements MethodHandler, Serializable
+{
+
+ private static final long serialVersionUID = -5391564935097267888L;
+ // The log provider
+ private static transient LogProvider log = Logging.getLogProvider(ClientProxyMethodHandler.class);
+ // The bean
+ private transient Bean<?> bean;
+ // The bean index in the manager
+ private final int beanIndex;
+
+ private final BeanManagerImpl manager;
+
+ private static final ThreadLocal<WBCreationalContext<?>> currentCreationalContext = new ThreadLocal<WBCreationalContext<?>>();
+
+ /**
+ * Constructor
+ *
+ * @param bean The bean to proxy
+ * @param beanIndex The index to the bean in the manager bean list
+ */
+ public ClientProxyMethodHandler(Bean<?> bean, BeanManagerImpl manager, int beanIndex)
+ {
+ this.bean = bean;
+ this.beanIndex = beanIndex;
+ this.manager = manager;
+ log.trace("Created method handler for bean " + bean + " indexed as " + beanIndex);
+ }
+
+ /**
+ * Invokes the method on the correct version of the instance as obtained by a
+ * context lookup
+ *
+ * @param self the proxy instance.
+ * @param proxiedMethod the overridden method declared in the super class or
+ * interface.
+ * @param proceed the forwarder method for invoking the overridden method. It
+ * is null if the overridden mehtod is abstract or declared in the
+ * interface.
+ * @param args an array of objects containing the values of the arguments
+ * passed in the method invocation on the proxy instance. If a
+ * parameter type is a primitive type, the type of the array
+ * element is a wrapper class.
+ * @return the resulting value of the method invocation.
+ *
+ * @throws Throwable if the method invocation fails.
+ */
+ public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable
+ {
+ if (bean == null)
+ {
+ bean = manager.getBeans().get(beanIndex);
+ }
+ Object proxiedInstance = getProxiedInstance(bean);
+ if ("touch".equals(proxiedMethod.getName()) && Marker.isMarker(0, proxiedMethod, args))
+ {
+ // Our "touch" method, which simply ensures the proxy does any object
+ // instantiation needed, to avoid the annoying side effect of an object
+ // getting lazy created
+ return null;
+ }
+ if (proxiedMethod.getName().equals("equals") && proxiedMethod.getParameterTypes().length == 1 && proxiedMethod.getParameterTypes()[0] == Object.class && args[0] == self)
+ {
+ return true;
+ }
+ 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);
+ return returnValue;
+ }
+ catch (InvocationTargetException e)
+ {
+ throw e.getCause();
+ }
+ }
+
+ private <T> T getProxiedInstance(Bean<T> bean)
+ {
+ WBCreationalContext<T> creationalContext;
+ boolean outer;
+ if (currentCreationalContext.get() == null)
+ {
+ creationalContext = manager.createCreationalContext(bean);
+ currentCreationalContext.set(creationalContext);
+ outer = true;
+ }
+ else
+ {
+ creationalContext = currentCreationalContext.get().getCreationalContext(bean);
+ outer = false;
+ }
+ try
+ {
+ Context context = manager.getContext(bean.getScope());
+ return context.get(bean, creationalContext);
+ }
+ finally
+ {
+ if (outer)
+ {
+ currentCreationalContext.remove();
+ }
+ }
+ }
+
+ /**
+ * Gets a string representation
+ *
+ * @return The string representation
+ */
+ @Override
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder();
+ String beanInfo = bean == null ? "null bean" : bean.toString();
+ buffer.append("Proxy method handler for " + beanInfo + " with index " + beanIndex);
+ return buffer.toString();
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyProvider.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyProvider.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyProvider.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,142 +1,142 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.proxy;
-
-import java.io.Serializable;
-import java.lang.reflect.Type;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-import javassist.util.proxy.ProxyFactory;
-
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.DefinitionException;
-import org.jboss.webbeans.util.Proxies;
-import org.jboss.webbeans.util.collections.ConcurrentCache;
-
-/**
- * A proxy pool for holding scope adaptors (client proxies)
- *
- * @author Nicklas Karlsson
- *
- * @see org.jboss.webbeans.bean.proxy.ProxyMethodHandler
- */
-public class ClientProxyProvider
-{
- private static final long serialVersionUID = 9029999149357529341L;
-
- /**
- * A container/cache for previously created proxies
- *
- * @author Nicklas Karlsson
- */
- private final ConcurrentCache<Bean<? extends Object>, Object> pool;
-
- /**
- * Constructor
- */
- public ClientProxyProvider()
- {
- this.pool = new ConcurrentCache<Bean<? extends Object>, Object>();
- }
-
- /**
- * Creates a Javassist scope adaptor (client proxy) for a bean
- *
- * Creates a Javassist proxy factory. Gets the type info. Sets the interfaces
- * and superclass to the factory. Hooks in the MethodHandler and creates the
- * proxy.
- *
- * @param bean The bean to proxy
- * @param beanIndex The index to the bean in the manager bean list
- * @return A Javassist proxy
- * @throws InstantiationException When the proxy couldn't be created
- * @throws IllegalAccessException When the proxy couldn't be created
- */
- private static <T> T createClientProxy(Bean<T> bean, BeanManagerImpl manager, int beanIndex) throws RuntimeException
- {
-
- try
- {
- ClientProxyMethodHandler proxyMethodHandler = new ClientProxyMethodHandler(bean, manager, beanIndex);
- Set<Type> classes = new LinkedHashSet<Type>(bean.getTypes());
- //classes.add(ClientProxyInstance.class);
- classes.add(Serializable.class);
- ProxyFactory proxyFactory = Proxies.getProxyFactory(classes);
- proxyFactory.setHandler(proxyMethodHandler);
- Class<?> clazz = proxyFactory.createClass();
-
- @SuppressWarnings("unchecked")
- T instance = (T) clazz.newInstance();
-
- return instance;
- }
- catch (InstantiationException e)
- {
- throw new RuntimeException("Could not instantiate client proxy for " + bean, e);
- }
- catch (IllegalAccessException e)
- {
- throw new RuntimeException("Could not access bean correctly when creating client proxy for " + bean, e);
- }
- }
-
- /**
- * Gets a client proxy for a bean
- *
- * Looks for a proxy in the pool. If not found, one is created and added to
- * the pool if the create argument is true.
- *
- * @param bean The bean to get a proxy to
- * @return the client proxy for the bean
- */
- public <T> T getClientProxy(final BeanManagerImpl manager, final Bean<T> bean)
- {
- T instance = pool.putIfAbsent(bean, new Callable<T>()
- {
-
- public T call() throws Exception
- {
- int beanIndex = manager.getBeans().indexOf(bean);
- if (beanIndex < 0)
- {
- throw new DefinitionException(bean + " is not known to the manager");
- }
- return createClientProxy(bean, manager, beanIndex);
- }
-
- });
- // TODO Break circular injection. Can we somehow support both?
- //((ClientProxyInstance) instance).touch(Marker.INSTANCE);
- return instance;
- }
-
- /**
- * Gets a string representation
- *
- * @return The string representation
- */
- @Override
- public String toString()
- {
- return "Proxy pool with " + pool.size() + " proxies";
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.proxy;
+
+import java.io.Serializable;
+import java.lang.reflect.Type;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+import javassist.util.proxy.ProxyFactory;
+
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.DefinitionException;
+import org.jboss.webbeans.util.Proxies;
+import org.jboss.webbeans.util.collections.ConcurrentCache;
+
+/**
+ * A proxy pool for holding scope adaptors (client proxies)
+ *
+ * @author Nicklas Karlsson
+ *
+ * @see org.jboss.webbeans.bean.proxy.ProxyMethodHandler
+ */
+public class ClientProxyProvider
+{
+ private static final long serialVersionUID = 9029999149357529341L;
+
+ /**
+ * A container/cache for previously created proxies
+ *
+ * @author Nicklas Karlsson
+ */
+ private final ConcurrentCache<Bean<? extends Object>, Object> pool;
+
+ /**
+ * Constructor
+ */
+ public ClientProxyProvider()
+ {
+ this.pool = new ConcurrentCache<Bean<? extends Object>, Object>();
+ }
+
+ /**
+ * Creates a Javassist scope adaptor (client proxy) for a bean
+ *
+ * Creates a Javassist proxy factory. Gets the type info. Sets the interfaces
+ * and superclass to the factory. Hooks in the MethodHandler and creates the
+ * proxy.
+ *
+ * @param bean The bean to proxy
+ * @param beanIndex The index to the bean in the manager bean list
+ * @return A Javassist proxy
+ * @throws InstantiationException When the proxy couldn't be created
+ * @throws IllegalAccessException When the proxy couldn't be created
+ */
+ private static <T> T createClientProxy(Bean<T> bean, BeanManagerImpl manager, int beanIndex) throws RuntimeException
+ {
+
+ try
+ {
+ ClientProxyMethodHandler proxyMethodHandler = new ClientProxyMethodHandler(bean, manager, beanIndex);
+ Set<Type> classes = new LinkedHashSet<Type>(bean.getTypes());
+ //classes.add(ClientProxyInstance.class);
+ classes.add(Serializable.class);
+ ProxyFactory proxyFactory = Proxies.getProxyFactory(classes);
+ proxyFactory.setHandler(proxyMethodHandler);
+ Class<?> clazz = proxyFactory.createClass();
+
+ @SuppressWarnings("unchecked")
+ T instance = (T) clazz.newInstance();
+
+ return instance;
+ }
+ catch (InstantiationException e)
+ {
+ throw new RuntimeException("Could not instantiate client proxy for " + bean, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new RuntimeException("Could not access bean correctly when creating client proxy for " + bean, e);
+ }
+ }
+
+ /**
+ * Gets a client proxy for a bean
+ *
+ * Looks for a proxy in the pool. If not found, one is created and added to
+ * the pool if the create argument is true.
+ *
+ * @param bean The bean to get a proxy to
+ * @return the client proxy for the bean
+ */
+ public <T> T getClientProxy(final BeanManagerImpl manager, final Bean<T> bean)
+ {
+ T instance = pool.putIfAbsent(bean, new Callable<T>()
+ {
+
+ public T call() throws Exception
+ {
+ int beanIndex = manager.getBeans().indexOf(bean);
+ if (beanIndex < 0)
+ {
+ throw new DefinitionException(bean + " is not known to the manager");
+ }
+ return createClientProxy(bean, manager, beanIndex);
+ }
+
+ });
+ // TODO Break circular injection. Can we somehow support both?
+ //((ClientProxyInstance) instance).touch(Marker.INSTANCE);
+ return instance;
+ }
+
+ /**
+ * Gets a string representation
+ *
+ * @return The string representation
+ */
+ @Override
+ public String toString()
+ {
+ return "Proxy pool with " + pool.size() + " proxies";
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,92 +1,92 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.proxy;
-
-import static org.jboss.webbeans.util.Reflections.ensureAccessible;
-
-import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import javassist.util.proxy.MethodHandler;
-
-import org.jboss.webbeans.bean.DecoratorImpl;
-import org.jboss.webbeans.context.SerializableContextualInstance;
-import org.jboss.webbeans.introspector.MethodSignature;
-import org.jboss.webbeans.introspector.WBMethod;
-import org.jboss.webbeans.introspector.jlr.MethodSignatureImpl;
-
-/**
- * Method handler for decorated beans
- *
- * @author Pete Muir
- *
- */
-public class DecoratorProxyMethodHandler implements MethodHandler, Serializable
-{
- private static final long serialVersionUID = 4577632640130385060L;
-
- private final List<SerializableContextualInstance<DecoratorImpl<Object>, Object>> decoratorInstances;
-
- private final Object instance;
-
- /**
- * Constructor
- *
- * @param removeMethods
- *
- * @param proxy The generic proxy
- */
- public DecoratorProxyMethodHandler(List<SerializableContextualInstance<DecoratorImpl<Object>, Object>> decoratorInstances, Object instance)
- {
- this.decoratorInstances = decoratorInstances;
- this.instance = instance;
- }
-
- /**
- *
- *
- * @param self the proxy instance.
- * @param method the overridden method declared in the super class or
- * interface.
- * @param proceed the forwarder method for invoking the overridden method. It
- * is null if the overridden method is abstract or declared in the
- * interface.
- * @param args an array of objects containing the values of the arguments
- * passed in the method invocation on the proxy instance. If a
- * parameter type is a primitive type, the type of the array
- * element is a wrapper class.
- * @return the resulting value of the method invocation.
- *
- * @throws Throwable if the method invocation fails.
- */
- public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Throwable
- {
- MethodSignature methodSignature = new MethodSignatureImpl(method);
- for (SerializableContextualInstance<DecoratorImpl<Object>, Object> beanInstance : decoratorInstances)
- {
- WBMethod<?, ?> decoratorMethod = beanInstance.getContextual().get().getAnnotatedItem().getWBMethod(methodSignature);
- if (decoratorMethod != null)
- {
- return decoratorMethod.invokeOnInstance(beanInstance.getInstance(), args);
- }
- }
-
- return ensureAccessible(method).invoke(instance, args);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.proxy;
+
+import static org.jboss.webbeans.util.Reflections.ensureAccessible;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javassist.util.proxy.MethodHandler;
+
+import org.jboss.webbeans.bean.DecoratorImpl;
+import org.jboss.webbeans.context.SerializableContextualInstance;
+import org.jboss.webbeans.introspector.MethodSignature;
+import org.jboss.webbeans.introspector.WBMethod;
+import org.jboss.webbeans.introspector.jlr.MethodSignatureImpl;
+
+/**
+ * Method handler for decorated beans
+ *
+ * @author Pete Muir
+ *
+ */
+public class DecoratorProxyMethodHandler implements MethodHandler, Serializable
+{
+ private static final long serialVersionUID = 4577632640130385060L;
+
+ private final List<SerializableContextualInstance<DecoratorImpl<Object>, Object>> decoratorInstances;
+
+ private final Object instance;
+
+ /**
+ * Constructor
+ *
+ * @param removeMethods
+ *
+ * @param proxy The generic proxy
+ */
+ public DecoratorProxyMethodHandler(List<SerializableContextualInstance<DecoratorImpl<Object>, Object>> decoratorInstances, Object instance)
+ {
+ this.decoratorInstances = decoratorInstances;
+ this.instance = instance;
+ }
+
+ /**
+ *
+ *
+ * @param self the proxy instance.
+ * @param method the overridden method declared in the super class or
+ * interface.
+ * @param proceed the forwarder method for invoking the overridden method. It
+ * is null if the overridden method is abstract or declared in the
+ * interface.
+ * @param args an array of objects containing the values of the arguments
+ * passed in the method invocation on the proxy instance. If a
+ * parameter type is a primitive type, the type of the array
+ * element is a wrapper class.
+ * @return the resulting value of the method invocation.
+ *
+ * @throws Throwable if the method invocation fails.
+ */
+ public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Throwable
+ {
+ MethodSignature methodSignature = new MethodSignatureImpl(method);
+ for (SerializableContextualInstance<DecoratorImpl<Object>, Object> beanInstance : decoratorInstances)
+ {
+ WBMethod<?, ?> decoratorMethod = beanInstance.getContextual().get().getAnnotatedItem().getWBMethod(methodSignature);
+ if (decoratorMethod != null)
+ {
+ return decoratorMethod.invokeOnInstance(beanInstance.getInstance(), args);
+ }
+ }
+
+ return ensureAccessible(method).invoke(instance, args);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanInstance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,136 +1,136 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.proxy;
-
-import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collection;
-
-import javassist.util.proxy.MethodHandler;
-
-import javax.enterprise.context.spi.CreationalContext;
-
-import org.jboss.webbeans.bean.SessionBean;
-import org.jboss.webbeans.ejb.api.SessionObjectReference;
-import org.jboss.webbeans.introspector.MethodSignature;
-import org.jboss.webbeans.introspector.jlr.MethodSignatureImpl;
-import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.util.Reflections;
-
-/**
- * Method handler for enterprise bean client proxies
- *
- * @author Nicklas Karlsson
- * @author Pete Muir
- *
- */
-public class EnterpriseBeanProxyMethodHandler<T> implements MethodHandler, Serializable
-{
-
- private static final long serialVersionUID = 2107723373882153667L;
-
- // The log provider
- static final transient Log log = Logging.getLog(EnterpriseBeanProxyMethodHandler.class);
-
- private final SessionObjectReference reference;
- private final Class<?> objectInterface;
- private final Collection<MethodSignature> removeMethodSignatures;
- private final boolean clientCanCallRemoveMethods;
- private final boolean stateful;
-
- /**
- * Constructor
- *
- * @param removeMethods
- *
- * @param proxy The generic proxy
- */
- public EnterpriseBeanProxyMethodHandler(SessionBean<T> bean, CreationalContext<T> creationalContext)
- {
- this.objectInterface = bean.getEjbDescriptor().getObjectInterface();
- this.removeMethodSignatures = bean.getEjbDescriptor().getRemoveMethodSignatures();
- this.clientCanCallRemoveMethods = bean.isClientCanCallRemoveMethods();
- this.reference = bean.createReference();
- this.stateful = bean.getEjbDescriptor().isStateful();
- log.trace("Created enterprise bean proxy method handler for " + bean);
- }
-
- /**
- * Lookups the EJB in the container and executes the method on it
- *
- * @param self the proxy instance.
- * @param method the overridden method declared in the super class or
- * interface.
- * @param proceed the forwarder method for invoking the overridden method. It
- * is null if the overridden method is abstract or declared in the
- * interface.
- * @param args an array of objects containing the values of the arguments
- * passed in the method invocation on the proxy instance. If a
- * parameter type is a primitive type, the type of the array
- * element is a wrapper class.
- * @return the resulting value of the method invocation.
- *
- * @throws Throwable if the method invocation fails.
- */
- public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Throwable
- {
- if (reference.isRemoved())
- {
- return null;
- }
- if ("destroy".equals(method.getName()) && Marker.isMarker(0, method, args))
- {
- if (stateful)
- {
- reference.remove();
- }
- return null;
- }
-
- if (!clientCanCallRemoveMethods)
- {
- // TODO we can certainly optimize this search algorithm!
- MethodSignature methodSignature = new MethodSignatureImpl(method);
- if (removeMethodSignatures.contains(methodSignature))
- {
- throw new UnsupportedOperationException("Cannot call EJB remove method directly on non-dependent scoped bean " + method );
- }
- }
- Class<?> businessInterface = getBusinessInterface(method);
- 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);
- return returnValue;
- }
-
- private Class<?> getBusinessInterface(Method method)
- {
- Class<?> businessInterface = method.getDeclaringClass();
- if (businessInterface.equals(Object.class))
- {
- return objectInterface;
- }
- else
- {
- return businessInterface;
- }
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.proxy;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collection;
+
+import javassist.util.proxy.MethodHandler;
+
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.webbeans.bean.SessionBean;
+import org.jboss.webbeans.ejb.api.SessionObjectReference;
+import org.jboss.webbeans.introspector.MethodSignature;
+import org.jboss.webbeans.introspector.jlr.MethodSignatureImpl;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.util.Reflections;
+
+/**
+ * Method handler for enterprise bean client proxies
+ *
+ * @author Nicklas Karlsson
+ * @author Pete Muir
+ *
+ */
+public class EnterpriseBeanProxyMethodHandler<T> implements MethodHandler, Serializable
+{
+
+ private static final long serialVersionUID = 2107723373882153667L;
+
+ // The log provider
+ static final transient Log log = Logging.getLog(EnterpriseBeanProxyMethodHandler.class);
+
+ private final SessionObjectReference reference;
+ private final Class<?> objectInterface;
+ private final Collection<MethodSignature> removeMethodSignatures;
+ private final boolean clientCanCallRemoveMethods;
+ private final boolean stateful;
+
+ /**
+ * Constructor
+ *
+ * @param removeMethods
+ *
+ * @param proxy The generic proxy
+ */
+ public EnterpriseBeanProxyMethodHandler(SessionBean<T> bean, CreationalContext<T> creationalContext)
+ {
+ this.objectInterface = bean.getEjbDescriptor().getObjectInterface();
+ this.removeMethodSignatures = bean.getEjbDescriptor().getRemoveMethodSignatures();
+ this.clientCanCallRemoveMethods = bean.isClientCanCallRemoveMethods();
+ this.reference = bean.createReference();
+ this.stateful = bean.getEjbDescriptor().isStateful();
+ log.trace("Created enterprise bean proxy method handler for " + bean);
+ }
+
+ /**
+ * Lookups the EJB in the container and executes the method on it
+ *
+ * @param self the proxy instance.
+ * @param method the overridden method declared in the super class or
+ * interface.
+ * @param proceed the forwarder method for invoking the overridden method. It
+ * is null if the overridden method is abstract or declared in the
+ * interface.
+ * @param args an array of objects containing the values of the arguments
+ * passed in the method invocation on the proxy instance. If a
+ * parameter type is a primitive type, the type of the array
+ * element is a wrapper class.
+ * @return the resulting value of the method invocation.
+ *
+ * @throws Throwable if the method invocation fails.
+ */
+ public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Throwable
+ {
+ if (reference.isRemoved())
+ {
+ return null;
+ }
+ if ("destroy".equals(method.getName()) && Marker.isMarker(0, method, args))
+ {
+ if (stateful)
+ {
+ reference.remove();
+ }
+ return null;
+ }
+
+ if (!clientCanCallRemoveMethods)
+ {
+ // TODO we can certainly optimize this search algorithm!
+ MethodSignature methodSignature = new MethodSignatureImpl(method);
+ if (removeMethodSignatures.contains(methodSignature))
+ {
+ throw new UnsupportedOperationException("Cannot call EJB remove method directly on non-dependent scoped bean " + method );
+ }
+ }
+ Class<?> businessInterface = getBusinessInterface(method);
+ 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);
+ return returnValue;
+ }
+
+ private Class<?> getBusinessInterface(Method method)
+ {
+ Class<?> businessInterface = method.getDeclaringClass();
+ if (businessInterface.equals(Object.class))
+ {
+ return objectInterface;
+ }
+ else
+ {
+ return businessInterface;
+ }
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/Marker.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,315 +1,315 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bootstrap;
-
-import java.util.Set;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.ProcessObserverMethod;
-import javax.enterprise.inject.spi.ProcessProducer;
-import javax.enterprise.inject.spi.Interceptor;
-import javax.inject.Inject;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.DefinitionException;
-import org.jboss.webbeans.bean.AbstractClassBean;
-import org.jboss.webbeans.bean.AbstractProducerBean;
-import org.jboss.webbeans.bean.DecoratorImpl;
-import org.jboss.webbeans.bean.DisposalMethod;
-import org.jboss.webbeans.bean.ManagedBean;
-import org.jboss.webbeans.bean.NewManagedBean;
-import org.jboss.webbeans.bean.NewSessionBean;
-import org.jboss.webbeans.bean.ProducerField;
-import org.jboss.webbeans.bean.ProducerMethod;
-import org.jboss.webbeans.bean.RIBean;
-import org.jboss.webbeans.bean.SessionBean;
-import org.jboss.webbeans.bean.InterceptorImpl;
-import org.jboss.webbeans.bean.ee.EEResourceProducerField;
-import org.jboss.webbeans.bean.ee.PersistenceContextProducerField;
-import org.jboss.webbeans.bootstrap.events.ProcessObserverMethodImpl;
-import org.jboss.webbeans.bootstrap.events.ProcessProducerImpl;
-import org.jboss.webbeans.ejb.EJBApiAbstraction;
-import org.jboss.webbeans.ejb.InternalEjbDescriptor;
-import org.jboss.webbeans.ejb.spi.EjbServices;
-import org.jboss.webbeans.event.ObserverFactory;
-import org.jboss.webbeans.event.ObserverMethodImpl;
-import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.introspector.WBField;
-import org.jboss.webbeans.introspector.WBMethod;
-import org.jboss.webbeans.jsf.JsfApiAbstraction;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.persistence.PersistenceApiAbstraction;
-import org.jboss.webbeans.servlet.ServletApiAbstraction;
-import org.jboss.webbeans.util.Reflections;
-import org.jboss.webbeans.util.reflection.ParameterizedTypeImpl;
-import org.jboss.webbeans.ws.WSApiAbstraction;
-import org.jboss.interceptor.model.InterceptionModel;
-
-public class AbstractBeanDeployer<E extends BeanDeployerEnvironment>
-{
-
- private static final LogProvider log = Logging.getLogProvider(AbstractBeanDeployer.class);
-
- private final BeanManagerImpl manager;
- private final E environment;
-
- public AbstractBeanDeployer(BeanManagerImpl manager, E environment)
- {
- this.manager = manager;
- this.environment = environment;
- }
-
- protected BeanManagerImpl getManager()
- {
- return manager;
- }
-
- public AbstractBeanDeployer<E> deploy()
- {
- Set<? extends RIBean<?>> beans = getEnvironment().getBeans();
- // ensure that all decorators are initialized before initializing
- // the rest of the beans
- for (DecoratorImpl<?> bean : getEnvironment().getDecorators())
- {
- bean.initialize(getEnvironment());
- manager.addDecorator(bean);
- log.debug("Bean: " + bean);
- }
- for (InterceptorImpl<?> bean: getEnvironment().getInterceptors())
- {
- bean.initialize(getEnvironment());
- manager.addInterceptor(bean);
- log.debug("Interceptor: " + bean);
- }
- for (RIBean<?> bean : beans)
- {
- bean.initialize(getEnvironment());
- if (bean instanceof AbstractProducerBean<?, ?, ?>)
- {
- AbstractProducerBean<?, ?, Member> producer = (AbstractProducerBean<?, ?, Member>) bean;
- createAndFireProcessProducerEvent(producer);
- }
- manager.addBean(bean);
- log.debug("Bean: " + bean);
- }
- for (ObserverMethodImpl<?, ?> observer : getEnvironment().getObservers())
- {
- log.debug("Observer : " + observer);
- observer.initialize();
- createAndFireProcessObserverMethodEvent(observer);
- manager.addObserver(observer);
- }
-
- return this;
- }
-
- /**
- * Creates the sub bean for an class (simple or enterprise) bean
- *
- * @param bean
- * The class bean
- *
- */
- protected <T> void createSubBeans(AbstractClassBean<T> bean)
- {
- createProducerMethods(bean, bean.getAnnotatedItem());
- createProducerFields(bean, bean.getAnnotatedItem());
- if (manager.isBeanEnabled(bean))
- {
- createObserverMethods(bean, bean.getAnnotatedItem());
- }
- createDisposalMethods(bean, bean.getAnnotatedItem());
-
- }
-
- protected <X> void createProducerMethods(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
- {
- for (WBMethod<?, X> method : annotatedClass.getDeclaredAnnotatedWBMethods(Produces.class))
- {
- createProducerMethod(declaringBean, method);
- }
- }
-
- protected <X> void createDisposalMethods(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
- {
- for (WBMethod<?, X> method : annotatedClass.getDeclaredWBMethodsWithAnnotatedParameters(Disposes.class))
- {
- DisposalMethod<X, ?> disposalBean = DisposalMethod.of(manager, method, declaringBean);
- disposalBean.initialize(getEnvironment());
- getEnvironment().addBean(disposalBean);
- }
- }
-
- protected <X, T> void createProducerMethod(AbstractClassBean<X> declaringBean, WBMethod<T, X> annotatedMethod)
- {
- ProducerMethod<X, T> bean = ProducerMethod.of(annotatedMethod, declaringBean, manager);
- getEnvironment().addBean(bean);
- }
-
- protected <X, T> void createProducerField(AbstractClassBean<X> declaringBean, WBField<T, X> field)
- {
- ProducerField<X, T> bean;
- if (isPersistenceContextProducerField(field))
- {
- bean = PersistenceContextProducerField.of(field, declaringBean, manager);
- }
- else if (isEEResourceProducerField(field))
- {
- bean = EEResourceProducerField.of(field, declaringBean, manager);
- }
- else
- {
- bean = ProducerField.of(field, declaringBean, manager);
- }
- getEnvironment().addBean(bean);
- }
-
- private <X, T> void createAndFireProcessProducerEvent(AbstractProducerBean<X, T, Member> producer)
- {
- ProcessProducerImpl<X, T> payload = new ProcessProducerImpl<X, T>(producer.getAnnotatedItem(), producer) {};
- fireEvent(payload, ProcessProducer.class, producer.getAnnotatedItem().getDeclaringType().getBaseType(), producer.getAnnotatedItem().getBaseType());
- if (!payload.getDefinitionErrors().isEmpty())
- {
- // FIXME communicate all the captured definition errors in this exception
- throw new DefinitionException(payload.getDefinitionErrors().get(0));
- }
- }
-
- private void fireEvent(Object payload, Type rawType, Type... actualTypeArguments)
- {
- Type eventType = new ParameterizedTypeImpl(rawType, actualTypeArguments, null);
- manager.fireEvent(eventType, payload);
- }
-
- protected <X> void createProducerFields(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
- {
- for (WBField<?, X> field : annotatedClass.getDeclaredAnnotatedWBFields(Produces.class))
- {
- createProducerField(declaringBean, field);
- }
- }
-
- protected <X> void createObserverMethods(RIBean<X> declaringBean, WBClass<X> annotatedClass)
- {
- for (WBMethod<?, X> method : annotatedClass.getDeclaredWBMethodsWithAnnotatedParameters(Observes.class))
- {
- createObserverMethod(declaringBean, method);
- }
- }
-
- protected <X, T> void createObserverMethod(RIBean<X> declaringBean, WBMethod<T, X> method)
- {
- ObserverMethodImpl<X, T> observer = ObserverFactory.create(method, declaringBean, manager);
- getEnvironment().addObserver(observer);
- }
-
- private <X, T> void createAndFireProcessObserverMethodEvent(ObserverMethodImpl<X, T> observer)
- {
- ProcessObserverMethodImpl<X, T> payload = new ProcessObserverMethodImpl<X, T>(observer.getMethod(), observer) {};
- fireEvent(payload, ProcessObserverMethod.class, observer.getMethod().getDeclaringType().getBaseType(), observer.getObservedType());
- if (!payload.getDefinitionErrors().isEmpty())
- {
- // FIXME communicate all the captured definition errors in this exception
- throw new DefinitionException(payload.getDefinitionErrors().get(0));
- }
- return;
- }
-
- protected <T> void createSimpleBean(WBClass<T> annotatedClass)
- {
- ManagedBean<T> bean = ManagedBean.of(annotatedClass, manager);
- getEnvironment().addBean(bean);
- createSubBeans(bean);
- getEnvironment().addBean(NewManagedBean.of(annotatedClass, manager));
- }
-
- protected <T> void createDecorator(WBClass<T> annotatedClass)
- {
- DecoratorImpl<T> bean = DecoratorImpl.of(annotatedClass, manager);
- getEnvironment().addBean(bean);
- }
-
- protected <T> void createInterceptor(WBClass<T> annotatedClass)
- {
- InterceptorImpl<T> bean = InterceptorImpl.of(annotatedClass, manager);
- getEnvironment().addBean(bean);
- }
-
- protected <T> void createEnterpriseBean(InternalEjbDescriptor<T> ejbDescriptor)
- {
- // TODO Don't create enterprise bean if it has no local interfaces!
- SessionBean<T> bean = SessionBean.of(ejbDescriptor, manager);
- getEnvironment().addBean(bean);
- createSubBeans(bean);
- getEnvironment().addBean(NewSessionBean.of(ejbDescriptor, manager));
- }
-
- /**
- * Indicates if the type is a simple Web Bean
- *
- * @param type
- * The type to inspect
- * @return True if simple Web Bean, false otherwise
- */
- protected boolean isTypeManagedBeanOrDecorator(WBClass<?> clazz)
- {
- Class<?> javaClass = clazz.getJavaClass();
- EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
- JsfApiAbstraction jsfApiAbstraction = manager.getServices().get(JsfApiAbstraction.class);
- ServletApiAbstraction servletApiAbstraction = manager.getServices().get(ServletApiAbstraction.class);
- return !clazz.isNonStaticMemberClass() &&
- !Reflections.isParamerterizedTypeWithWildcard(javaClass) &&
- !servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(javaClass) &&
- !servletApiAbstraction.FILTER_CLASS.isAssignableFrom(javaClass) &&
- !servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(javaClass) &&
- !servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(javaClass) &&
- !servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(javaClass) &&
- !ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(javaClass) &&
- !jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(javaClass) &&
- hasSimpleWebBeanConstructor(clazz);
- }
-
- protected boolean isEEResourceProducerField(WBField<?, ?> field)
- {
- EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
- PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
- WSApiAbstraction wsApiAbstraction = manager.getServices().get(WSApiAbstraction.class);
- return field.isAnnotationPresent(ejbApiAbstraction.EJB_ANNOTATION_CLASS) || field.isAnnotationPresent(ejbApiAbstraction.RESOURCE_ANNOTATION_CLASS) || field.isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_UNIT_ANNOTATION_CLASS) || field.isAnnotationPresent(wsApiAbstraction.WEB_SERVICE_REF_ANNOTATION_CLASS);
- }
-
- protected boolean isPersistenceContextProducerField(WBField<?, ?> field)
- {
- PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
- return field.isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_CONTEXT_ANNOTATION_CLASS);
- }
-
- private static boolean hasSimpleWebBeanConstructor(WBClass<?> type)
- {
- return type.getNoArgsWBConstructor() != null || type.getAnnotatedWBConstructors(Inject.class).size() > 0;
- }
-
- public E getEnvironment()
- {
- return environment;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bootstrap;
+
+import java.util.Set;
+import java.lang.reflect.Member;
+import java.lang.reflect.Type;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.ProcessObserverMethod;
+import javax.enterprise.inject.spi.ProcessProducer;
+import javax.enterprise.inject.spi.Interceptor;
+import javax.inject.Inject;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.DefinitionException;
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.AbstractProducerBean;
+import org.jboss.webbeans.bean.DecoratorImpl;
+import org.jboss.webbeans.bean.DisposalMethod;
+import org.jboss.webbeans.bean.ManagedBean;
+import org.jboss.webbeans.bean.NewManagedBean;
+import org.jboss.webbeans.bean.NewSessionBean;
+import org.jboss.webbeans.bean.ProducerField;
+import org.jboss.webbeans.bean.ProducerMethod;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.SessionBean;
+import org.jboss.webbeans.bean.InterceptorImpl;
+import org.jboss.webbeans.bean.ee.EEResourceProducerField;
+import org.jboss.webbeans.bean.ee.PersistenceContextProducerField;
+import org.jboss.webbeans.bootstrap.events.ProcessObserverMethodImpl;
+import org.jboss.webbeans.bootstrap.events.ProcessProducerImpl;
+import org.jboss.webbeans.ejb.EJBApiAbstraction;
+import org.jboss.webbeans.ejb.InternalEjbDescriptor;
+import org.jboss.webbeans.ejb.spi.EjbServices;
+import org.jboss.webbeans.event.ObserverFactory;
+import org.jboss.webbeans.event.ObserverMethodImpl;
+import org.jboss.webbeans.introspector.WBClass;
+import org.jboss.webbeans.introspector.WBField;
+import org.jboss.webbeans.introspector.WBMethod;
+import org.jboss.webbeans.jsf.JsfApiAbstraction;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.persistence.PersistenceApiAbstraction;
+import org.jboss.webbeans.servlet.ServletApiAbstraction;
+import org.jboss.webbeans.util.Reflections;
+import org.jboss.webbeans.util.reflection.ParameterizedTypeImpl;
+import org.jboss.webbeans.ws.WSApiAbstraction;
+import org.jboss.interceptor.model.InterceptionModel;
+
+public class AbstractBeanDeployer<E extends BeanDeployerEnvironment>
+{
+
+ private static final LogProvider log = Logging.getLogProvider(AbstractBeanDeployer.class);
+
+ private final BeanManagerImpl manager;
+ private final E environment;
+
+ public AbstractBeanDeployer(BeanManagerImpl manager, E environment)
+ {
+ this.manager = manager;
+ this.environment = environment;
+ }
+
+ protected BeanManagerImpl getManager()
+ {
+ return manager;
+ }
+
+ public AbstractBeanDeployer<E> deploy()
+ {
+ Set<? extends RIBean<?>> beans = getEnvironment().getBeans();
+ // ensure that all decorators are initialized before initializing
+ // the rest of the beans
+ for (DecoratorImpl<?> bean : getEnvironment().getDecorators())
+ {
+ bean.initialize(getEnvironment());
+ manager.addDecorator(bean);
+ log.debug("Bean: " + bean);
+ }
+ for (InterceptorImpl<?> bean: getEnvironment().getInterceptors())
+ {
+ bean.initialize(getEnvironment());
+ manager.addInterceptor(bean);
+ log.debug("Interceptor: " + bean);
+ }
+ for (RIBean<?> bean : beans)
+ {
+ bean.initialize(getEnvironment());
+ if (bean instanceof AbstractProducerBean<?, ?, ?>)
+ {
+ AbstractProducerBean<?, ?, Member> producer = (AbstractProducerBean<?, ?, Member>) bean;
+ createAndFireProcessProducerEvent(producer);
+ }
+ manager.addBean(bean);
+ log.debug("Bean: " + bean);
+ }
+ for (ObserverMethodImpl<?, ?> observer : getEnvironment().getObservers())
+ {
+ log.debug("Observer : " + observer);
+ observer.initialize();
+ createAndFireProcessObserverMethodEvent(observer);
+ manager.addObserver(observer);
+ }
+
+ return this;
+ }
+
+ /**
+ * Creates the sub bean for an class (simple or enterprise) bean
+ *
+ * @param bean
+ * The class bean
+ *
+ */
+ protected <T> void createSubBeans(AbstractClassBean<T> bean)
+ {
+ createProducerMethods(bean, bean.getAnnotatedItem());
+ createProducerFields(bean, bean.getAnnotatedItem());
+ if (manager.isBeanEnabled(bean))
+ {
+ createObserverMethods(bean, bean.getAnnotatedItem());
+ }
+ createDisposalMethods(bean, bean.getAnnotatedItem());
+
+ }
+
+ protected <X> void createProducerMethods(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
+ {
+ for (WBMethod<?, X> method : annotatedClass.getDeclaredAnnotatedWBMethods(Produces.class))
+ {
+ createProducerMethod(declaringBean, method);
+ }
+ }
+
+ protected <X> void createDisposalMethods(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
+ {
+ for (WBMethod<?, X> method : annotatedClass.getDeclaredWBMethodsWithAnnotatedParameters(Disposes.class))
+ {
+ DisposalMethod<X, ?> disposalBean = DisposalMethod.of(manager, method, declaringBean);
+ disposalBean.initialize(getEnvironment());
+ getEnvironment().addBean(disposalBean);
+ }
+ }
+
+ protected <X, T> void createProducerMethod(AbstractClassBean<X> declaringBean, WBMethod<T, X> annotatedMethod)
+ {
+ ProducerMethod<X, T> bean = ProducerMethod.of(annotatedMethod, declaringBean, manager);
+ getEnvironment().addBean(bean);
+ }
+
+ protected <X, T> void createProducerField(AbstractClassBean<X> declaringBean, WBField<T, X> field)
+ {
+ ProducerField<X, T> bean;
+ if (isPersistenceContextProducerField(field))
+ {
+ bean = PersistenceContextProducerField.of(field, declaringBean, manager);
+ }
+ else if (isEEResourceProducerField(field))
+ {
+ bean = EEResourceProducerField.of(field, declaringBean, manager);
+ }
+ else
+ {
+ bean = ProducerField.of(field, declaringBean, manager);
+ }
+ getEnvironment().addBean(bean);
+ }
+
+ private <X, T> void createAndFireProcessProducerEvent(AbstractProducerBean<X, T, Member> producer)
+ {
+ ProcessProducerImpl<X, T> payload = new ProcessProducerImpl<X, T>(producer.getAnnotatedItem(), producer) {};
+ fireEvent(payload, ProcessProducer.class, producer.getAnnotatedItem().getDeclaringType().getBaseType(), producer.getAnnotatedItem().getBaseType());
+ if (!payload.getDefinitionErrors().isEmpty())
+ {
+ // FIXME communicate all the captured definition errors in this exception
+ throw new DefinitionException(payload.getDefinitionErrors().get(0));
+ }
+ }
+
+ private void fireEvent(Object payload, Type rawType, Type... actualTypeArguments)
+ {
+ Type eventType = new ParameterizedTypeImpl(rawType, actualTypeArguments, null);
+ manager.fireEvent(eventType, payload);
+ }
+
+ protected <X> void createProducerFields(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
+ {
+ for (WBField<?, X> field : annotatedClass.getDeclaredAnnotatedWBFields(Produces.class))
+ {
+ createProducerField(declaringBean, field);
+ }
+ }
+
+ protected <X> void createObserverMethods(RIBean<X> declaringBean, WBClass<X> annotatedClass)
+ {
+ for (WBMethod<?, X> method : annotatedClass.getDeclaredWBMethodsWithAnnotatedParameters(Observes.class))
+ {
+ createObserverMethod(declaringBean, method);
+ }
+ }
+
+ protected <X, T> void createObserverMethod(RIBean<X> declaringBean, WBMethod<T, X> method)
+ {
+ ObserverMethodImpl<X, T> observer = ObserverFactory.create(method, declaringBean, manager);
+ getEnvironment().addObserver(observer);
+ }
+
+ private <X, T> void createAndFireProcessObserverMethodEvent(ObserverMethodImpl<X, T> observer)
+ {
+ ProcessObserverMethodImpl<X, T> payload = new ProcessObserverMethodImpl<X, T>(observer.getMethod(), observer) {};
+ fireEvent(payload, ProcessObserverMethod.class, observer.getMethod().getDeclaringType().getBaseType(), observer.getObservedType());
+ if (!payload.getDefinitionErrors().isEmpty())
+ {
+ // FIXME communicate all the captured definition errors in this exception
+ throw new DefinitionException(payload.getDefinitionErrors().get(0));
+ }
+ return;
+ }
+
+ protected <T> void createSimpleBean(WBClass<T> annotatedClass)
+ {
+ ManagedBean<T> bean = ManagedBean.of(annotatedClass, manager);
+ getEnvironment().addBean(bean);
+ createSubBeans(bean);
+ getEnvironment().addBean(NewManagedBean.of(annotatedClass, manager));
+ }
+
+ protected <T> void createDecorator(WBClass<T> annotatedClass)
+ {
+ DecoratorImpl<T> bean = DecoratorImpl.of(annotatedClass, manager);
+ getEnvironment().addBean(bean);
+ }
+
+ protected <T> void createInterceptor(WBClass<T> annotatedClass)
+ {
+ InterceptorImpl<T> bean = InterceptorImpl.of(annotatedClass, manager);
+ getEnvironment().addBean(bean);
+ }
+
+ protected <T> void createEnterpriseBean(InternalEjbDescriptor<T> ejbDescriptor)
+ {
+ // TODO Don't create enterprise bean if it has no local interfaces!
+ SessionBean<T> bean = SessionBean.of(ejbDescriptor, manager);
+ getEnvironment().addBean(bean);
+ createSubBeans(bean);
+ getEnvironment().addBean(NewSessionBean.of(ejbDescriptor, manager));
+ }
+
+ /**
+ * Indicates if the type is a simple Web Bean
+ *
+ * @param type
+ * The type to inspect
+ * @return True if simple Web Bean, false otherwise
+ */
+ protected boolean isTypeManagedBeanOrDecorator(WBClass<?> clazz)
+ {
+ Class<?> javaClass = clazz.getJavaClass();
+ EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
+ JsfApiAbstraction jsfApiAbstraction = manager.getServices().get(JsfApiAbstraction.class);
+ ServletApiAbstraction servletApiAbstraction = manager.getServices().get(ServletApiAbstraction.class);
+ return !clazz.isNonStaticMemberClass() &&
+ !Reflections.isParamerterizedTypeWithWildcard(javaClass) &&
+ !servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(javaClass) &&
+ !servletApiAbstraction.FILTER_CLASS.isAssignableFrom(javaClass) &&
+ !servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(javaClass) &&
+ !servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(javaClass) &&
+ !servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(javaClass) &&
+ !ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(javaClass) &&
+ !jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(javaClass) &&
+ hasSimpleWebBeanConstructor(clazz);
+ }
+
+ protected boolean isEEResourceProducerField(WBField<?, ?> field)
+ {
+ EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
+ PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
+ WSApiAbstraction wsApiAbstraction = manager.getServices().get(WSApiAbstraction.class);
+ return field.isAnnotationPresent(ejbApiAbstraction.EJB_ANNOTATION_CLASS) || field.isAnnotationPresent(ejbApiAbstraction.RESOURCE_ANNOTATION_CLASS) || field.isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_UNIT_ANNOTATION_CLASS) || field.isAnnotationPresent(wsApiAbstraction.WEB_SERVICE_REF_ANNOTATION_CLASS);
+ }
+
+ protected boolean isPersistenceContextProducerField(WBField<?, ?> field)
+ {
+ PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
+ return field.isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_CONTEXT_ANNOTATION_CLASS);
+ }
+
+ private static boolean hasSimpleWebBeanConstructor(WBClass<?> type)
+ {
+ return type.getNoArgsWBConstructor() != null || type.getAnnotatedWBConstructors(Inject.class).size() > 0;
+ }
+
+ public E getEnvironment()
+ {
+ return environment;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,202 +1,202 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bootstrap;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.bean.AbstractClassBean;
-import org.jboss.webbeans.bean.DecoratorImpl;
-import org.jboss.webbeans.bean.DisposalMethod;
-import org.jboss.webbeans.bean.NewBean;
-import org.jboss.webbeans.bean.ProducerField;
-import org.jboss.webbeans.bean.ProducerMethod;
-import org.jboss.webbeans.bean.RIBean;
-import org.jboss.webbeans.bean.InterceptorImpl;
-import org.jboss.webbeans.bean.builtin.AbstractBuiltInBean;
-import org.jboss.webbeans.bean.builtin.ExtensionBean;
-import org.jboss.webbeans.ejb.EjbDescriptors;
-import org.jboss.webbeans.event.ObserverMethodImpl;
-import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.introspector.WBMethod;
-import org.jboss.webbeans.resolution.ResolvableFactory;
-import org.jboss.webbeans.resolution.TypeSafeDisposerResolver;
-
-public class BeanDeployerEnvironment
-{
-
- private final Map<WBClass<?>, AbstractClassBean<?>> classBeanMap;
- private final Map<WBMethod<?, ?>, ProducerMethod<?, ?>> producerMethodBeanMap;
- private final Set<RIBean<?>> beans;
- private final Set<ObserverMethodImpl<?, ?>> observers;
- private final List<DisposalMethod<?, ?>> allDisposalBeans;
- private final Set<DisposalMethod<?, ?>> resolvedDisposalBeans;
- private final Set<DecoratorImpl<?>> decorators;
- private final Set<InterceptorImpl<?>> interceptors;
- private final EjbDescriptors ejbDescriptors;
- private final TypeSafeDisposerResolver disposalMethodResolver;
-
- public BeanDeployerEnvironment(EjbDescriptors ejbDescriptors, BeanManagerImpl manager)
- {
- this.classBeanMap = new HashMap<WBClass<?>, AbstractClassBean<?>>();
- this.producerMethodBeanMap = new HashMap<WBMethod<?, ?>, ProducerMethod<?, ?>>();
- this.allDisposalBeans = new ArrayList<DisposalMethod<?, ?>>();
- this.resolvedDisposalBeans = new HashSet<DisposalMethod<?, ?>>();
- this.beans = new HashSet<RIBean<?>>();
- this.decorators = new HashSet<DecoratorImpl<?>>();
- this.interceptors = new HashSet<InterceptorImpl<?>>();
- this.observers = new HashSet<ObserverMethodImpl<?, ?>>();
- this.ejbDescriptors = ejbDescriptors;
- this.disposalMethodResolver = new TypeSafeDisposerResolver(manager, allDisposalBeans);
- }
-
- public <X, T> ProducerMethod<X, T> getProducerMethod(WBMethod<X, T> method)
- {
- if (!producerMethodBeanMap.containsKey(method))
- {
- return null;
- }
- else
- {
- ProducerMethod<?, ?> bean = producerMethodBeanMap.get(method);
- bean.initialize(this);
- return (ProducerMethod<X, T>) bean;
- }
- }
-
- public AbstractClassBean<?> getClassBean(WBClass<?> clazz)
- {
- if (!classBeanMap.containsKey(clazz))
- {
- return null;
- }
- else
- {
- AbstractClassBean<?> bean = classBeanMap.get(clazz);
- bean.initialize(this);
- return bean;
- }
- }
-
- public void addBean(ProducerMethod<?, ?> bean)
- {
- producerMethodBeanMap.put(bean.getAnnotatedItem(), bean);
- beans.add(bean);
- }
-
- public void addBean(ProducerField<?, ?> bean)
- {
- beans.add(bean);
- }
-
- public void addBean(ExtensionBean bean)
- {
- beans.add(bean);
- }
-
- public void addBean(AbstractBuiltInBean<?> bean)
- {
- beans.add(bean);
- }
-
- public void addBean(AbstractClassBean<?> bean)
- {
- if (!(bean instanceof NewBean))
- {
- classBeanMap.put(bean.getAnnotatedItem(), bean);
- }
- beans.add(bean);
- }
-
- public void addBean(DecoratorImpl<?> bean)
- {
- decorators.add(bean);
- }
-
- public void addBean(InterceptorImpl<?> bean)
- {
- interceptors.add(bean);
- }
-
- public void addBean(DisposalMethod<?, ?> bean)
- {
- allDisposalBeans.add(bean);
- }
-
- public void addObserver(ObserverMethodImpl<?, ?> observer)
- {
- this.observers.add(observer);
- }
-
- public Set<? extends RIBean<?>> getBeans()
- {
- return Collections.unmodifiableSet(beans);
- }
-
- public Set<DecoratorImpl<?>> getDecorators()
- {
- return Collections.unmodifiableSet(decorators);
- }
-
- public Set<InterceptorImpl<?>> getInterceptors()
- {
- return Collections.unmodifiableSet(interceptors);
- }
-
- public Set<ObserverMethodImpl<?, ?>> getObservers()
- {
- return Collections.unmodifiableSet(observers);
- }
-
-
- public Set<DisposalMethod<?, ?>> getUnresolvedDisposalBeans()
- {
- Set<DisposalMethod<?, ?>> beans = new HashSet<DisposalMethod<?, ?>>(allDisposalBeans);
- beans.removeAll(resolvedDisposalBeans);
- return Collections.unmodifiableSet(beans);
- }
-
- public EjbDescriptors getEjbDescriptors()
- {
- return ejbDescriptors;
- }
-
- /**
- * Resolve the disposal method for the given producer method. Any resolved
- * beans will be marked as such for the purpose of validating that all
- * disposal methods are used. For internal use.
- *
- * @param apiType The API type to match
- * @param bindings The binding types to match
- * @return The set of matching disposal methods
- */
- public <X> Set<DisposalMethod<X, ?>> resolveDisposalBeans(Set<Type> types, Set<Annotation> bindings, AbstractClassBean<X> declaringBean)
- {
- Set<DisposalMethod<X, ?>> beans = (Set) disposalMethodResolver.resolve(ResolvableFactory.of(types, bindings, declaringBean));
- resolvedDisposalBeans.addAll(beans);
- return Collections.unmodifiableSet(beans);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bootstrap;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.DecoratorImpl;
+import org.jboss.webbeans.bean.DisposalMethod;
+import org.jboss.webbeans.bean.NewBean;
+import org.jboss.webbeans.bean.ProducerField;
+import org.jboss.webbeans.bean.ProducerMethod;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.InterceptorImpl;
+import org.jboss.webbeans.bean.builtin.AbstractBuiltInBean;
+import org.jboss.webbeans.bean.builtin.ExtensionBean;
+import org.jboss.webbeans.ejb.EjbDescriptors;
+import org.jboss.webbeans.event.ObserverMethodImpl;
+import org.jboss.webbeans.introspector.WBClass;
+import org.jboss.webbeans.introspector.WBMethod;
+import org.jboss.webbeans.resolution.ResolvableFactory;
+import org.jboss.webbeans.resolution.TypeSafeDisposerResolver;
+
+public class BeanDeployerEnvironment
+{
+
+ private final Map<WBClass<?>, AbstractClassBean<?>> classBeanMap;
+ private final Map<WBMethod<?, ?>, ProducerMethod<?, ?>> producerMethodBeanMap;
+ private final Set<RIBean<?>> beans;
+ private final Set<ObserverMethodImpl<?, ?>> observers;
+ private final List<DisposalMethod<?, ?>> allDisposalBeans;
+ private final Set<DisposalMethod<?, ?>> resolvedDisposalBeans;
+ private final Set<DecoratorImpl<?>> decorators;
+ private final Set<InterceptorImpl<?>> interceptors;
+ private final EjbDescriptors ejbDescriptors;
+ private final TypeSafeDisposerResolver disposalMethodResolver;
+
+ public BeanDeployerEnvironment(EjbDescriptors ejbDescriptors, BeanManagerImpl manager)
+ {
+ this.classBeanMap = new HashMap<WBClass<?>, AbstractClassBean<?>>();
+ this.producerMethodBeanMap = new HashMap<WBMethod<?, ?>, ProducerMethod<?, ?>>();
+ this.allDisposalBeans = new ArrayList<DisposalMethod<?, ?>>();
+ this.resolvedDisposalBeans = new HashSet<DisposalMethod<?, ?>>();
+ this.beans = new HashSet<RIBean<?>>();
+ this.decorators = new HashSet<DecoratorImpl<?>>();
+ this.interceptors = new HashSet<InterceptorImpl<?>>();
+ this.observers = new HashSet<ObserverMethodImpl<?, ?>>();
+ this.ejbDescriptors = ejbDescriptors;
+ this.disposalMethodResolver = new TypeSafeDisposerResolver(manager, allDisposalBeans);
+ }
+
+ public <X, T> ProducerMethod<X, T> getProducerMethod(WBMethod<X, T> method)
+ {
+ if (!producerMethodBeanMap.containsKey(method))
+ {
+ return null;
+ }
+ else
+ {
+ ProducerMethod<?, ?> bean = producerMethodBeanMap.get(method);
+ bean.initialize(this);
+ return (ProducerMethod<X, T>) bean;
+ }
+ }
+
+ public AbstractClassBean<?> getClassBean(WBClass<?> clazz)
+ {
+ if (!classBeanMap.containsKey(clazz))
+ {
+ return null;
+ }
+ else
+ {
+ AbstractClassBean<?> bean = classBeanMap.get(clazz);
+ bean.initialize(this);
+ return bean;
+ }
+ }
+
+ public void addBean(ProducerMethod<?, ?> bean)
+ {
+ producerMethodBeanMap.put(bean.getAnnotatedItem(), bean);
+ beans.add(bean);
+ }
+
+ public void addBean(ProducerField<?, ?> bean)
+ {
+ beans.add(bean);
+ }
+
+ public void addBean(ExtensionBean bean)
+ {
+ beans.add(bean);
+ }
+
+ public void addBean(AbstractBuiltInBean<?> bean)
+ {
+ beans.add(bean);
+ }
+
+ public void addBean(AbstractClassBean<?> bean)
+ {
+ if (!(bean instanceof NewBean))
+ {
+ classBeanMap.put(bean.getAnnotatedItem(), bean);
+ }
+ beans.add(bean);
+ }
+
+ public void addBean(DecoratorImpl<?> bean)
+ {
+ decorators.add(bean);
+ }
+
+ public void addBean(InterceptorImpl<?> bean)
+ {
+ interceptors.add(bean);
+ }
+
+ public void addBean(DisposalMethod<?, ?> bean)
+ {
+ allDisposalBeans.add(bean);
+ }
+
+ public void addObserver(ObserverMethodImpl<?, ?> observer)
+ {
+ this.observers.add(observer);
+ }
+
+ public Set<? extends RIBean<?>> getBeans()
+ {
+ return Collections.unmodifiableSet(beans);
+ }
+
+ public Set<DecoratorImpl<?>> getDecorators()
+ {
+ return Collections.unmodifiableSet(decorators);
+ }
+
+ public Set<InterceptorImpl<?>> getInterceptors()
+ {
+ return Collections.unmodifiableSet(interceptors);
+ }
+
+ public Set<ObserverMethodImpl<?, ?>> getObservers()
+ {
+ return Collections.unmodifiableSet(observers);
+ }
+
+
+ public Set<DisposalMethod<?, ?>> getUnresolvedDisposalBeans()
+ {
+ Set<DisposalMethod<?, ?>> beans = new HashSet<DisposalMethod<?, ?>>(allDisposalBeans);
+ beans.removeAll(resolvedDisposalBeans);
+ return Collections.unmodifiableSet(beans);
+ }
+
+ public EjbDescriptors getEjbDescriptors()
+ {
+ return ejbDescriptors;
+ }
+
+ /**
+ * Resolve the disposal method for the given producer method. Any resolved
+ * beans will be marked as such for the purpose of validating that all
+ * disposal methods are used. For internal use.
+ *
+ * @param apiType The API type to match
+ * @param bindings The binding types to match
+ * @return The set of matching disposal methods
+ */
+ public <X> Set<DisposalMethod<X, ?>> resolveDisposalBeans(Set<Type> types, Set<Annotation> bindings, AbstractClassBean<X> declaringBean)
+ {
+ Set<DisposalMethod<X, ?>> beans = (Set) disposalMethodResolver.resolve(ResolvableFactory.of(types, bindings, declaringBean));
+ resolvedDisposalBeans.addAll(beans);
+ return Collections.unmodifiableSet(beans);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployerEnvironment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AbstractBeanDiscoveryEvent.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AbstractContainerEvent.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AfterBeanDiscoveryImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/AfterDeploymentValidationImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/BeforeBeanDiscoveryImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/BeforeShutdownImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/ProcessAnnotatedTypeImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/ProcessObserverMethodImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/events/ProcessProducerImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,111 +1,111 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import java.lang.annotation.Annotation;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.jboss.webbeans.context.api.BeanStore;
-
-/**
- * The Application context
- *
- * @author Nicklas Karlsson
- *
- * @see org.jboss.webbeans.context.AbstractApplicationContext
- */
-public abstract class AbstractApplicationContext extends AbstractMapContext
-{
-
- // The beans
- private BeanStore beanStore;
- // Is the context active?
- private final AtomicBoolean active;
-
- /**
- * Constructor
- */
- public AbstractApplicationContext(Class<? extends Annotation> scope)
- {
- super(scope);
- this.active = new AtomicBoolean(false);
- }
-
- /**
- * Gets the bean store
- *
- * @return The bean store
- */
- @Override
- public BeanStore getBeanStore()
- {
- return this.beanStore;
- }
-
- /**
- * Sets the bean store
- *
- * @param applicationBeanStore The bean store
- */
- public void setBeanStore(BeanStore applicationBeanStore)
- {
- this.beanStore = applicationBeanStore;
- }
-
- /**
- * Indicates if the context is active
- *
- * @return True if active, false otherwise
- */
- @Override
- public boolean isActive()
- {
- return active.get();
- }
-
- /**
- * Sets the active state of the context
- *
- * @param active The new state
- */
- @Override
- public void setActive(boolean active)
- {
- this.active.set(active);
- }
-
- @Override
- public String toString()
- {
- String active = isActive() ? "Active " : "Inactive ";
- String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
- return active + "application context " + beanStoreInfo;
- }
-
- @Override
- protected boolean isCreationLockRequired()
- {
- return true;
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import java.lang.annotation.Annotation;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.jboss.webbeans.context.api.BeanStore;
+
+/**
+ * The Application context
+ *
+ * @author Nicklas Karlsson
+ *
+ * @see org.jboss.webbeans.context.AbstractApplicationContext
+ */
+public abstract class AbstractApplicationContext extends AbstractMapContext
+{
+
+ // The beans
+ private BeanStore beanStore;
+ // Is the context active?
+ private final AtomicBoolean active;
+
+ /**
+ * Constructor
+ */
+ public AbstractApplicationContext(Class<? extends Annotation> scope)
+ {
+ super(scope);
+ this.active = new AtomicBoolean(false);
+ }
+
+ /**
+ * Gets the bean store
+ *
+ * @return The bean store
+ */
+ @Override
+ public BeanStore getBeanStore()
+ {
+ return this.beanStore;
+ }
+
+ /**
+ * Sets the bean store
+ *
+ * @param applicationBeanStore The bean store
+ */
+ public void setBeanStore(BeanStore applicationBeanStore)
+ {
+ this.beanStore = applicationBeanStore;
+ }
+
+ /**
+ * Indicates if the context is active
+ *
+ * @return True if active, false otherwise
+ */
+ @Override
+ public boolean isActive()
+ {
+ return active.get();
+ }
+
+ /**
+ * Sets the active state of the context
+ *
+ * @param active The new state
+ */
+ @Override
+ public void setActive(boolean active)
+ {
+ this.active.set(active);
+ }
+
+ @Override
+ public String toString()
+ {
+ String active = isActive() ? "Active " : "Inactive ";
+ String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
+ return active + "application context " + beanStoreInfo;
+ }
+
+ @Override
+ protected boolean isCreationLockRequired()
+ {
+ return true;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,94 +1,94 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import java.lang.annotation.Annotation;
-
-import javax.enterprise.context.spi.Context;
-
-/**
- * Common Context operation
- *
- * @author Nicklas Karlsson
- * @author Pete Muir
- *
- */
-public abstract class AbstractContext implements Context
-{
- // The scope type
- private Class<? extends Annotation> scopeType;
- // The active state of the context
- private ThreadLocal<Boolean> active;
-
- /**
- * Constructor
- *
- * @param scopeType The scope type
- */
- public AbstractContext(Class<? extends Annotation> scopeType)
- {
- this.scopeType = scopeType;
- this.active = new ThreadLocal<Boolean>()
- {
- @Override
- protected Boolean initialValue()
- {
- return Boolean.FALSE;
- }
- };
- }
-
- /**
- * Get the scope the context is for
- *
- * @return The scope type
- *
- * @see javax.enterprise.context.spi.Context#getScope()
- */
- public Class<? extends Annotation> getScope()
- {
- return scopeType;
- }
-
- /**
- * Return true if the context is active
- *
- * @return The active state
- *
- * @see javax.enterprise.context.spi.Context#isActive()
- */
- public boolean isActive()
- {
- return active.get().booleanValue();
- }
-
- /**
- * Set the context active, internal API for WBRI
- *
- * @param active The new state
- */
- public void setActive(boolean active)
- {
- this.active.set(Boolean.valueOf(active));
- }
-
- public void cleanup()
- {
- this.active.remove();
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import java.lang.annotation.Annotation;
+
+import javax.enterprise.context.spi.Context;
+
+/**
+ * Common Context operation
+ *
+ * @author Nicklas Karlsson
+ * @author Pete Muir
+ *
+ */
+public abstract class AbstractContext implements Context
+{
+ // The scope type
+ private Class<? extends Annotation> scopeType;
+ // The active state of the context
+ private ThreadLocal<Boolean> active;
+
+ /**
+ * Constructor
+ *
+ * @param scopeType The scope type
+ */
+ public AbstractContext(Class<? extends Annotation> scopeType)
+ {
+ this.scopeType = scopeType;
+ this.active = new ThreadLocal<Boolean>()
+ {
+ @Override
+ protected Boolean initialValue()
+ {
+ return Boolean.FALSE;
+ }
+ };
+ }
+
+ /**
+ * Get the scope the context is for
+ *
+ * @return The scope type
+ *
+ * @see javax.enterprise.context.spi.Context#getScope()
+ */
+ public Class<? extends Annotation> getScope()
+ {
+ return scopeType;
+ }
+
+ /**
+ * Return true if the context is active
+ *
+ * @return The active state
+ *
+ * @see javax.enterprise.context.spi.Context#isActive()
+ */
+ public boolean isActive()
+ {
+ return active.get().booleanValue();
+ }
+
+ /**
+ * Set the context active, internal API for WBRI
+ *
+ * @param active The new state
+ */
+ public void setActive(boolean active)
+ {
+ this.active.set(Boolean.valueOf(active));
+ }
+
+ public void cleanup()
+ {
+ this.active.remove();
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractThreadLocalMapContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractThreadLocalMapContext.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractThreadLocalMapContext.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,72 +1,72 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import java.lang.annotation.Annotation;
-
-import org.jboss.webbeans.context.api.BeanStore;
-
-/**
- * Abstract base class for representing contexts with thread local bean storage
- *
- * @author Pete Muir
- */
-public abstract class AbstractThreadLocalMapContext extends AbstractMapContext
-{
- private final ThreadLocal<BeanStore> beanStore;
-
- public AbstractThreadLocalMapContext(Class<? extends Annotation> scopeType)
- {
- super(scopeType);
- this.beanStore = new ThreadLocal<BeanStore>();
- }
-
- /**
- * Gets the bean store
- *
- * @returns The bean store
- */
- @Override
- public BeanStore getBeanStore()
- {
- return beanStore.get();
- }
-
- /**
- * Sets the bean store
- *
- * @param beanStore The bean store
- */
- public void setBeanStore(BeanStore beanStore)
- {
- this.beanStore.set(beanStore);
- }
-
- @Override
- protected boolean isCreationLockRequired()
- {
- return true;
- }
-
- @Override
- public void cleanup()
- {
- super.cleanup();
- beanStore.remove();
- }
-
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import java.lang.annotation.Annotation;
+
+import org.jboss.webbeans.context.api.BeanStore;
+
+/**
+ * Abstract base class for representing contexts with thread local bean storage
+ *
+ * @author Pete Muir
+ */
+public abstract class AbstractThreadLocalMapContext extends AbstractMapContext
+{
+ private final ThreadLocal<BeanStore> beanStore;
+
+ public AbstractThreadLocalMapContext(Class<? extends Annotation> scopeType)
+ {
+ super(scopeType);
+ this.beanStore = new ThreadLocal<BeanStore>();
+ }
+
+ /**
+ * Gets the bean store
+ *
+ * @returns The bean store
+ */
+ @Override
+ public BeanStore getBeanStore()
+ {
+ return beanStore.get();
+ }
+
+ /**
+ * Sets the bean store
+ *
+ * @param beanStore The bean store
+ */
+ public void setBeanStore(BeanStore beanStore)
+ {
+ this.beanStore.set(beanStore);
+ }
+
+ @Override
+ protected boolean isCreationLockRequired()
+ {
+ return true;
+ }
+
+ @Override
+ public void cleanup()
+ {
+ super.cleanup();
+ beanStore.remove();
+ }
+
}
\ No newline at end of file
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractThreadLocalMapContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ContextLifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ConversationContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ConversationContext.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ConversationContext.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,56 +1,56 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import javax.enterprise.context.ConversationScoped;
-
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * The conversation context
- *
- * @author Nicklas Karlsson
- */
-public class ConversationContext extends AbstractThreadLocalMapContext
-{
- private static LogProvider log = Logging.getLogProvider(ConversationContext.class);
-
- /**
- * Constructor
- */
- public ConversationContext()
- {
- super(ConversationScoped.class);
- log.trace("Created conversation context");
- }
-
- @Override
- public String toString()
- {
- String active = isActive() ? "Active " : "Inactive ";
- String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
- return active + "conversation context " + beanStoreInfo;
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import javax.enterprise.context.ConversationScoped;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * The conversation context
+ *
+ * @author Nicklas Karlsson
+ */
+public class ConversationContext extends AbstractThreadLocalMapContext
+{
+ private static LogProvider log = Logging.getLogProvider(ConversationContext.class);
+
+ /**
+ * Constructor
+ */
+ public ConversationContext()
+ {
+ super(ConversationScoped.class);
+ log.trace("Created conversation context");
+ }
+
+ @Override
+ public String toString()
+ {
+ String active = isActive() ? "Active " : "Inactive ";
+ String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
+ return active + "conversation context " + beanStoreInfo;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ConversationContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,83 +1,83 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-
-public class CreationalContextImpl<T> implements CreationalContext<T>, WBCreationalContext<T>, Serializable
-{
-
- private static final long serialVersionUID = 7375854583908262422L;
-
- // Only needed for creation, by the time it's serialized we don't need it
- private final transient Map<Contextual<?>, Object> incompleteInstances;
- private final transient Contextual<T> contextual;
-
- private final DependentInstancesStore dependentInstancesStore;
-
- private final DependentInstancesStore parentDependentInstancesStore;
-
- public CreationalContextImpl(Contextual<T> contextual)
- {
- this(contextual, new HashMap<Contextual<?>, Object>(), new DependentInstancesStore());
- }
-
- private CreationalContextImpl(Contextual<T> contextual, Map<Contextual<?>, Object> incompleteInstances, DependentInstancesStore parentDependentInstancesStore)
- {
- this.incompleteInstances = incompleteInstances;
- this.contextual = contextual;
- this.dependentInstancesStore = new DependentInstancesStore();
- this.parentDependentInstancesStore = parentDependentInstancesStore;
- }
-
- public void push(T incompleteInstance)
- {
- incompleteInstances.put(contextual, incompleteInstance);
- }
-
- public <S> WBCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
- {
- return new CreationalContextImpl<S>(Contextual, new HashMap<Contextual<?>, Object>(incompleteInstances), dependentInstancesStore);
- }
-
- public <S> S getIncompleteInstance(Contextual<S> bean)
- {
- return (S) incompleteInstances.get(bean);
- }
-
- public boolean containsIncompleteInstance(Contextual<?> bean)
- {
- return incompleteInstances.containsKey(bean);
- }
-
- public DependentInstancesStore getParentDependentInstancesStore()
- {
- return parentDependentInstancesStore;
- }
-
- public void release()
- {
- dependentInstancesStore.destroyDependentInstances();
- incompleteInstances.clear();
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+
+public class CreationalContextImpl<T> implements CreationalContext<T>, WBCreationalContext<T>, Serializable
+{
+
+ private static final long serialVersionUID = 7375854583908262422L;
+
+ // Only needed for creation, by the time it's serialized we don't need it
+ private final transient Map<Contextual<?>, Object> incompleteInstances;
+ private final transient Contextual<T> contextual;
+
+ private final DependentInstancesStore dependentInstancesStore;
+
+ private final DependentInstancesStore parentDependentInstancesStore;
+
+ public CreationalContextImpl(Contextual<T> contextual)
+ {
+ this(contextual, new HashMap<Contextual<?>, Object>(), new DependentInstancesStore());
+ }
+
+ private CreationalContextImpl(Contextual<T> contextual, Map<Contextual<?>, Object> incompleteInstances, DependentInstancesStore parentDependentInstancesStore)
+ {
+ this.incompleteInstances = incompleteInstances;
+ this.contextual = contextual;
+ this.dependentInstancesStore = new DependentInstancesStore();
+ this.parentDependentInstancesStore = parentDependentInstancesStore;
+ }
+
+ public void push(T incompleteInstance)
+ {
+ incompleteInstances.put(contextual, incompleteInstance);
+ }
+
+ public <S> WBCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
+ {
+ return new CreationalContextImpl<S>(Contextual, new HashMap<Contextual<?>, Object>(incompleteInstances), dependentInstancesStore);
+ }
+
+ public <S> S getIncompleteInstance(Contextual<S> bean)
+ {
+ return (S) incompleteInstances.get(bean);
+ }
+
+ public boolean containsIncompleteInstance(Contextual<?> bean)
+ {
+ return incompleteInstances.containsKey(bean);
+ }
+
+ public DependentInstancesStore getParentDependentInstancesStore()
+ {
+ return parentDependentInstancesStore;
+ }
+
+ public void release()
+ {
+ dependentInstancesStore.destroyDependentInstances();
+ incompleteInstances.clear();
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,87 +1,87 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.jboss.webbeans.context.api.ContextualInstance;
-import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * A store for dependent instances created under a given key
- *
- * @author Nicklas Karlsson
- */
-public class DependentInstancesStore implements Serializable
-{
- private static final long serialVersionUID = -2349574791148336833L;
-
- private static Log log = Logging.getLog(DependentInstancesStore.class);
-
- // A object -> List of contextual instances mapping
- private List<ContextualInstance<?>> dependentInstances;
-
- /**
- * Creates a new DependentInstancesStore
- */
- public DependentInstancesStore()
- {
- dependentInstances = Collections.synchronizedList(new ArrayList<ContextualInstance<?>>());
- }
-
- /**
- * Adds a dependent instance under a given key
- *
- * @param key The key to store the instance under
- * @param contextualInstance The instance to store
- */
- public <T> void addDependentInstance(ContextualInstance<T> contextualInstance)
- {
- log.trace("Registered dependent instance #0", 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);
- }
- }
-
- private static <T> void destroy(ContextualInstance<T> beanInstance)
- {
- beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
- }
-
- @Override
- public String toString()
- {
- return "Dependent Instances: " + dependentInstances;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.jboss.webbeans.context.api.ContextualInstance;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * A store for dependent instances created under a given key
+ *
+ * @author Nicklas Karlsson
+ */
+public class DependentInstancesStore implements Serializable
+{
+ private static final long serialVersionUID = -2349574791148336833L;
+
+ private static Log log = Logging.getLog(DependentInstancesStore.class);
+
+ // A object -> List of contextual instances mapping
+ private List<ContextualInstance<?>> dependentInstances;
+
+ /**
+ * Creates a new DependentInstancesStore
+ */
+ public DependentInstancesStore()
+ {
+ dependentInstances = Collections.synchronizedList(new ArrayList<ContextualInstance<?>>());
+ }
+
+ /**
+ * Adds a dependent instance under a given key
+ *
+ * @param key The key to store the instance under
+ * @param contextualInstance The instance to store
+ */
+ public <T> void addDependentInstance(ContextualInstance<T> contextualInstance)
+ {
+ log.trace("Registered dependent instance #0", 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);
+ }
+ }
+
+ private static <T> void destroy(ContextualInstance<T> beanInstance)
+ {
+ beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Dependent Instances: " + dependentInstances;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ForwardingContextual.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ForwardingWBCreationalContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/RequestContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/RequestContext.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/RequestContext.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,57 +1,57 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import javax.enterprise.context.RequestScoped;
-
-/**
- * The request context
- *
- * @author Nicklas Karlsson
- */
-public class RequestContext extends AbstractThreadLocalMapContext
-{
-
- /**
- * Constructor
- */
- public RequestContext()
- {
- super(RequestScoped.class);
- }
-
- @Override
- public String toString()
- {
- String active = isActive() ? "Active " : "Inactive ";
- String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
- return active + "request context " + beanStoreInfo;
- }
-
- @Override
- protected boolean isCreationLockRequired()
- {
- return false;
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import javax.enterprise.context.RequestScoped;
+
+/**
+ * The request context
+ *
+ * @author Nicklas Karlsson
+ */
+public class RequestContext extends AbstractThreadLocalMapContext
+{
+
+ /**
+ * Constructor
+ */
+ public RequestContext()
+ {
+ super(RequestScoped.class);
+ }
+
+ @Override
+ public String toString()
+ {
+ String active = isActive() ? "Active " : "Inactive ";
+ String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
+ return active + "request context " + beanStoreInfo;
+ }
+
+ @Override
+ protected boolean isCreationLockRequired()
+ {
+ return false;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/RequestContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SerializableContextual.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SerializableContextualInstance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SessionContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SessionContext.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SessionContext.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,69 +1,69 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context;
-
-import javax.enterprise.context.SessionScoped;
-
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * The session context
- *
- * @author Nicklas Karlsson
- */
-public class SessionContext extends AbstractThreadLocalMapContext
-{
- private static LogProvider log = Logging.getLogProvider(SessionContext.class);
-
- /**
- * Constructor
- */
- public SessionContext()
- {
- super(SessionScoped.class);
- log.trace("Created session context");
- }
-
- @Override
- public String toString()
- {
- String active = isActive() ? "Active " : "Inactive ";
- String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
- return active + "session context " + beanStoreInfo;
- }
-
- @Override
- public void setActive(boolean active)
- {
- super.setActive(active);
- }
-
- @Override
- public void setBeanStore(BeanStore beanStore)
- {
- super.setBeanStore(beanStore);
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context;
+
+import javax.enterprise.context.SessionScoped;
+
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * The session context
+ *
+ * @author Nicklas Karlsson
+ */
+public class SessionContext extends AbstractThreadLocalMapContext
+{
+ private static LogProvider log = Logging.getLogProvider(SessionContext.class);
+
+ /**
+ * Constructor
+ */
+ public SessionContext()
+ {
+ super(SessionScoped.class);
+ log.trace("Created session context");
+ }
+
+ @Override
+ public String toString()
+ {
+ String active = isActive() ? "Active " : "Inactive ";
+ String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
+ return active + "session context " + beanStoreInfo;
+ }
+
+ @Override
+ public void setActive(boolean active)
+ {
+ super.setActive(active);
+ }
+
+ @Override
+ public void setBeanStore(BeanStore beanStore)
+ {
+ super.setBeanStore(beanStore);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SessionContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/WBCreationalContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/AbstractAttributeBackedBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/NamingScheme.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/NamingScheme.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/NamingScheme.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,55 +1,55 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.context.beanstore;
-
-
-
-/**
- * Simple prefix-based implementation of a BeanStore naming scheme
- *
- * @author Nicklas Karlsson
- */
-public class NamingScheme
-{
- public String prefix;
- public String delimeter;
-
- public NamingScheme(String prefix, String delimeter)
- {
- if (prefix.indexOf(delimeter) >= 0)
- {
- throw new IllegalArgumentException("The delimiter '" + delimeter + "' shouldn't be in the prefix '" + prefix + "'");
- }
- this.prefix = prefix;
- this.delimeter = delimeter;
- }
-
- public boolean acceptKey(String key)
- {
- return key.startsWith(prefix);
- }
-
- public String getId(String key)
- {
- return new StringBuilder().append(key.substring(prefix.length() + delimeter.length())).toString();
- }
-
- public String getKey(String id)
- {
- return new StringBuilder().append(prefix).append(delimeter).append(id).toString();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.context.beanstore;
+
+
+
+/**
+ * Simple prefix-based implementation of a BeanStore naming scheme
+ *
+ * @author Nicklas Karlsson
+ */
+public class NamingScheme
+{
+ public String prefix;
+ public String delimeter;
+
+ public NamingScheme(String prefix, String delimeter)
+ {
+ if (prefix.indexOf(delimeter) >= 0)
+ {
+ throw new IllegalArgumentException("The delimiter '" + delimeter + "' shouldn't be in the prefix '" + prefix + "'");
+ }
+ this.prefix = prefix;
+ this.delimeter = delimeter;
+ }
+
+ public boolean acceptKey(String key)
+ {
+ return key.startsWith(prefix);
+ }
+
+ public String getId(String key)
+ {
+ return new StringBuilder().append(key.substring(prefix.length() + delimeter.length())).toString();
+ }
+
+ public String getKey(String id)
+ {
+ return new StringBuilder().append(prefix).append(delimeter).append(id).toString();
+ }
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/NamingScheme.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/AbstractConversationManager.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/AbstractConversationManager.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/AbstractConversationManager.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,250 +1,250 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Future;
-
-import javax.enterprise.context.Conversation;
-import javax.enterprise.inject.Any;
-import javax.inject.Inject;
-
-import org.jboss.webbeans.Container;
-import org.jboss.webbeans.context.ContextLifecycle;
-import org.jboss.webbeans.context.ConversationContext;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * An abstract conversation manager
- *
- * @author Nicklas Karlsson
- *
- */
-public abstract class AbstractConversationManager implements ConversationManager
-{
- private static LogProvider log = Logging.getLogProvider(AbstractConversationManager.class);
-
- // The conversation terminator
- @Inject
- private ConversationTerminator conversationTerminator;
-
- // The current conversation
- @Inject @Any
- private ConversationImpl currentConversation;
-
- // The conversation timeout in milliseconds waiting for access to a blocked
- // conversation
- @ConversationConcurrentAccessTimeout
- private long concurrentAccessTimeout;
-
- // A map of current active long-running conversation entries
- private Map<String, ConversationEntry> longRunningConversations;
-
- /**
- * Creates a new conversation manager
- */
- public AbstractConversationManager()
- {
- log.trace("Created " + getClass());
- longRunningConversations = new ConcurrentHashMap<String, ConversationEntry>();
- }
-
- public void beginOrRestoreConversation(String cid)
- {
- if (cid == null)
- {
- // No incoming conversation ID, nothing to do here, continue with
- // a transient conversation
- log.trace("No conversation id to restore");
- return;
- }
- if (!longRunningConversations.containsKey(cid))
- {
- // 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);
- return;
- }
- ConversationEntry resumedConversationEntry = longRunningConversations.get(cid);
- // Try to get a lock to the requested conversation, log and return to
- // continue with a transient conversation if we fail
- try
- {
- if (!resumedConversationEntry.lock(concurrentAccessTimeout))
- {
- return;
- }
- }
- catch (InterruptedException e)
- {
- log.debug("Interrupted while trying to acquire lock");
- return;
- }
- // If we can't cancel the termination, release the lock, return and
- // continue
- // with a transient conversation
- if (!resumedConversationEntry.cancelTermination())
- {
- resumedConversationEntry.unlock();
- }
- else
- {
- // If all goes well, set the identity of the current conversation to
- // match the fetched long-running one
- String oldConversation = currentConversation.toString();
- currentConversation.switchTo(resumedConversationEntry.getConversation());
- log.trace("Conversation switched from " + oldConversation + " to " + currentConversation);
- }
- }
-
- // TODO: check that stuff gets terminated when you flip between several
- // long-running conversations
- public void cleanupConversation()
- {
- log.trace("Cleaning up conversation for " + currentConversation);
- String cid = currentConversation.getUnderlyingId();
- if (currentConversation.isLongRunning())
- {
- Future<?> terminationHandle = scheduleForTermination(cid, currentConversation.getTimeout());
- // When the conversation ends, a long-running conversation needs to
- // start its self-destruct. We can have the case where the conversation
- // is a previously known conversation (that had it's termination
- // canceled in the
- // beginConversation) or the case where we have a completely new
- // long-running conversation.
- ConversationEntry longRunningConversation = longRunningConversations.get(cid);
- if (longRunningConversation != null)
- {
- longRunningConversation.unlock();
- longRunningConversation.reScheduleTermination(terminationHandle);
- }
- else
- {
- 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");
- }
- 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);
- ConversationEntry longRunningConversation = longRunningConversations.remove(cid);
- if (longRunningConversation != null)
- {
- longRunningConversation.cancelTermination();
- longRunningConversation.unlock();
- }
- ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
- conversationContext.destroy();
- }
- // If the conversation has been switched from one long
- // running-conversation to another with
- // Conversation.begin(String), we need to unlock the original conversation
- // and re-schedule
- // it for termination
- String originalCid = currentConversation.getOriginalId();
- ConversationEntry longRunningConversation = originalCid == null ? null : longRunningConversations.get(originalCid);
- if (longRunningConversation != null)
- {
- longRunningConversation.unlock();
- longRunningConversation.reScheduleTermination(scheduleForTermination(originalCid, currentConversation.getTimeout()));
- }
- }
-
- /**
- * Creates a termination task for and schedules it
- *
- * @param cid The id of the conversation to terminate
- * @return The asynchronous job handle
- */
- private Future<?> scheduleForTermination(String cid, long timeout)
- {
- Runnable terminationTask = new TerminationTask(cid);
- return conversationTerminator.scheduleForTermination(terminationTask, timeout);
- }
-
- /**
- * A termination task that destroys the conversation entry
- *
- * @author Nicklas Karlsson
- *
- */
- private class TerminationTask implements Runnable
- {
- // The conversation ID to terminate
- private String cid;
-
- /**
- * Creates a new termination task
- *
- * @param cid The conversation ID
- */
- public TerminationTask(String cid)
- {
- this.cid = cid;
- }
-
- /**
- * Executes the termination
- */
- public void run()
- {
- log.debug("Conversation " + cid + " timed out. Destroying it");
- longRunningConversations.remove(cid).destroy();
- log.trace("There are now " + longRunningConversations.size() + " long-running conversations");
- }
- }
-
- public void destroyAllConversations()
- {
- log.debug("Destroying " + longRunningConversations.size() + " long-running conversations");
- for (ConversationEntry conversationEntry : longRunningConversations.values())
- {
- conversationEntry.destroy();
- }
- longRunningConversations.clear();
- }
-
- public Set<Conversation> getLongRunningConversations()
- {
- Set<Conversation> conversations = new HashSet<Conversation>();
- for (ConversationEntry conversationEntry : longRunningConversations.values())
- {
- conversations.add(conversationEntry.getConversation());
- }
- return Collections.unmodifiableSet(conversations);
- }
-
- public abstract BeanStore getBeanStore(String cid);
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Future;
+
+import javax.enterprise.context.Conversation;
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+
+import org.jboss.webbeans.Container;
+import org.jboss.webbeans.context.ContextLifecycle;
+import org.jboss.webbeans.context.ConversationContext;
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * An abstract conversation manager
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public abstract class AbstractConversationManager implements ConversationManager
+{
+ private static LogProvider log = Logging.getLogProvider(AbstractConversationManager.class);
+
+ // The conversation terminator
+ @Inject
+ private ConversationTerminator conversationTerminator;
+
+ // The current conversation
+ @Inject @Any
+ private ConversationImpl currentConversation;
+
+ // The conversation timeout in milliseconds waiting for access to a blocked
+ // conversation
+ @ConversationConcurrentAccessTimeout
+ private long concurrentAccessTimeout;
+
+ // A map of current active long-running conversation entries
+ private Map<String, ConversationEntry> longRunningConversations;
+
+ /**
+ * Creates a new conversation manager
+ */
+ public AbstractConversationManager()
+ {
+ log.trace("Created " + getClass());
+ longRunningConversations = new ConcurrentHashMap<String, ConversationEntry>();
+ }
+
+ public void beginOrRestoreConversation(String cid)
+ {
+ if (cid == null)
+ {
+ // No incoming conversation ID, nothing to do here, continue with
+ // a transient conversation
+ log.trace("No conversation id to restore");
+ return;
+ }
+ if (!longRunningConversations.containsKey(cid))
+ {
+ // 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);
+ return;
+ }
+ ConversationEntry resumedConversationEntry = longRunningConversations.get(cid);
+ // Try to get a lock to the requested conversation, log and return to
+ // continue with a transient conversation if we fail
+ try
+ {
+ if (!resumedConversationEntry.lock(concurrentAccessTimeout))
+ {
+ return;
+ }
+ }
+ catch (InterruptedException e)
+ {
+ log.debug("Interrupted while trying to acquire lock");
+ return;
+ }
+ // If we can't cancel the termination, release the lock, return and
+ // continue
+ // with a transient conversation
+ if (!resumedConversationEntry.cancelTermination())
+ {
+ resumedConversationEntry.unlock();
+ }
+ else
+ {
+ // If all goes well, set the identity of the current conversation to
+ // match the fetched long-running one
+ String oldConversation = currentConversation.toString();
+ currentConversation.switchTo(resumedConversationEntry.getConversation());
+ log.trace("Conversation switched from " + oldConversation + " to " + currentConversation);
+ }
+ }
+
+ // TODO: check that stuff gets terminated when you flip between several
+ // long-running conversations
+ public void cleanupConversation()
+ {
+ log.trace("Cleaning up conversation for " + currentConversation);
+ String cid = currentConversation.getUnderlyingId();
+ if (currentConversation.isLongRunning())
+ {
+ Future<?> terminationHandle = scheduleForTermination(cid, currentConversation.getTimeout());
+ // When the conversation ends, a long-running conversation needs to
+ // start its self-destruct. We can have the case where the conversation
+ // is a previously known conversation (that had it's termination
+ // canceled in the
+ // beginConversation) or the case where we have a completely new
+ // long-running conversation.
+ ConversationEntry longRunningConversation = longRunningConversations.get(cid);
+ if (longRunningConversation != null)
+ {
+ longRunningConversation.unlock();
+ longRunningConversation.reScheduleTermination(terminationHandle);
+ }
+ else
+ {
+ 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");
+ }
+ 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);
+ ConversationEntry longRunningConversation = longRunningConversations.remove(cid);
+ if (longRunningConversation != null)
+ {
+ longRunningConversation.cancelTermination();
+ longRunningConversation.unlock();
+ }
+ ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
+ conversationContext.destroy();
+ }
+ // If the conversation has been switched from one long
+ // running-conversation to another with
+ // Conversation.begin(String), we need to unlock the original conversation
+ // and re-schedule
+ // it for termination
+ String originalCid = currentConversation.getOriginalId();
+ ConversationEntry longRunningConversation = originalCid == null ? null : longRunningConversations.get(originalCid);
+ if (longRunningConversation != null)
+ {
+ longRunningConversation.unlock();
+ longRunningConversation.reScheduleTermination(scheduleForTermination(originalCid, currentConversation.getTimeout()));
+ }
+ }
+
+ /**
+ * Creates a termination task for and schedules it
+ *
+ * @param cid The id of the conversation to terminate
+ * @return The asynchronous job handle
+ */
+ private Future<?> scheduleForTermination(String cid, long timeout)
+ {
+ Runnable terminationTask = new TerminationTask(cid);
+ return conversationTerminator.scheduleForTermination(terminationTask, timeout);
+ }
+
+ /**
+ * A termination task that destroys the conversation entry
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+ private class TerminationTask implements Runnable
+ {
+ // The conversation ID to terminate
+ private String cid;
+
+ /**
+ * Creates a new termination task
+ *
+ * @param cid The conversation ID
+ */
+ public TerminationTask(String cid)
+ {
+ this.cid = cid;
+ }
+
+ /**
+ * Executes the termination
+ */
+ public void run()
+ {
+ log.debug("Conversation " + cid + " timed out. Destroying it");
+ longRunningConversations.remove(cid).destroy();
+ log.trace("There are now " + longRunningConversations.size() + " long-running conversations");
+ }
+ }
+
+ public void destroyAllConversations()
+ {
+ log.debug("Destroying " + longRunningConversations.size() + " long-running conversations");
+ for (ConversationEntry conversationEntry : longRunningConversations.values())
+ {
+ conversationEntry.destroy();
+ }
+ longRunningConversations.clear();
+ }
+
+ public Set<Conversation> getLongRunningConversations()
+ {
+ Set<Conversation> conversations = new HashSet<Conversation>();
+ for (ConversationEntry conversationEntry : longRunningConversations.values())
+ {
+ conversations.add(conversationEntry.getConversation());
+ }
+ return Collections.unmodifiableSet(conversations);
+ }
+
+ public abstract BeanStore getBeanStore(String cid);
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/AbstractConversationManager.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,172 +1,172 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.jboss.webbeans.context.ConversationContext;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * Represents a long-running conversation entry
- *
- * @author Nicklas Karlsson
- */
-public class ConversationEntry
-{
- private static LogProvider log = Logging.getLogProvider(ConversationEntry.class);
-
- // The conversation
- private ConversationImpl conversation;
- // The handle to the asynchronous timeout task
- private Future<?> terminationHandle;
- // The lock for concurrent access prevention
- private ReentrantLock concurrencyLock;
- // The Bean Store of the conversations
- private BeanStore beanStore;
-
- /**
- * Creates a new conversation entry
- *
- * @param cid The conversation ID
- * @param terminationHandle The timeout termination handle
- */
- protected ConversationEntry(BeanStore beanStore, ConversationImpl conversation, Future<?> terminationHandle)
- {
- this.beanStore = beanStore;
- // conversation is a proxy so we need to make a "real" instance
- this.conversation = new ConversationImpl(conversation);
- this.terminationHandle = terminationHandle;
- this.concurrencyLock = new ReentrantLock();
- log.trace("Created new conversation entry for conversation " + conversation);
- }
-
- /**
- * Factory method
- *
- * @param cid The conversation ID
- * @param terminationHandle The timeout termination handle
- * @return A new conversation entry
- */
- public static ConversationEntry of(BeanStore beanStore, ConversationImpl conversation, Future<?> terminationHandle)
- {
- return new ConversationEntry(beanStore, conversation, terminationHandle);
- }
-
- /**
- * Cancels the timeout termination
- *
- * @return True if successful, false otherwise
- */
- public boolean cancelTermination()
- {
- if (terminationHandle.isCancelled())
- {
- return true;
- }
- boolean success = terminationHandle.cancel(false);
- if (success)
- {
- log.trace("Termination of conversation " + conversation + " cancelled");
- }
- else
- {
- log.warn("Failed to cancel termination of conversation " + conversation);
- }
- return success;
- }
-
- /**
- * Destroys the conversation and it's associated conversational context
- */
- public void destroy()
- {
- log.debug("Destroying conversation " + conversation);
- if (!terminationHandle.isCancelled())
- {
- cancelTermination();
- }
- ConversationContext terminationContext = new ConversationContext();
- terminationContext.setBeanStore(beanStore);
- terminationContext.destroy();
- log.trace("Conversation " + conversation + " destroyed");
- }
-
- /**
- * Attempts to lock the conversation for exclusive usage
- *
- * @param timeout The time in milliseconds to wait on the lock
- * @return True if lock was successful, false otherwise
- * @throws InterruptedException If the lock operation was unsuccessful
- */
- public boolean lock(long timeout) throws InterruptedException
- {
- boolean success = concurrencyLock.tryLock(timeout, TimeUnit.MILLISECONDS);
- if (success)
- {
- log.trace("Conversation " + conversation + " locked");
- }
- else
- {
- log.warn("Failed to lock conversation " + conversation + " in " + timeout + "ms");
- }
- return success;
- }
-
- /**
- * Attempts to unlock the conversation
- *
- * @return true if the unlock was successful, false otherwise
- */
- public boolean unlock()
- {
- if (!concurrencyLock.isLocked())
- {
- return true;
- }
- if (concurrencyLock.isHeldByCurrentThread())
- {
- concurrencyLock.unlock();
- log.trace("Unlocked conversation " + conversation);
- }
- else
- {
- log.warn("Unlock attempt by non-owner on conversation " + conversation);
- }
- return !concurrencyLock.isLocked();
- }
-
- /**
- * Re-schedules timeout termination
- *
- * @param terminationHandle The fresh timeout termination handle
- */
- public void reScheduleTermination(Future<?> terminationHandle)
- {
- this.terminationHandle = terminationHandle;
- log.trace("Conversation " + conversation + " re-scheduled for termination");
- }
-
- public ConversationImpl getConversation()
- {
- return conversation;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.jboss.webbeans.context.ConversationContext;
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * Represents a long-running conversation entry
+ *
+ * @author Nicklas Karlsson
+ */
+public class ConversationEntry
+{
+ private static LogProvider log = Logging.getLogProvider(ConversationEntry.class);
+
+ // The conversation
+ private ConversationImpl conversation;
+ // The handle to the asynchronous timeout task
+ private Future<?> terminationHandle;
+ // The lock for concurrent access prevention
+ private ReentrantLock concurrencyLock;
+ // The Bean Store of the conversations
+ private BeanStore beanStore;
+
+ /**
+ * Creates a new conversation entry
+ *
+ * @param cid The conversation ID
+ * @param terminationHandle The timeout termination handle
+ */
+ protected ConversationEntry(BeanStore beanStore, ConversationImpl conversation, Future<?> terminationHandle)
+ {
+ this.beanStore = beanStore;
+ // conversation is a proxy so we need to make a "real" instance
+ this.conversation = new ConversationImpl(conversation);
+ this.terminationHandle = terminationHandle;
+ this.concurrencyLock = new ReentrantLock();
+ log.trace("Created new conversation entry for conversation " + conversation);
+ }
+
+ /**
+ * Factory method
+ *
+ * @param cid The conversation ID
+ * @param terminationHandle The timeout termination handle
+ * @return A new conversation entry
+ */
+ public static ConversationEntry of(BeanStore beanStore, ConversationImpl conversation, Future<?> terminationHandle)
+ {
+ return new ConversationEntry(beanStore, conversation, terminationHandle);
+ }
+
+ /**
+ * Cancels the timeout termination
+ *
+ * @return True if successful, false otherwise
+ */
+ public boolean cancelTermination()
+ {
+ if (terminationHandle.isCancelled())
+ {
+ return true;
+ }
+ boolean success = terminationHandle.cancel(false);
+ if (success)
+ {
+ log.trace("Termination of conversation " + conversation + " cancelled");
+ }
+ else
+ {
+ log.warn("Failed to cancel termination of conversation " + conversation);
+ }
+ return success;
+ }
+
+ /**
+ * Destroys the conversation and it's associated conversational context
+ */
+ public void destroy()
+ {
+ log.debug("Destroying conversation " + conversation);
+ if (!terminationHandle.isCancelled())
+ {
+ cancelTermination();
+ }
+ ConversationContext terminationContext = new ConversationContext();
+ terminationContext.setBeanStore(beanStore);
+ terminationContext.destroy();
+ log.trace("Conversation " + conversation + " destroyed");
+ }
+
+ /**
+ * Attempts to lock the conversation for exclusive usage
+ *
+ * @param timeout The time in milliseconds to wait on the lock
+ * @return True if lock was successful, false otherwise
+ * @throws InterruptedException If the lock operation was unsuccessful
+ */
+ public boolean lock(long timeout) throws InterruptedException
+ {
+ boolean success = concurrencyLock.tryLock(timeout, TimeUnit.MILLISECONDS);
+ if (success)
+ {
+ log.trace("Conversation " + conversation + " locked");
+ }
+ else
+ {
+ log.warn("Failed to lock conversation " + conversation + " in " + timeout + "ms");
+ }
+ return success;
+ }
+
+ /**
+ * Attempts to unlock the conversation
+ *
+ * @return true if the unlock was successful, false otherwise
+ */
+ public boolean unlock()
+ {
+ if (!concurrencyLock.isLocked())
+ {
+ return true;
+ }
+ if (concurrencyLock.isHeldByCurrentThread())
+ {
+ concurrencyLock.unlock();
+ log.trace("Unlocked conversation " + conversation);
+ }
+ else
+ {
+ log.warn("Unlock attempt by non-owner on conversation " + conversation);
+ }
+ return !concurrencyLock.isLocked();
+ }
+
+ /**
+ * Re-schedules timeout termination
+ *
+ * @param terminationHandle The fresh timeout termination handle
+ */
+ public void reScheduleTermination(Future<?> terminationHandle)
+ {
+ this.terminationHandle = terminationHandle;
+ log.trace("Conversation " + conversation + " re-scheduled for termination");
+ }
+
+ public ConversationImpl getConversation()
+ {
+ return conversation;
+ }
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,225 +1,225 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.Conversation;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * The current conversation implementation
- *
- * @author Nicklas Karlsson
- * @see javax.enterprise.context.Conversation
- */
-@RequestScoped
-@Named("javax.enterprise.context.conversation")
-@Default
-public class ConversationImpl implements Conversation, Serializable
-{
-
- /**
- * Eclipse generated UID.
- */
- private static final long serialVersionUID = 5262382965141841363L;
-
- private static LogProvider log = Logging.getLogProvider(ConversationImpl.class);
-
- // The conversation ID
- private String id;
- // The original conversation ID (if any)
- private String originalId;
- // Is the conversation long-running?
- private boolean longRunning;
- // The timeout in milliseconds
- private long timeout;
-
- /**
- * Creates a new conversation
- */
- public ConversationImpl()
- {
- }
-
- /**
- * Creates a new conversation from an existing one.
- *
- * @param conversation The old conversation
- */
- public ConversationImpl(ConversationImpl conversation)
- {
- this.id = conversation.getUnderlyingId();
- this.longRunning = conversation.isLongRunning();
- this.timeout = conversation.getTimeout();
- }
-
- /**
- * Initializes a new conversation
- *
- * @param conversationIdGenerator The conversation ID generator
- * @param timeout The conversation inactivity timeout
- */
- @Inject
- public void init(ConversationIdGenerator conversationIdGenerator, @ConversationInactivityTimeout long timeout)
- {
- this.id = conversationIdGenerator.nextId();
- this.timeout = timeout;
- this.longRunning = false;
- log.debug("Created a new conversation " + this);
- }
-
- public void begin()
- {
- if (isLongRunning())
- {
- throw new IllegalStateException("Attempt to call begin() on a long-running conversation");
- }
- log.debug("Promoted conversation " + id + " to long-running");
- longRunning = true;
- }
-
- public void begin(String id)
- {
- // Store away the (first) change to the conversation ID. If the original
- // conversation was long-running,
- // we might have to place it back for termination once the request is
- // over.
- if (originalId == null)
- {
- originalId = id;
- }
- this.id = id;
- begin();
- }
-
- public void end()
- {
- if (!isLongRunning())
- {
- throw new IllegalStateException("Attempt to call end() on a transient conversation");
- }
- log.debug("Demoted conversation " + id + " to transient");
- this.longRunning = false;
- }
-
- public String getId()
- {
- if (isLongRunning())
- {
- return id;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Get the Conversation Id, regardless of whether the conversation is long
- * running or transient, needed for internal operations
- *
- * @return the id
- */
- public String getUnderlyingId()
- {
- return id;
- }
-
- public long getTimeout()
- {
- return timeout;
- }
-
- public boolean isLongRunning()
- {
- return longRunning;
- }
-
- public void setTimeout(long timeout)
- {
- this.timeout = timeout;
- }
-
- /**
- * Assumes the identity of another conversation
- *
- * @param conversation The new conversation
- *
- */
- public void switchTo(ConversationImpl conversation)
- {
- log.debug("Switched conversation from " + this);
- id = conversation.getUnderlyingId();
- longRunning = conversation.isLongRunning();
- timeout = conversation.getTimeout();
- log.debug(" to " + this);
- }
-
- @Override
- public String toString()
- {
- return "ID: " + id + ", long-running: " + longRunning + ", timeout: " + timeout + "ms";
- }
-
- public void setLongRunning(boolean longRunning)
- {
- log.debug("Set conversation " + id + " to long-running: " + longRunning);
- this.longRunning = longRunning;
- }
-
- /**
- * Gets the original ID of the conversation
- *
- * @return The id
- */
- public String getOriginalId()
- {
- return originalId;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (obj instanceof ConversationImpl)
- {
- ConversationImpl that = (ConversationImpl) obj;
- return (id == null || that.getUnderlyingId() == null) ? false : id.equals(that.getUnderlyingId());
- }
- else
- {
- return false;
- }
- }
-
- @Override
- public int hashCode()
- {
- return id == null ? super.hashCode() : id.hashCode();
- }
-
- public boolean isTransient()
- {
- return !isLongRunning();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.Conversation;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * The current conversation implementation
+ *
+ * @author Nicklas Karlsson
+ * @see javax.enterprise.context.Conversation
+ */
+@RequestScoped
+@Named("javax.enterprise.context.conversation")
+@Default
+public class ConversationImpl implements Conversation, Serializable
+{
+
+ /**
+ * Eclipse generated UID.
+ */
+ private static final long serialVersionUID = 5262382965141841363L;
+
+ private static LogProvider log = Logging.getLogProvider(ConversationImpl.class);
+
+ // The conversation ID
+ private String id;
+ // The original conversation ID (if any)
+ private String originalId;
+ // Is the conversation long-running?
+ private boolean longRunning;
+ // The timeout in milliseconds
+ private long timeout;
+
+ /**
+ * Creates a new conversation
+ */
+ public ConversationImpl()
+ {
+ }
+
+ /**
+ * Creates a new conversation from an existing one.
+ *
+ * @param conversation The old conversation
+ */
+ public ConversationImpl(ConversationImpl conversation)
+ {
+ this.id = conversation.getUnderlyingId();
+ this.longRunning = conversation.isLongRunning();
+ this.timeout = conversation.getTimeout();
+ }
+
+ /**
+ * Initializes a new conversation
+ *
+ * @param conversationIdGenerator The conversation ID generator
+ * @param timeout The conversation inactivity timeout
+ */
+ @Inject
+ public void init(ConversationIdGenerator conversationIdGenerator, @ConversationInactivityTimeout long timeout)
+ {
+ this.id = conversationIdGenerator.nextId();
+ this.timeout = timeout;
+ this.longRunning = false;
+ log.debug("Created a new conversation " + this);
+ }
+
+ public void begin()
+ {
+ if (isLongRunning())
+ {
+ throw new IllegalStateException("Attempt to call begin() on a long-running conversation");
+ }
+ log.debug("Promoted conversation " + id + " to long-running");
+ longRunning = true;
+ }
+
+ public void begin(String id)
+ {
+ // Store away the (first) change to the conversation ID. If the original
+ // conversation was long-running,
+ // we might have to place it back for termination once the request is
+ // over.
+ if (originalId == null)
+ {
+ originalId = id;
+ }
+ this.id = id;
+ begin();
+ }
+
+ public void end()
+ {
+ if (!isLongRunning())
+ {
+ throw new IllegalStateException("Attempt to call end() on a transient conversation");
+ }
+ log.debug("Demoted conversation " + id + " to transient");
+ this.longRunning = false;
+ }
+
+ public String getId()
+ {
+ if (isLongRunning())
+ {
+ return id;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Get the Conversation Id, regardless of whether the conversation is long
+ * running or transient, needed for internal operations
+ *
+ * @return the id
+ */
+ public String getUnderlyingId()
+ {
+ return id;
+ }
+
+ public long getTimeout()
+ {
+ return timeout;
+ }
+
+ public boolean isLongRunning()
+ {
+ return longRunning;
+ }
+
+ public void setTimeout(long timeout)
+ {
+ this.timeout = timeout;
+ }
+
+ /**
+ * Assumes the identity of another conversation
+ *
+ * @param conversation The new conversation
+ *
+ */
+ public void switchTo(ConversationImpl conversation)
+ {
+ log.debug("Switched conversation from " + this);
+ id = conversation.getUnderlyingId();
+ longRunning = conversation.isLongRunning();
+ timeout = conversation.getTimeout();
+ log.debug(" to " + this);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "ID: " + id + ", long-running: " + longRunning + ", timeout: " + timeout + "ms";
+ }
+
+ public void setLongRunning(boolean longRunning)
+ {
+ log.debug("Set conversation " + id + " to long-running: " + longRunning);
+ this.longRunning = longRunning;
+ }
+
+ /**
+ * Gets the original ID of the conversation
+ *
+ * @return The id
+ */
+ public String getOriginalId()
+ {
+ return originalId;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof ConversationImpl)
+ {
+ ConversationImpl that = (ConversationImpl) obj;
+ return (id == null || that.getUnderlyingId() == null) ? false : id.equals(that.getUnderlyingId());
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return id == null ? super.hashCode() : id.hashCode();
+ }
+
+ public boolean isTransient()
+ {
+ return !isLongRunning();
+ }
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/JavaSEConversationTerminator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/JavaSEConversationTerminator.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/JavaSEConversationTerminator.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,51 +1,51 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.io.Serializable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import javax.enterprise.context.SessionScoped;
-
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * A ConversationTerminator implementation using Java SE scheduling
- *
- * @author Nicklas Karlsson
- * @see org.jboss.webbeans.conversation.ConversationTerminator
- */
-@SessionScoped
-public class JavaSEConversationTerminator implements ConversationTerminator, Serializable
-{
- 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);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.io.Serializable;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+import javax.enterprise.context.SessionScoped;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * A ConversationTerminator implementation using Java SE scheduling
+ *
+ * @author Nicklas Karlsson
+ * @see org.jboss.webbeans.conversation.ConversationTerminator
+ */
+@SessionScoped
+public class JavaSEConversationTerminator implements ConversationTerminator, Serializable
+{
+ 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);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/JavaSEConversationTerminator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/NumericConversationIdGenerator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/NumericConversationIdGenerator.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/NumericConversationIdGenerator.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,58 +1,58 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.io.Serializable;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.enterprise.context.SessionScoped;
-
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * A ConversationIdGenerator implementation using running numerical values
- *
- * @author Nicklas Karlsson
- *
- */
-@SessionScoped
-
-public class NumericConversationIdGenerator implements ConversationIdGenerator, Serializable
-{
- private static final long serialVersionUID = -587408626962044442L;
-
- private static LogProvider log = Logging.getLogProvider(NumericConversationIdGenerator.class);
- // The next conversation ID
- private AtomicInteger id;
-
- /**
- * Creates a new conversation ID generator
- */
- public NumericConversationIdGenerator()
- {
- id = new AtomicInteger(1);
- }
-
- public String nextId()
- {
- int nextId = id.getAndIncrement();
- log.trace("Generated new conversation id " + nextId);
- return String.valueOf(nextId);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.io.Serializable;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.enterprise.context.SessionScoped;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * A ConversationIdGenerator implementation using running numerical values
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+@SessionScoped
+
+public class NumericConversationIdGenerator implements ConversationIdGenerator, Serializable
+{
+ private static final long serialVersionUID = -587408626962044442L;
+
+ private static LogProvider log = Logging.getLogProvider(NumericConversationIdGenerator.class);
+ // The next conversation ID
+ private AtomicInteger id;
+
+ /**
+ * Creates a new conversation ID generator
+ */
+ public NumericConversationIdGenerator()
+ {
+ id = new AtomicInteger(1);
+ }
+
+ public String nextId()
+ {
+ int nextId = id.getAndIncrement();
+ log.trace("Generated new conversation id " + nextId);
+ return String.valueOf(nextId);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/NumericConversationIdGenerator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,87 +1,87 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.conversation;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.servlet.ConversationBeanStore;
-
-/**
- * The HTTP session based conversation manager
- *
- * @author Nicklas Karlsson
- *
- */
-@SessionScoped
-public class ServletConversationManager extends AbstractConversationManager implements Serializable
-{
- 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";
-
- @Inject Instance<HttpSession> httpSession;
-
- @Override
- public BeanStore getBeanStore(String cid)
- {
- return new ConversationBeanStore(httpSession.get(), cid);
- }
-
- @Produces
- @ConversationInactivityTimeout
- public static long getConversationTimeoutInMilliseconds()
- {
- log.trace("Produced conversation timeout " + CONVERSATION_TIMEOUT_IN_MS);
- return CONVERSATION_TIMEOUT_IN_MS;
- }
-
- @Produces
- @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;
- }
-
- @Produces
- @ConversationIdName
- public static String getConversationIdName()
- {
- log.trace("Produced conversation id name " + CONVERSATION_ID_NAME);
- return CONVERSATION_ID_NAME;
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.conversation;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.servlet.ConversationBeanStore;
+
+/**
+ * The HTTP session based conversation manager
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+@SessionScoped
+public class ServletConversationManager extends AbstractConversationManager implements Serializable
+{
+ 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";
+
+ @Inject Instance<HttpSession> httpSession;
+
+ @Override
+ public BeanStore getBeanStore(String cid)
+ {
+ return new ConversationBeanStore(httpSession.get(), cid);
+ }
+
+ @Produces
+ @ConversationInactivityTimeout
+ public static long getConversationTimeoutInMilliseconds()
+ {
+ log.trace("Produced conversation timeout " + CONVERSATION_TIMEOUT_IN_MS);
+ return CONVERSATION_TIMEOUT_IN_MS;
+ }
+
+ @Produces
+ @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;
+ }
+
+ @Produces
+ @ConversationIdName
+ public static String getConversationIdName()
+ {
+ log.trace("Produced conversation id name " + CONVERSATION_ID_NAME);
+ return CONVERSATION_ID_NAME;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EjbDescriptors.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EjbDescriptors.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EjbDescriptors.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,155 +1,155 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.ejb;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.ejb.spi.EjbDescriptor;
-
-/**
- * EJB descriptors by EJB implementation class or name
- *
- * @author Pete Muir
- *
- */
-public class EjbDescriptors implements Service, Iterable<InternalEjbDescriptor<?>>
-{
- // EJB name -> EJB descriptors map
- private final Map<String, InternalEjbDescriptor<?>> ejbs;
-
- private final Collection<Class<?>> ejbClasses;
-
- public static final EjbDescriptors EMPTY = new EjbDescriptors()
- {
- @Override
- public <T> void add(EjbDescriptor<T> ejbDescriptor)
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void addAll(Iterable<EjbDescriptor<?>> ejbDescriptors)
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void cleanup()
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void clear()
- {
- throw new UnsupportedOperationException();
- }
-
-
- };
-
- /**
- * Constructor
- */
- public EjbDescriptors()
- {
- this.ejbs = new HashMap<String, InternalEjbDescriptor<?>>();
- this.ejbClasses = new HashSet<Class<?>>();
- }
-
- /**
- * Gets an iterator to the EJB descriptors for an EJB implementation class
- *
- * @param beanClass The EJB class
- * @return An iterator
- */
- @SuppressWarnings("unchecked")
- public <T> InternalEjbDescriptor<T> get(String beanName)
- {
- return (InternalEjbDescriptor<T>) ejbs.get(beanName);
- }
-
- /**
- * Adds an EJB descriptor to the maps
- *
- * @param ejbDescriptor The EJB descriptor to add
- */
- public <T> void add(EjbDescriptor<T> ejbDescriptor)
- {
- InternalEjbDescriptor<T> internalEjbDescriptor = new InternalEjbDescriptor<T>(ejbDescriptor);
- ejbs.put(ejbDescriptor.getEjbName(), internalEjbDescriptor);
- ejbClasses.add(ejbDescriptor.getBeanClass());
- }
-
- /**
- * Indicates if there are EJB descriptors available for an EJB implementation
- * class
- *
- * @param beanClass The class to match
- * @return True if present, otherwise false
- */
- public boolean contains(String beanName)
- {
- return ejbs.containsKey(beanName);
- }
-
- /**
- * Indicates if there are EJB descriptors available for an EJB implementation
- * class
- *
- * @param beanClass The class to match
- * @return True if present, otherwise false
- */
- public boolean contains(Class<?> beanClass)
- {
- return ejbClasses.contains(beanClass);
- }
-
- /**
- * Adds all EJB descriptors to the maps
- *
- * @param ejbDescriptors The descriptors to add
- */
- public void addAll(Iterable<EjbDescriptor<?>> ejbDescriptors)
- {
- for (EjbDescriptor<?> ejbDescriptor : ejbDescriptors)
- {
- add(ejbDescriptor);
- }
- }
-
- /**
- * Clears both maps
- */
- public void clear()
- {
- ejbs.clear();
- }
-
- public Iterator<InternalEjbDescriptor<?>> iterator()
- {
- return ejbs.values().iterator();
- }
-
- public void cleanup() {}
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.ejb;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+
+/**
+ * EJB descriptors by EJB implementation class or name
+ *
+ * @author Pete Muir
+ *
+ */
+public class EjbDescriptors implements Service, Iterable<InternalEjbDescriptor<?>>
+{
+ // EJB name -> EJB descriptors map
+ private final Map<String, InternalEjbDescriptor<?>> ejbs;
+
+ private final Collection<Class<?>> ejbClasses;
+
+ public static final EjbDescriptors EMPTY = new EjbDescriptors()
+ {
+ @Override
+ public <T> void add(EjbDescriptor<T> ejbDescriptor)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addAll(Iterable<EjbDescriptor<?>> ejbDescriptors)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void cleanup()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void clear()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+
+ };
+
+ /**
+ * Constructor
+ */
+ public EjbDescriptors()
+ {
+ this.ejbs = new HashMap<String, InternalEjbDescriptor<?>>();
+ this.ejbClasses = new HashSet<Class<?>>();
+ }
+
+ /**
+ * Gets an iterator to the EJB descriptors for an EJB implementation class
+ *
+ * @param beanClass The EJB class
+ * @return An iterator
+ */
+ @SuppressWarnings("unchecked")
+ public <T> InternalEjbDescriptor<T> get(String beanName)
+ {
+ return (InternalEjbDescriptor<T>) ejbs.get(beanName);
+ }
+
+ /**
+ * Adds an EJB descriptor to the maps
+ *
+ * @param ejbDescriptor The EJB descriptor to add
+ */
+ public <T> void add(EjbDescriptor<T> ejbDescriptor)
+ {
+ InternalEjbDescriptor<T> internalEjbDescriptor = new InternalEjbDescriptor<T>(ejbDescriptor);
+ ejbs.put(ejbDescriptor.getEjbName(), internalEjbDescriptor);
+ ejbClasses.add(ejbDescriptor.getBeanClass());
+ }
+
+ /**
+ * Indicates if there are EJB descriptors available for an EJB implementation
+ * class
+ *
+ * @param beanClass The class to match
+ * @return True if present, otherwise false
+ */
+ public boolean contains(String beanName)
+ {
+ return ejbs.containsKey(beanName);
+ }
+
+ /**
+ * Indicates if there are EJB descriptors available for an EJB implementation
+ * class
+ *
+ * @param beanClass The class to match
+ * @return True if present, otherwise false
+ */
+ public boolean contains(Class<?> beanClass)
+ {
+ return ejbClasses.contains(beanClass);
+ }
+
+ /**
+ * Adds all EJB descriptors to the maps
+ *
+ * @param ejbDescriptors The descriptors to add
+ */
+ public void addAll(Iterable<EjbDescriptor<?>> ejbDescriptors)
+ {
+ for (EjbDescriptor<?> ejbDescriptor : ejbDescriptors)
+ {
+ add(ejbDescriptor);
+ }
+ }
+
+ /**
+ * Clears both maps
+ */
+ public void clear()
+ {
+ ejbs.clear();
+ }
+
+ public Iterator<InternalEjbDescriptor<?>> iterator()
+ {
+ return ejbs.values().iterator();
+ }
+
+ public void cleanup() {}
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EjbDescriptors.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/InternalEjbDescriptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/SessionBeanInterceptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,143 +1,143 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.el;
-
-import static org.jboss.webbeans.el.ELCreationalContextStack.getCreationalContextStore;
-
-import java.beans.FeatureDescriptor;
-import java.util.Iterator;
-import java.util.concurrent.Callable;
-
-import javax.el.ELContext;
-import javax.el.ELResolver;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.webbeans.BeanManagerImpl;
-
-/**
- * An EL-resolver against the named beans
- *
- * @author Pete Muir
- */
-public abstract class AbstractWebBeansELResolver extends ELResolver
-{
-
- protected abstract BeanManagerImpl getManager(ELContext context);
-
- @Override
- public Class<?> getCommonPropertyType(ELContext context, Object base)
- {
- return null;
- }
-
- @Override
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
- {
- return null;
- }
-
- @Override
- public Class<?> getType(ELContext context, Object base, Object property)
- {
- return null;
- }
-
- @Override
- public Object getValue(final ELContext context, Object base, Object property)
- {
- if (property != null)
- {
- String propertyString = property.toString();
- Namespace namespace = null;
- if (base == null)
- {
- if (getManager(context).getRootNamespace().contains(propertyString))
- {
- context.setPropertyResolved(true);
- return getManager(context).getRootNamespace().get(propertyString);
- }
- }
- else if (base instanceof Namespace)
- {
- namespace = (Namespace) base;
- // We're definitely the responsible party
- context.setPropertyResolved(true);
- if (namespace.contains(propertyString))
- {
- // There is a child namespace
- return namespace.get(propertyString);
- }
- }
- else
- {
- // let the standard EL resolver chain handle the property
- return null;
- }
- final String name;
- if (namespace != null)
- {
- // Try looking in the manager for a bean
- name = namespace.qualifyName(propertyString);
- }
- else
- {
- name = propertyString;
- }
- Object value = null;
- try
- {
- final Bean<?> bean = getManager(context).resolve(getManager(context).getBeans(name));
- final ELCreationalContext<?> creationalContext = getCreationalContextStore(context).peek();
- if (bean != null)
- {
- value = creationalContext.putIfAbsent(bean, new Callable<Object>()
- {
-
- public Object call() throws Exception
- {
- return getManager(context).getReference(bean, creationalContext);
- }
-
- });
- }
- }
- catch (Exception e)
- {
- throw new RuntimeException("Error resolving property " + propertyString + " against base " + base, e);
- }
- if (value != null)
- {
- context.setPropertyResolved(true);
- return value;
- }
- }
- return null;
- }
-
- @Override
- public boolean isReadOnly(ELContext context, Object base, Object property)
- {
- return false;
- }
-
- @Override
- public void setValue(ELContext context, Object base, Object property, Object value)
- {
- }
-
-}
-
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.el;
+
+import static org.jboss.webbeans.el.ELCreationalContextStack.getCreationalContextStore;
+
+import java.beans.FeatureDescriptor;
+import java.util.Iterator;
+import java.util.concurrent.Callable;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.webbeans.BeanManagerImpl;
+
+/**
+ * An EL-resolver against the named beans
+ *
+ * @author Pete Muir
+ */
+public abstract class AbstractWebBeansELResolver extends ELResolver
+{
+
+ protected abstract BeanManagerImpl getManager(ELContext context);
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base)
+ {
+ return null;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
+ {
+ return null;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ {
+ return null;
+ }
+
+ @Override
+ public Object getValue(final ELContext context, Object base, Object property)
+ {
+ if (property != null)
+ {
+ String propertyString = property.toString();
+ Namespace namespace = null;
+ if (base == null)
+ {
+ if (getManager(context).getRootNamespace().contains(propertyString))
+ {
+ context.setPropertyResolved(true);
+ return getManager(context).getRootNamespace().get(propertyString);
+ }
+ }
+ else if (base instanceof Namespace)
+ {
+ namespace = (Namespace) base;
+ // We're definitely the responsible party
+ context.setPropertyResolved(true);
+ if (namespace.contains(propertyString))
+ {
+ // There is a child namespace
+ return namespace.get(propertyString);
+ }
+ }
+ else
+ {
+ // let the standard EL resolver chain handle the property
+ return null;
+ }
+ final String name;
+ if (namespace != null)
+ {
+ // Try looking in the manager for a bean
+ name = namespace.qualifyName(propertyString);
+ }
+ else
+ {
+ name = propertyString;
+ }
+ Object value = null;
+ try
+ {
+ final Bean<?> bean = getManager(context).resolve(getManager(context).getBeans(name));
+ final ELCreationalContext<?> creationalContext = getCreationalContextStore(context).peek();
+ if (bean != null)
+ {
+ value = creationalContext.putIfAbsent(bean, new Callable<Object>()
+ {
+
+ public Object call() throws Exception
+ {
+ return getManager(context).getReference(bean, creationalContext);
+ }
+
+ });
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Error resolving property " + propertyString + " against base " + base, e);
+ }
+ if (value != null)
+ {
+ context.setPropertyResolved(true);
+ return value;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ {
+ return false;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property, Object value)
+ {
+ }
+
+}
+
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContextStack.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/Namespace.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELContextListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansExpressionFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansMethodExpression.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansValueExpression.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/AsynchronousTransactionalEventNotification.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverMethodImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/Status.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionSynchronizedRunnable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverMethodImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/Exceptions.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/InjectionContextImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/WBInjectionPoint.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotationStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ConstructorSignature.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotation.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBClass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBConstructor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMember.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBParameter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/MethodSignature.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotation.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBCallable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBConstructor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,53 +1,53 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.introspector;
-
-import java.lang.reflect.Field;
-
-import javax.enterprise.inject.spi.AnnotatedField;
-
-/**
- * AnnotatedField provides a uniform access to the annotations on an annotated
- * field
- *
- * @author Pete Muir
- *
- */
-public interface WBField<T, X> extends WBMember<T, X, Field>, AnnotatedField<X>
-{
-
- /**
- * Injects an instance
- *
- *
- * @param declaringInstance The instance to inject into
- * @param value The value to inject
- */
- public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException;
-
- public T get(Object instance);
-
- /**
- * Gets the property name of the field
- *
- * @return The name
- */
- public String getPropertyName();
-
- public boolean isTransient();
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.introspector;
+
+import java.lang.reflect.Field;
+
+import javax.enterprise.inject.spi.AnnotatedField;
+
+/**
+ * AnnotatedField provides a uniform access to the annotations on an annotated
+ * field
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WBField<T, X> extends WBMember<T, X, Field>, AnnotatedField<X>
+{
+
+ /**
+ * Injects an instance
+ *
+ *
+ * @param declaringInstance The instance to inject into
+ * @param value The value to inject
+ */
+ public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException;
+
+ public T get(Object instance);
+
+ /**
+ * Gets the property name of the field
+ *
+ * @return The name
+ */
+ public String getPropertyName();
+
+ public boolean isTransient();
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMember.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBParameter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBCallable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBMember.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/ConstructorSignatureImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBAnnotationImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,287 +1,287 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.introspector.jlr;
-
-import static org.jboss.webbeans.util.Reflections.ensureAccessible;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.introspector.AnnotationStore;
-import org.jboss.webbeans.introspector.ConstructorSignature;
-import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.introspector.WBConstructor;
-import org.jboss.webbeans.introspector.WBParameter;
-import org.jboss.webbeans.resources.ClassTransformer;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.ListMultimap;
-import com.google.common.collect.Multimaps;
-
-/**
- * Represents an annotated constructor
- *
- * This class is immutable, and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBConstructorImpl<T> extends AbstractWBCallable<T, T, Constructor<T>> implements WBConstructor<T>
-{
-
- // The underlying constructor
- private final Constructor<T> constructor;
-
- // The list of parameter abstractions
- private final List<WBParameter<?, ?>> parameters;
- // The mapping of annotation -> parameter abstraction
- private final ListMultimap<Class<? extends Annotation>, WBParameter<?, ?>> annotatedParameters;
-
- private final ConstructorSignature signature;
-
- // Cached string representation
- private final String toString;
-
- public static <T> WBConstructor<T> of(Constructor<T> constructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(constructor, classTransformer.getTypeStore());
- return new WBConstructorImpl<T>(ensureAccessible(constructor), null, annotationStore, declaringClass, classTransformer);
- }
-
- public static <T> WBConstructor<T> of(AnnotatedConstructor<T> annotatedConstructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(annotatedConstructor.getAnnotations(), annotatedConstructor.getAnnotations(), classTransformer.getTypeStore());
- return new WBConstructorImpl<T>(ensureAccessible(annotatedConstructor.getJavaMember()), annotatedConstructor, annotationStore, declaringClass, classTransformer);
- }
-
- /**
- * Constructor
- *
- * Initializes the superclass with the build annotations map
- *
- * @param constructor The constructor method
- * @param declaringClass The declaring class
- */
- private WBConstructorImpl(Constructor<T> constructor, AnnotatedConstructor<T> annotatedConstructor, AnnotationStore annotationStore, WBClass<T> declaringClass, ClassTransformer classTransformer)
- {
- super(annotationStore, constructor, constructor.getDeclaringClass(), constructor.getDeclaringClass(), declaringClass);
- this.toString = new StringBuilder().append("constructor ").append(constructor.toString()).toString();
- this.constructor = constructor;
-
- this.parameters = new ArrayList<WBParameter<?, ?>>();
- annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WBParameter<?, ?>>>(), new Supplier< List<WBParameter<?, ?>>>()
- {
-
- public List<WBParameter<?, ?>> get()
- {
- return new ArrayList<WBParameter<?, ?>>();
- }
-
- });
-
- Map<Integer, AnnotatedParameter<?>> annotatedTypeParameters = new HashMap<Integer, AnnotatedParameter<?>>();
-
- if (annotatedConstructor != null)
- {
- for (AnnotatedParameter<?> annotated : annotatedConstructor.getParameters())
- {
- annotatedTypeParameters.put(annotated.getPosition(), annotated);
- }
- }
-
- for (int i = 0; i < constructor.getParameterTypes().length; i++)
- {
- if (constructor.getParameterAnnotations()[i].length > 0 || annotatedTypeParameters.containsKey(i))
- {
- Class<?> clazz = constructor.getParameterTypes()[i];
- Type type = constructor.getGenericParameterTypes()[i];
- WBParameter<?, ?> parameter = null;
- if (annotatedTypeParameters.containsKey(i))
- {
- AnnotatedParameter<?> annotatedParameter = annotatedTypeParameters.get(i);
- parameter = WBParameterImpl.of(annotatedParameter.getAnnotations(), clazz, type, this, i, classTransformer);
- }
- else
- {
- parameter = WBParameterImpl.of(constructor.getParameterAnnotations()[i], clazz, type, this, i, classTransformer);
- }
-
- parameters.add(parameter);
-
- for (Annotation annotation : parameter.getAnnotations())
- {
- annotatedParameters.put(annotation.annotationType(), parameter);
- }
- }
- else
- {
- Class<?> clazz = constructor.getParameterTypes()[i];
- Type type;
- if (constructor.getGenericParameterTypes().length > i)
- {
- type = constructor.getGenericParameterTypes()[i];
- }
- else
- {
- type = clazz;
- }
- WBParameter<?, ?> parameter = WBParameterImpl.of(new Annotation[0], clazz, type, this, i, classTransformer);
- parameters.add(parameter);
-
- for (Annotation annotation : parameter.getAnnotations())
- {
- annotatedParameters.put(annotation.annotationType(), parameter);
- }
- }
- }
- this.signature = new ConstructorSignatureImpl(this);
- }
-
- /**
- * Gets the constructor
- *
- * @return The constructor
- */
- public Constructor<T> getAnnotatedConstructor()
- {
- return constructor;
- }
-
- /**
- * Gets the delegate (constructor)
- *
- * @return The delegate
- */
- @Override
-public Constructor<T> getDelegate()
- {
- return constructor;
- }
-
- /**
- * Gets the abstracted parameters
- *
- * If the parameters are null, initalize them first
- *
- * @return A list of annotated parameter abstractions
- *
- * @see org.jboss.webbeans.introspector.WBConstructor#getWBParameters()
- */
- public List<WBParameter<?, ?>> getWBParameters()
- {
- return Collections.unmodifiableList(parameters);
- }
-
- /**
- * Gets parameter abstractions with a given annotation type.
- *
- * If the parameters are null, they are initializes first.
- *
- * @param annotationType The annotation type to match
- * @return A list of matching parameter abstractions. An empty list is
- * returned if there are no matches.
- *
- * @see org.jboss.webbeans.introspector.WBConstructor#getAnnotatedWBParameters(Class)
- */
- public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableList(annotatedParameters.get(annotationType));
- }
-
- /**
- * Creates a new instance
- *
- * @param manager The Web Beans manager
- * @return An instance
- * @throws InvocationTargetException
- * @throws IllegalAccessException
- * @throws InstantiationException
- * @throws IllegalArgumentException
- *
- * @see org.jboss.webbeans.introspector.WBConstructor#newInstance(BeanManagerImpl)
- */
- public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
- {
- return getDelegate().newInstance(parameters);
- }
-
- /**
- * The overridden equals operation
- *
- * @param other The instance to compare to
- * @return True if equal, false otherwise
- */
- @Override
- public boolean equals(Object other)
- {
-
- if (super.equals(other) && other instanceof WBConstructor)
- {
- WBConstructor<?> that = (WBConstructor<?>) other;
- return this.getDeclaringType().equals(that.getDeclaringType()) && this.getWBParameters().equals(that.getWBParameters());
- }
- return false;
- }
-
- /**
- * The overridden hashcode
- *
- * Gets the hash code from the delegate
- *
- * @return The hash code
- */
- @Override
- public int hashCode()
- {
- return getDelegate().hashCode();
- }
-
- /**
- * Gets a string representation of the constructor
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return toString;
- }
-
- public ConstructorSignature getSignature()
- {
- return signature;
- }
-
- public List<AnnotatedParameter<T>> getParameters()
- {
- return Collections.unmodifiableList((List) parameters);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.introspector.jlr;
+
+import static org.jboss.webbeans.util.Reflections.ensureAccessible;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.introspector.AnnotationStore;
+import org.jboss.webbeans.introspector.ConstructorSignature;
+import org.jboss.webbeans.introspector.WBClass;
+import org.jboss.webbeans.introspector.WBConstructor;
+import org.jboss.webbeans.introspector.WBParameter;
+import org.jboss.webbeans.resources.ClassTransformer;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.ListMultimap;
+import com.google.common.collect.Multimaps;
+
+/**
+ * Represents an annotated constructor
+ *
+ * This class is immutable, and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WBConstructorImpl<T> extends AbstractWBCallable<T, T, Constructor<T>> implements WBConstructor<T>
+{
+
+ // The underlying constructor
+ private final Constructor<T> constructor;
+
+ // The list of parameter abstractions
+ private final List<WBParameter<?, ?>> parameters;
+ // The mapping of annotation -> parameter abstraction
+ private final ListMultimap<Class<? extends Annotation>, WBParameter<?, ?>> annotatedParameters;
+
+ private final ConstructorSignature signature;
+
+ // Cached string representation
+ private final String toString;
+
+ public static <T> WBConstructor<T> of(Constructor<T> constructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(constructor, classTransformer.getTypeStore());
+ return new WBConstructorImpl<T>(ensureAccessible(constructor), null, annotationStore, declaringClass, classTransformer);
+ }
+
+ public static <T> WBConstructor<T> of(AnnotatedConstructor<T> annotatedConstructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(annotatedConstructor.getAnnotations(), annotatedConstructor.getAnnotations(), classTransformer.getTypeStore());
+ return new WBConstructorImpl<T>(ensureAccessible(annotatedConstructor.getJavaMember()), annotatedConstructor, annotationStore, declaringClass, classTransformer);
+ }
+
+ /**
+ * Constructor
+ *
+ * Initializes the superclass with the build annotations map
+ *
+ * @param constructor The constructor method
+ * @param declaringClass The declaring class
+ */
+ private WBConstructorImpl(Constructor<T> constructor, AnnotatedConstructor<T> annotatedConstructor, AnnotationStore annotationStore, WBClass<T> declaringClass, ClassTransformer classTransformer)
+ {
+ super(annotationStore, constructor, constructor.getDeclaringClass(), constructor.getDeclaringClass(), declaringClass);
+ this.toString = new StringBuilder().append("constructor ").append(constructor.toString()).toString();
+ this.constructor = constructor;
+
+ this.parameters = new ArrayList<WBParameter<?, ?>>();
+ annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WBParameter<?, ?>>>(), new Supplier< List<WBParameter<?, ?>>>()
+ {
+
+ public List<WBParameter<?, ?>> get()
+ {
+ return new ArrayList<WBParameter<?, ?>>();
+ }
+
+ });
+
+ Map<Integer, AnnotatedParameter<?>> annotatedTypeParameters = new HashMap<Integer, AnnotatedParameter<?>>();
+
+ if (annotatedConstructor != null)
+ {
+ for (AnnotatedParameter<?> annotated : annotatedConstructor.getParameters())
+ {
+ annotatedTypeParameters.put(annotated.getPosition(), annotated);
+ }
+ }
+
+ for (int i = 0; i < constructor.getParameterTypes().length; i++)
+ {
+ if (constructor.getParameterAnnotations()[i].length > 0 || annotatedTypeParameters.containsKey(i))
+ {
+ Class<?> clazz = constructor.getParameterTypes()[i];
+ Type type = constructor.getGenericParameterTypes()[i];
+ WBParameter<?, ?> parameter = null;
+ if (annotatedTypeParameters.containsKey(i))
+ {
+ AnnotatedParameter<?> annotatedParameter = annotatedTypeParameters.get(i);
+ parameter = WBParameterImpl.of(annotatedParameter.getAnnotations(), clazz, type, this, i, classTransformer);
+ }
+ else
+ {
+ parameter = WBParameterImpl.of(constructor.getParameterAnnotations()[i], clazz, type, this, i, classTransformer);
+ }
+
+ parameters.add(parameter);
+
+ for (Annotation annotation : parameter.getAnnotations())
+ {
+ annotatedParameters.put(annotation.annotationType(), parameter);
+ }
+ }
+ else
+ {
+ Class<?> clazz = constructor.getParameterTypes()[i];
+ Type type;
+ if (constructor.getGenericParameterTypes().length > i)
+ {
+ type = constructor.getGenericParameterTypes()[i];
+ }
+ else
+ {
+ type = clazz;
+ }
+ WBParameter<?, ?> parameter = WBParameterImpl.of(new Annotation[0], clazz, type, this, i, classTransformer);
+ parameters.add(parameter);
+
+ for (Annotation annotation : parameter.getAnnotations())
+ {
+ annotatedParameters.put(annotation.annotationType(), parameter);
+ }
+ }
+ }
+ this.signature = new ConstructorSignatureImpl(this);
+ }
+
+ /**
+ * Gets the constructor
+ *
+ * @return The constructor
+ */
+ public Constructor<T> getAnnotatedConstructor()
+ {
+ return constructor;
+ }
+
+ /**
+ * Gets the delegate (constructor)
+ *
+ * @return The delegate
+ */
+ @Override
+public Constructor<T> getDelegate()
+ {
+ return constructor;
+ }
+
+ /**
+ * Gets the abstracted parameters
+ *
+ * If the parameters are null, initalize them first
+ *
+ * @return A list of annotated parameter abstractions
+ *
+ * @see org.jboss.webbeans.introspector.WBConstructor#getWBParameters()
+ */
+ public List<WBParameter<?, ?>> getWBParameters()
+ {
+ return Collections.unmodifiableList(parameters);
+ }
+
+ /**
+ * Gets parameter abstractions with a given annotation type.
+ *
+ * If the parameters are null, they are initializes first.
+ *
+ * @param annotationType The annotation type to match
+ * @return A list of matching parameter abstractions. An empty list is
+ * returned if there are no matches.
+ *
+ * @see org.jboss.webbeans.introspector.WBConstructor#getAnnotatedWBParameters(Class)
+ */
+ public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableList(annotatedParameters.get(annotationType));
+ }
+
+ /**
+ * Creates a new instance
+ *
+ * @param manager The Web Beans manager
+ * @return An instance
+ * @throws InvocationTargetException
+ * @throws IllegalAccessException
+ * @throws InstantiationException
+ * @throws IllegalArgumentException
+ *
+ * @see org.jboss.webbeans.introspector.WBConstructor#newInstance(BeanManagerImpl)
+ */
+ public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
+ {
+ return getDelegate().newInstance(parameters);
+ }
+
+ /**
+ * The overridden equals operation
+ *
+ * @param other The instance to compare to
+ * @return True if equal, false otherwise
+ */
+ @Override
+ public boolean equals(Object other)
+ {
+
+ if (super.equals(other) && other instanceof WBConstructor)
+ {
+ WBConstructor<?> that = (WBConstructor<?>) other;
+ return this.getDeclaringType().equals(that.getDeclaringType()) && this.getWBParameters().equals(that.getWBParameters());
+ }
+ return false;
+ }
+
+ /**
+ * The overridden hashcode
+ *
+ * Gets the hash code from the delegate
+ *
+ * @return The hash code
+ */
+ @Override
+ public int hashCode()
+ {
+ return getDelegate().hashCode();
+ }
+
+ /**
+ * Gets a string representation of the constructor
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return toString;
+ }
+
+ public ConstructorSignature getSignature()
+ {
+ return signature;
+ }
+
+ public List<AnnotatedParameter<T>> getParameters()
+ {
+ return Collections.unmodifiableList((List) parameters);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/ConversationAwareViewHandler.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/FacesUrlTransformer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfApiAbstraction.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfHelper.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfHelper.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfHelper.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,119 +1,119 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.jsf;
-
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.faces.context.FacesContext;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.Container;
-import org.jboss.webbeans.conversation.ConversationIdName;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.servlet.ServletHelper;
-import org.jboss.webbeans.util.Reflections;
-
-/**
- * Helper class for JSF related operations
- *
- * @author Nicklas Karlsson
- * @author Dan Allen
- */
-public class JsfHelper
-{
- private static LogProvider log = Logging.getLogProvider(JsfHelper.class);
-
- /**
- * Checks if the current request is a JSF postback. The JsfApiAbstraction is
- * consulted to determine if the JSF version is compatible with JSF 2.0. If
- * so, the {@link FacesContext#isPostback()} convenience method is used
- * (which is technically an optimized and safer implementation). Otherwise,
- * the ResponseStateManager is consulted directly.
- *
- * @return true if this request is a JSF postback, false otherwise
- */
- public static boolean isPostback(FacesContext facesContext)
- {
- if (Container.instance().deploymentServices().get(JsfApiAbstraction.class).isApiVersionCompatibleWith(2.0))
- {
- return (Boolean) Reflections.invokeAndWrap("isPostback", facesContext);
- }
- else
- {
- return facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext);
- }
- }
-
- /**
- * Gets the propagated conversation id parameter from the request
- *
- * @return The conversation id (or null if not found)
- */
- public static String getConversationIdFromRequest(FacesContext facesContext)
- {
- 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");
- return cid;
- }
-
- /**
- * Gets the propagated conversation id.
- *
- * @return The conversation id (or null if not found)
- */
- public static String getConversationId(FacesContext facesContext)
- {
- String cid = getConversationIdFromRequest(facesContext);
- log.debug("Resuming conversation with id " + cid);
- return cid;
- }
-
- /**
- * Gets the HTTP session
- *
- * @return The session
- */
- public static HttpSession getHttpSession(FacesContext facesContext)
- {
- Object session = facesContext.getExternalContext().getSession(true);
- if (session instanceof HttpSession)
- {
- return (HttpSession) session;
- }
- else
- {
- return null;
- }
- }
-
- public static BeanManagerImpl getModuleBeanManager(FacesContext facesContext)
- {
- if (facesContext.getExternalContext().getContext() instanceof ServletContext)
- {
- return ServletHelper.getModuleBeanManager((ServletContext) facesContext.getExternalContext().getContext());
- }
- else
- {
- throw new IllegalStateException("Web Beans doesn not support using JSF in an non-servlet environment");
- }
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.jsf;
+
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.Container;
+import org.jboss.webbeans.conversation.ConversationIdName;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.servlet.ServletHelper;
+import org.jboss.webbeans.util.Reflections;
+
+/**
+ * Helper class for JSF related operations
+ *
+ * @author Nicklas Karlsson
+ * @author Dan Allen
+ */
+public class JsfHelper
+{
+ private static LogProvider log = Logging.getLogProvider(JsfHelper.class);
+
+ /**
+ * Checks if the current request is a JSF postback. The JsfApiAbstraction is
+ * consulted to determine if the JSF version is compatible with JSF 2.0. If
+ * so, the {@link FacesContext#isPostback()} convenience method is used
+ * (which is technically an optimized and safer implementation). Otherwise,
+ * the ResponseStateManager is consulted directly.
+ *
+ * @return true if this request is a JSF postback, false otherwise
+ */
+ public static boolean isPostback(FacesContext facesContext)
+ {
+ if (Container.instance().deploymentServices().get(JsfApiAbstraction.class).isApiVersionCompatibleWith(2.0))
+ {
+ return (Boolean) Reflections.invokeAndWrap("isPostback", facesContext);
+ }
+ else
+ {
+ return facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext);
+ }
+ }
+
+ /**
+ * Gets the propagated conversation id parameter from the request
+ *
+ * @return The conversation id (or null if not found)
+ */
+ public static String getConversationIdFromRequest(FacesContext facesContext)
+ {
+ 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");
+ return cid;
+ }
+
+ /**
+ * Gets the propagated conversation id.
+ *
+ * @return The conversation id (or null if not found)
+ */
+ public static String getConversationId(FacesContext facesContext)
+ {
+ String cid = getConversationIdFromRequest(facesContext);
+ log.debug("Resuming conversation with id " + cid);
+ return cid;
+ }
+
+ /**
+ * Gets the HTTP session
+ *
+ * @return The session
+ */
+ public static HttpSession getHttpSession(FacesContext facesContext)
+ {
+ Object session = facesContext.getExternalContext().getSession(true);
+ if (session instanceof HttpSession)
+ {
+ return (HttpSession) session;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public static BeanManagerImpl getModuleBeanManager(FacesContext facesContext)
+ {
+ if (facesContext.getExternalContext().getContext() instanceof ServletContext)
+ {
+ return ServletHelper.getModuleBeanManager((ServletContext) facesContext.getExternalContext().getContext());
+ }
+ else
+ {
+ throw new IllegalStateException("Web Beans doesn not support using JSF in an non-servlet environment");
+ }
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfHelper.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/WebBeansPhaseListener.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/WebBeansPhaseListener.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/WebBeansPhaseListener.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,183 +1,183 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.jsf;
-
-import static org.jboss.webbeans.jsf.JsfHelper.getConversationId;
-import static org.jboss.webbeans.jsf.JsfHelper.getHttpSession;
-import static org.jboss.webbeans.jsf.JsfHelper.getModuleBeanManager;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.Container;
-import org.jboss.webbeans.context.ContextLifecycle;
-import org.jboss.webbeans.context.ConversationContext;
-import org.jboss.webbeans.context.SessionContext;
-import org.jboss.webbeans.conversation.ConversationImpl;
-import org.jboss.webbeans.conversation.ConversationManager;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.servlet.ConversationBeanStore;
-import org.jboss.webbeans.servlet.HttpSessionManager;
-
-/**
- * <p>
- * A JSF phase listener that initializes aspects of Web Beans in a more
- * fine-grained, integrated manner than what is possible with a servlet filter.
- * This phase listener works in conjunction with other hooks and callbacks
- * registered with the JSF runtime to help manage the Web Beans lifecycle.
- * </p>
- *
- * <p>
- * It's expected that over time, this phase listener may take on more work, but
- * for now the work is focused soley on conversation management. The phase
- * listener restores the long-running conversation if the conversation id token
- * is detected in the request, activates the conversation context in either case
- * (long-running or transient), and finally passivates the conversation after
- * the response has been committed.
- * </p>
- *
- * @author Nicklas Karlsson
- * @author Dan Allen
- */
-public class WebBeansPhaseListener implements PhaseListener
-{
- private static LogProvider log = Logging.getLogProvider(WebBeansPhaseListener.class);
-
- /**
- * Execute before every phase in the JSF life cycle. The order this
- * phase listener executes in relation to other phase listeners is
- * determined by the ordering of the faces-config.xml descriptors.
- * This phase listener should take precedence over extensions.
- *
- * @param phaseEvent The phase event
- */
- public void beforePhase(PhaseEvent phaseEvent)
- {
- if (phaseEvent.getPhaseId().equals(PhaseId.RESTORE_VIEW))
- {
- beforeRestoreView(phaseEvent.getFacesContext());
- }
- }
-
- /**
- * Execute after every phase in the JSF life cycle. The order this
- * phase listener executes in relation to other phase listeners is
- * determined by the ordering of the faces-config.xml descriptors.
- * This phase listener should take precedence over extensions.
- *
- * @param phaseEvent The phase event
- */
- public void afterPhase(PhaseEvent phaseEvent)
- {
- if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
- {
- afterRenderResponse(phaseEvent.getFacesContext());
- }
- // be careful with this else as it assumes only one if condition right now
- else if (phaseEvent.getFacesContext().getResponseComplete())
- {
- afterResponseComplete(phaseEvent.getFacesContext(), phaseEvent.getPhaseId());
- }
- }
-
- /**
- * Execute before the Restore View phase.
- */
- private void beforeRestoreView(FacesContext facesContext)
- {
- log.trace("Initiating the session and conversation before the Restore View phase");
- initiateSessionAndConversation(facesContext);
- }
-
- /**
- * Execute after the Render Response phase.
- */
- private void afterRenderResponse(FacesContext facesContext)
- {
- BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
- SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
- ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
- if (sessionContext.isActive())
- {
- log.trace("Cleaning up the conversation after the Render Response phase");
- moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
- conversationContext.setActive(false);
- }
- else
- {
- log.trace("Skipping conversation cleanup after the Render Response phase because session has been terminated.");
- }
- }
-
- /**
- * Execute after any phase that marks the response as complete.
- */
- private void afterResponseComplete(FacesContext facesContext, PhaseId phaseId)
- {
- BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
- 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");
- moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
- }
- else
- {
- log.trace("Skipping conversation cleanup after the response has been marked complete because the session has been terminated.");
- }
- }
-
- /**
- * Retrieve the HTTP session from the FacesContext and assign it to the Web
- * Beans HttpSessionManager. Restore the long-running conversation if the
- * conversation id token is present in the request and, in either case,
- * activate the conversation context (long-running or transient).
- */
- private void initiateSessionAndConversation(FacesContext facesContext)
- {
- HttpSession session = getHttpSession(facesContext);
- BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
- moduleBeanManager.getInstanceByType(HttpSessionManager.class).setSession(session);
- moduleBeanManager.getInstanceByType(ConversationManager.class).beginOrRestoreConversation(getConversationId(facesContext));
- String cid = moduleBeanManager.getInstanceByType(ConversationImpl.class).getUnderlyingId();
-
- ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
- conversationContext.setBeanStore(new ConversationBeanStore(session, cid));
- conversationContext.setActive(true);
- }
-
- /**
- * The phase id for which this phase listener is active. This phase listener
- * observes all JSF life-cycle phases.
- */
- public PhaseId getPhaseId()
- {
- return PhaseId.ANY_PHASE;
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.jsf;
+
+import static org.jboss.webbeans.jsf.JsfHelper.getConversationId;
+import static org.jboss.webbeans.jsf.JsfHelper.getHttpSession;
+import static org.jboss.webbeans.jsf.JsfHelper.getModuleBeanManager;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.Container;
+import org.jboss.webbeans.context.ContextLifecycle;
+import org.jboss.webbeans.context.ConversationContext;
+import org.jboss.webbeans.context.SessionContext;
+import org.jboss.webbeans.conversation.ConversationImpl;
+import org.jboss.webbeans.conversation.ConversationManager;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.servlet.ConversationBeanStore;
+import org.jboss.webbeans.servlet.HttpSessionManager;
+
+/**
+ * <p>
+ * A JSF phase listener that initializes aspects of Web Beans in a more
+ * fine-grained, integrated manner than what is possible with a servlet filter.
+ * This phase listener works in conjunction with other hooks and callbacks
+ * registered with the JSF runtime to help manage the Web Beans lifecycle.
+ * </p>
+ *
+ * <p>
+ * It's expected that over time, this phase listener may take on more work, but
+ * for now the work is focused soley on conversation management. The phase
+ * listener restores the long-running conversation if the conversation id token
+ * is detected in the request, activates the conversation context in either case
+ * (long-running or transient), and finally passivates the conversation after
+ * the response has been committed.
+ * </p>
+ *
+ * @author Nicklas Karlsson
+ * @author Dan Allen
+ */
+public class WebBeansPhaseListener implements PhaseListener
+{
+ private static LogProvider log = Logging.getLogProvider(WebBeansPhaseListener.class);
+
+ /**
+ * Execute before every phase in the JSF life cycle. The order this
+ * phase listener executes in relation to other phase listeners is
+ * determined by the ordering of the faces-config.xml descriptors.
+ * This phase listener should take precedence over extensions.
+ *
+ * @param phaseEvent The phase event
+ */
+ public void beforePhase(PhaseEvent phaseEvent)
+ {
+ if (phaseEvent.getPhaseId().equals(PhaseId.RESTORE_VIEW))
+ {
+ beforeRestoreView(phaseEvent.getFacesContext());
+ }
+ }
+
+ /**
+ * Execute after every phase in the JSF life cycle. The order this
+ * phase listener executes in relation to other phase listeners is
+ * determined by the ordering of the faces-config.xml descriptors.
+ * This phase listener should take precedence over extensions.
+ *
+ * @param phaseEvent The phase event
+ */
+ public void afterPhase(PhaseEvent phaseEvent)
+ {
+ if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
+ {
+ afterRenderResponse(phaseEvent.getFacesContext());
+ }
+ // be careful with this else as it assumes only one if condition right now
+ else if (phaseEvent.getFacesContext().getResponseComplete())
+ {
+ afterResponseComplete(phaseEvent.getFacesContext(), phaseEvent.getPhaseId());
+ }
+ }
+
+ /**
+ * Execute before the Restore View phase.
+ */
+ private void beforeRestoreView(FacesContext facesContext)
+ {
+ log.trace("Initiating the session and conversation before the Restore View phase");
+ initiateSessionAndConversation(facesContext);
+ }
+
+ /**
+ * Execute after the Render Response phase.
+ */
+ private void afterRenderResponse(FacesContext facesContext)
+ {
+ BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
+ SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
+ ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
+ if (sessionContext.isActive())
+ {
+ log.trace("Cleaning up the conversation after the Render Response phase");
+ moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
+ conversationContext.setActive(false);
+ }
+ else
+ {
+ log.trace("Skipping conversation cleanup after the Render Response phase because session has been terminated.");
+ }
+ }
+
+ /**
+ * Execute after any phase that marks the response as complete.
+ */
+ private void afterResponseComplete(FacesContext facesContext, PhaseId phaseId)
+ {
+ BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
+ 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");
+ moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
+ }
+ else
+ {
+ log.trace("Skipping conversation cleanup after the response has been marked complete because the session has been terminated.");
+ }
+ }
+
+ /**
+ * Retrieve the HTTP session from the FacesContext and assign it to the Web
+ * Beans HttpSessionManager. Restore the long-running conversation if the
+ * conversation id token is present in the request and, in either case,
+ * activate the conversation context (long-running or transient).
+ */
+ private void initiateSessionAndConversation(FacesContext facesContext)
+ {
+ HttpSession session = getHttpSession(facesContext);
+ BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
+ moduleBeanManager.getInstanceByType(HttpSessionManager.class).setSession(session);
+ moduleBeanManager.getInstanceByType(ConversationManager.class).beginOrRestoreConversation(getConversationId(facesContext));
+ String cid = moduleBeanManager.getInstanceByType(ConversationImpl.class).getUnderlyingId();
+
+ ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
+ conversationContext.setBeanStore(new ConversationBeanStore(session, cid));
+ conversationContext.setActive(true);
+ }
+
+ /**
+ * The phase id for which this phase listener is active. This phase listener
+ * observes all JSF life-cycle phases.
+ */
+ public PhaseId getPhaseId()
+ {
+ return PhaseId.ANY_PHASE;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/WebBeansPhaseListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/AnyLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/BindingTypeLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/DefaultLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/InjectLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/InterceptorBindingTypeLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/NewLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/NormalScopeLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/ScopeLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/literal/StereotypeLiteral.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/TypeStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/AnnotationModel.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/BindingTypeModel.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/InterceptorBindingModel.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/MergedStereotypes.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/MetaAnnotationStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/ScopeModel.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/cache/StereotypeModel.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/persistence/PersistenceApiAbstraction.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ForwardingResolvable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/InterceptorResolvable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/NameBasedResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/NewResolvableTransformer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/Resolvable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ResolvableFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ResolvableTransformer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/ResolvableWBClass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeDecoratorResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeDisposerResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeInterceptorResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeObserverResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ClassTransformer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/DefaultResourceLoader.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,108 +1,108 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import java.util.Collection;
-import java.util.Enumeration;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.webbeans.context.AbstractApplicationContext;
-import org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore;
-import org.jboss.webbeans.context.beanstore.NamingScheme;
-
-/**
- * A BeanStore that uses a servlet context as backing storage
- *
- * @author Nicklas Karlsson
- *
- * @see org.jboss.webbeans.context.AbstractApplicationContext
- */
-public class ApplicationBeanStore extends AbstractAttributeBackedBeanStore
-{
-
- private static final NamingScheme NAMING_SCHEME = new NamingScheme(AbstractApplicationContext.class.getName(), "#");
-
- // The servlet context to use as backing map
- private ServletContext context;
-
- /**
- * Constructor
- *
- * @param context The servlet context instance
- */
- public ApplicationBeanStore(ServletContext context)
- {
- super();
- this.context = context;
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttribute()
- */
- @Override
- protected Object getAttribute(String key)
- {
- return context.getAttribute(key);
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttributeNames()
- */
- @SuppressWarnings("unchecked")
- @Override
- protected Enumeration<String> getAttributeNames()
- {
- return context.getAttributeNames();
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#removeAttributes()
- */
- @Override
- protected void removeAttribute(String key)
- {
- context.removeAttribute(key);
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#setAttribute()
- */
- @Override
- protected void setAttribute(String key, Object instance)
- {
- context.setAttribute(key, instance);
- }
-
- @Override
- protected NamingScheme getNamingScheme()
- {
- return NAMING_SCHEME;
- }
-
- @Override
- public Collection<String> getContextualIds()
- {
- return null;
- }
-
- @Override
- public void clear()
- {
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import java.util.Collection;
+import java.util.Enumeration;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.context.AbstractApplicationContext;
+import org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore;
+import org.jboss.webbeans.context.beanstore.NamingScheme;
+
+/**
+ * A BeanStore that uses a servlet context as backing storage
+ *
+ * @author Nicklas Karlsson
+ *
+ * @see org.jboss.webbeans.context.AbstractApplicationContext
+ */
+public class ApplicationBeanStore extends AbstractAttributeBackedBeanStore
+{
+
+ private static final NamingScheme NAMING_SCHEME = new NamingScheme(AbstractApplicationContext.class.getName(), "#");
+
+ // The servlet context to use as backing map
+ private ServletContext context;
+
+ /**
+ * Constructor
+ *
+ * @param context The servlet context instance
+ */
+ public ApplicationBeanStore(ServletContext context)
+ {
+ super();
+ this.context = context;
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttribute()
+ */
+ @Override
+ protected Object getAttribute(String key)
+ {
+ return context.getAttribute(key);
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttributeNames()
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected Enumeration<String> getAttributeNames()
+ {
+ return context.getAttributeNames();
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#removeAttributes()
+ */
+ @Override
+ protected void removeAttribute(String key)
+ {
+ context.removeAttribute(key);
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#setAttribute()
+ */
+ @Override
+ protected void setAttribute(String key, Object instance)
+ {
+ context.setAttribute(key, instance);
+ }
+
+ @Override
+ protected NamingScheme getNamingScheme()
+ {
+ return NAMING_SCHEME;
+ }
+
+ @Override
+ public Collection<String> getContextualIds()
+ {
+ return null;
+ }
+
+ @Override
+ public void clear()
+ {
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationBeanStore.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationBeanStore.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,48 +1,48 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.context.ConversationContext;
-import org.jboss.webbeans.context.beanstore.NamingScheme;
-
-/**
- * A HTTP session backed bean store for the conversational scope
- *
- * @author Nicklas Karlsson
- */
-public class ConversationBeanStore extends HttpSessionBeanStore
-{
-
- private final String cid;
- private final NamingScheme namingScheme;
-
- public ConversationBeanStore(HttpSession session, String cid)
- {
- super(session);
- this.cid = cid;
- this.namingScheme = new NamingScheme(ConversationContext.class.getName() + "[" + cid + "]", "#");
- }
-
- @Override
- protected NamingScheme getNamingScheme()
- {
- return namingScheme;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import javax.servlet.http.HttpSession;
+
+import org.jboss.webbeans.context.ConversationContext;
+import org.jboss.webbeans.context.beanstore.NamingScheme;
+
+/**
+ * A HTTP session backed bean store for the conversational scope
+ *
+ * @author Nicklas Karlsson
+ */
+public class ConversationBeanStore extends HttpSessionBeanStore
+{
+
+ private final String cid;
+ private final NamingScheme namingScheme;
+
+ public ConversationBeanStore(HttpSession session, String cid)
+ {
+ super(session);
+ this.cid = cid;
+ this.namingScheme = new NamingScheme(ConversationContext.class.getName() + "[" + cid + "]", "#");
+ }
+
+ @Override
+ protected NamingScheme getNamingScheme()
+ {
+ return namingScheme;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,94 +1,94 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import static org.jboss.webbeans.servlet.ServletHelper.getModuleBeanManager;
-
-import java.io.IOException;
-
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.faces.context.FacesContext;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-
-import org.jboss.webbeans.conversation.ConversationIdName;
-import org.jboss.webbeans.conversation.ConversationImpl;
-import org.jboss.webbeans.conversation.ConversationManager;
-import org.jboss.webbeans.jsf.FacesUrlTransformer;
-
-/**
- * <p>A Filter for handling conversation propagation over redirects.</p>
- *
- * <p>This fiter intercepts the call to {@link HttpServletResponse#sendRedirect(String)} and
- * appends the conversation id request parameter to the URL if the conversation is long-running,
- * but only if the request parameter is not already present.</p>
- *
- * FIXME This filter is specifically for JSF and should be repackaged or split up to support non-JSF environments.
- *
- * @author Nicklas Karlsson
- */
-public class ConversationPropagationFilter implements Filter
-{
-
- private ServletContext ctx;
-
- public void init(FilterConfig config) throws ServletException
- {
- ctx = config.getServletContext();
- }
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
- {
- if (request instanceof HttpServletRequest && response instanceof HttpServletResponse)
- {
- response = wrapResponse((HttpServletResponse) response, ((HttpServletRequest) request).getContextPath());
- }
- chain.doFilter(request, response);
- }
-
- public void destroy()
- {
- }
-
- private ServletResponse wrapResponse(HttpServletResponse response, final String requestPath)
- {
- return new HttpServletResponseWrapper(response)
- {
- @Override
- public void sendRedirect(String path) throws IOException
- {
- ConversationImpl conversation = getModuleBeanManager(ctx) .getInstanceByType(ConversationImpl.class);
- if (conversation.isLongRunning())
- {
- String cidParamName = getModuleBeanManager(ctx).getInstanceByType(String.class, new AnnotationLiteral<ConversationIdName>(){});
- path = new FacesUrlTransformer(path, FacesContext.getCurrentInstance()).toRedirectViewId().toActionUrl().appendConversationIdIfNecessary(conversation.getUnderlyingId()).encode();
- getModuleBeanManager(ctx).getInstanceByType(ConversationManager.class).cleanupConversation();
- }
- super.sendRedirect(path);
- }
- };
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import static org.jboss.webbeans.servlet.ServletHelper.getModuleBeanManager;
+
+import java.io.IOException;
+
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.faces.context.FacesContext;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+
+import org.jboss.webbeans.conversation.ConversationIdName;
+import org.jboss.webbeans.conversation.ConversationImpl;
+import org.jboss.webbeans.conversation.ConversationManager;
+import org.jboss.webbeans.jsf.FacesUrlTransformer;
+
+/**
+ * <p>A Filter for handling conversation propagation over redirects.</p>
+ *
+ * <p>This fiter intercepts the call to {@link HttpServletResponse#sendRedirect(String)} and
+ * appends the conversation id request parameter to the URL if the conversation is long-running,
+ * but only if the request parameter is not already present.</p>
+ *
+ * FIXME This filter is specifically for JSF and should be repackaged or split up to support non-JSF environments.
+ *
+ * @author Nicklas Karlsson
+ */
+public class ConversationPropagationFilter implements Filter
+{
+
+ private ServletContext ctx;
+
+ public void init(FilterConfig config) throws ServletException
+ {
+ ctx = config.getServletContext();
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
+ {
+ if (request instanceof HttpServletRequest && response instanceof HttpServletResponse)
+ {
+ response = wrapResponse((HttpServletResponse) response, ((HttpServletRequest) request).getContextPath());
+ }
+ chain.doFilter(request, response);
+ }
+
+ public void destroy()
+ {
+ }
+
+ private ServletResponse wrapResponse(HttpServletResponse response, final String requestPath)
+ {
+ return new HttpServletResponseWrapper(response)
+ {
+ @Override
+ public void sendRedirect(String path) throws IOException
+ {
+ ConversationImpl conversation = getModuleBeanManager(ctx) .getInstanceByType(ConversationImpl.class);
+ if (conversation.isLongRunning())
+ {
+ String cidParamName = getModuleBeanManager(ctx).getInstanceByType(String.class, new AnnotationLiteral<ConversationIdName>(){});
+ path = new FacesUrlTransformer(path, FacesContext.getCurrentInstance()).toRedirectViewId().toActionUrl().appendConversationIdIfNecessary(conversation.getUnderlyingId()).encode();
+ getModuleBeanManager(ctx).getInstanceByType(ConversationManager.class).cleanupConversation();
+ }
+ super.sendRedirect(path);
+ }
+ };
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ConversationPropagationFilter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpRequestSessionBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,96 +1,96 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import java.util.Enumeration;
-
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.context.SessionContext;
-import org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore;
-import org.jboss.webbeans.context.beanstore.NamingScheme;
-
-/**
- * A BeanStore that uses a HTTP session as backing storage
- *
- * @author Nicklas Karlsson
- *
- * @see org.jboss.webbeans.context.AbstractApplicationContext
- */
-public class HttpSessionBeanStore extends AbstractAttributeBackedBeanStore
-{
-
- private static final NamingScheme NAMING_SCHEME = new NamingScheme(SessionContext.class.getName(), "#");
-
- // The HTTP session context to use as backing map
- private final HttpSession session;
-
- /**
- * Constructor
- *
- * @param session The HTTP session
- */
- public HttpSessionBeanStore(HttpSession session)
- {
- super();
- this.session = session;
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttribute()
- */
- @Override
- protected Object getAttribute(String key)
- {
- return session.getAttribute(key);
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttributeNames()
- */
- @SuppressWarnings("unchecked")
- @Override
- protected Enumeration<String> getAttributeNames()
- {
- return session.getAttributeNames();
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#removeAttributes()
- */
- @Override
- protected void removeAttribute(String key)
- {
- session.removeAttribute(key);
- }
-
- /**
- * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#setAttribute()
- */
- @Override
- protected void setAttribute(String key, Object instance)
- {
- session.setAttribute(key, instance);
- }
-
- @Override
- protected NamingScheme getNamingScheme()
- {
- return NAMING_SCHEME;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import java.util.Enumeration;
+
+import javax.servlet.http.HttpSession;
+
+import org.jboss.webbeans.context.SessionContext;
+import org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore;
+import org.jboss.webbeans.context.beanstore.NamingScheme;
+
+/**
+ * A BeanStore that uses a HTTP session as backing storage
+ *
+ * @author Nicklas Karlsson
+ *
+ * @see org.jboss.webbeans.context.AbstractApplicationContext
+ */
+public class HttpSessionBeanStore extends AbstractAttributeBackedBeanStore
+{
+
+ private static final NamingScheme NAMING_SCHEME = new NamingScheme(SessionContext.class.getName(), "#");
+
+ // The HTTP session context to use as backing map
+ private final HttpSession session;
+
+ /**
+ * Constructor
+ *
+ * @param session The HTTP session
+ */
+ public HttpSessionBeanStore(HttpSession session)
+ {
+ super();
+ this.session = session;
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttribute()
+ */
+ @Override
+ protected Object getAttribute(String key)
+ {
+ return session.getAttribute(key);
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#getAttributeNames()
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected Enumeration<String> getAttributeNames()
+ {
+ return session.getAttributeNames();
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#removeAttributes()
+ */
+ @Override
+ protected void removeAttribute(String key)
+ {
+ session.removeAttribute(key);
+ }
+
+ /**
+ * @see org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore#setAttribute()
+ */
+ @Override
+ protected void setAttribute(String key, Object instance)
+ {
+ session.setAttribute(key, instance);
+ }
+
+ @Override
+ protected NamingScheme getNamingScheme()
+ {
+ return NAMING_SCHEME;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionManager.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionManager.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionManager.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,40 +1,40 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Produces;
-import javax.servlet.http.HttpSession;
-
-@RequestScoped
-public class HttpSessionManager
-{
- private HttpSession session;
-
- public void setSession(HttpSession session)
- {
- this.session = session;
- }
-
- @Produces
- @RequestScoped
- public HttpSession getSession()
- {
- return session;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Produces;
+import javax.servlet.http.HttpSession;
+
+@RequestScoped
+public class HttpSessionManager
+{
+ private HttpSession session;
+
+ public void setSession(HttpSession session)
+ {
+ this.session = session;
+ }
+
+ @Produces
+ @RequestScoped
+ public HttpSession getSession()
+ {
+ return session;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionManager.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletHelper.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,168 +1,168 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import static org.jboss.webbeans.servlet.ServletHelper.getModuleBeanManager;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.context.ContextLifecycle;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
-import org.jboss.webbeans.conversation.ConversationManager;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * Implementation of the Web Beans lifecycle that can react to servlet events
- * and drives the Session, Conversation and Request (for Servlet requests)
- * lifecycle
- *
- * @author Pete Muir
- * @author Nicklas Karlsson
- */
-public class ServletLifecycle
-{
-
- private final ContextLifecycle lifecycle;
-
- public static final String REQUEST_ATTRIBUTE_NAME = ServletLifecycle.class.getName() + ".requestBeanStore";
-
- private static LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
-
- /**
- *
- */
- public ServletLifecycle(ContextLifecycle lifecycle)
- {
- this.lifecycle = lifecycle;
- }
-
- /**
- * Begins a session
- *
- * @param session The HTTP session
- */
- public void beginSession(HttpSession session)
- {
- }
-
- /**
- * Ends a session, setting up a mock request if necessary
- *
- * @param session The HTTP session
- */
- public void endSession(HttpSession session)
- {
- ConversationManager conversationManager = getModuleBeanManager(session.getServletContext()).getInstanceByType(ConversationManager.class);
- if (lifecycle.getSessionContext().isActive())
- {
- conversationManager.destroyAllConversations();
- lifecycle.endSession(session.getId(), lifecycle.getSessionContext().getBeanStore());
- }
- else if (lifecycle.getRequestContext().isActive())
- {
- conversationManager.destroyAllConversations();
- lifecycle.endSession(session.getId(), restoreSessionContext(session));
- }
- else
- {
- BeanStore mockRequest = new ConcurrentHashMapBeanStore();
-
- lifecycle.beginRequest("endSession-" + session.getId(), mockRequest);
- BeanStore sessionBeanStore = restoreSessionContext(session);
- conversationManager.destroyAllConversations();
- lifecycle.endSession(session.getId(), sessionBeanStore);
- lifecycle.endRequest("endSession-" + session.getId(), mockRequest);
- }
-
- }
-
- /**
- * Restore the session from the underlying session object. Also allow the
- * session to be injected by the Session manager
- *
- * @param session
- * @return the session bean store
- */
- protected BeanStore restoreSessionContext(HttpServletRequest request)
- {
- BeanStore sessionBeanStore = new HttpRequestSessionBeanStore(request);
- HttpSession session = request.getSession(false);
- lifecycle.restoreSession(session == null ? "Inactive session" : session.getId(), sessionBeanStore);
- if (session != null)
- {
- getModuleBeanManager(session.getServletContext()).getInstanceByType(HttpSessionManager.class).setSession(session);
- }
- return sessionBeanStore;
- }
-
- protected BeanStore restoreSessionContext(HttpSession session)
- {
- BeanStore beanStore = new HttpSessionBeanStore(session);
- lifecycle.restoreSession(session.getId(), beanStore);
- getModuleBeanManager(session.getServletContext()).getInstanceByType(HttpSessionManager.class).setSession(session);
- return beanStore;
- }
-
- /**
- * Begins a HTTP request
- *
- * Sets the session into the session context
- *
- * @param request The request
- */
- public void beginRequest(HttpServletRequest request)
- {
- if (request.getAttribute(REQUEST_ATTRIBUTE_NAME) == null)
- {
- BeanStore beanStore = new ConcurrentHashMapBeanStore();
- request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);
- lifecycle.beginRequest(request.getRequestURI(), beanStore);
- restoreSessionContext(request);
- }
- }
-
- /**
- * Ends a HTTP request
- *
- * @param request The request
- */
- public void endRequest(HttpServletRequest request)
- {
- if (request.getAttribute(REQUEST_ATTRIBUTE_NAME) != null)
- {
- BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
- if (beanStore == null)
- {
- throw new IllegalStateException("Cannot obtain request scoped beans from the request");
- }
- lifecycle.endRequest(request.getRequestURI(), beanStore);
- request.removeAttribute(REQUEST_ATTRIBUTE_NAME);
- lifecycle.getSessionContext().setActive(false);
- lifecycle.getSessionContext().setBeanStore(null);
- }
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import static org.jboss.webbeans.servlet.ServletHelper.getModuleBeanManager;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.webbeans.context.ContextLifecycle;
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
+import org.jboss.webbeans.conversation.ConversationManager;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * Implementation of the Web Beans lifecycle that can react to servlet events
+ * and drives the Session, Conversation and Request (for Servlet requests)
+ * lifecycle
+ *
+ * @author Pete Muir
+ * @author Nicklas Karlsson
+ */
+public class ServletLifecycle
+{
+
+ private final ContextLifecycle lifecycle;
+
+ public static final String REQUEST_ATTRIBUTE_NAME = ServletLifecycle.class.getName() + ".requestBeanStore";
+
+ private static LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
+
+ /**
+ *
+ */
+ public ServletLifecycle(ContextLifecycle lifecycle)
+ {
+ this.lifecycle = lifecycle;
+ }
+
+ /**
+ * Begins a session
+ *
+ * @param session The HTTP session
+ */
+ public void beginSession(HttpSession session)
+ {
+ }
+
+ /**
+ * Ends a session, setting up a mock request if necessary
+ *
+ * @param session The HTTP session
+ */
+ public void endSession(HttpSession session)
+ {
+ ConversationManager conversationManager = getModuleBeanManager(session.getServletContext()).getInstanceByType(ConversationManager.class);
+ if (lifecycle.getSessionContext().isActive())
+ {
+ conversationManager.destroyAllConversations();
+ lifecycle.endSession(session.getId(), lifecycle.getSessionContext().getBeanStore());
+ }
+ else if (lifecycle.getRequestContext().isActive())
+ {
+ conversationManager.destroyAllConversations();
+ lifecycle.endSession(session.getId(), restoreSessionContext(session));
+ }
+ else
+ {
+ BeanStore mockRequest = new ConcurrentHashMapBeanStore();
+
+ lifecycle.beginRequest("endSession-" + session.getId(), mockRequest);
+ BeanStore sessionBeanStore = restoreSessionContext(session);
+ conversationManager.destroyAllConversations();
+ lifecycle.endSession(session.getId(), sessionBeanStore);
+ lifecycle.endRequest("endSession-" + session.getId(), mockRequest);
+ }
+
+ }
+
+ /**
+ * Restore the session from the underlying session object. Also allow the
+ * session to be injected by the Session manager
+ *
+ * @param session
+ * @return the session bean store
+ */
+ protected BeanStore restoreSessionContext(HttpServletRequest request)
+ {
+ BeanStore sessionBeanStore = new HttpRequestSessionBeanStore(request);
+ HttpSession session = request.getSession(false);
+ lifecycle.restoreSession(session == null ? "Inactive session" : session.getId(), sessionBeanStore);
+ if (session != null)
+ {
+ getModuleBeanManager(session.getServletContext()).getInstanceByType(HttpSessionManager.class).setSession(session);
+ }
+ return sessionBeanStore;
+ }
+
+ protected BeanStore restoreSessionContext(HttpSession session)
+ {
+ BeanStore beanStore = new HttpSessionBeanStore(session);
+ lifecycle.restoreSession(session.getId(), beanStore);
+ getModuleBeanManager(session.getServletContext()).getInstanceByType(HttpSessionManager.class).setSession(session);
+ return beanStore;
+ }
+
+ /**
+ * Begins a HTTP request
+ *
+ * Sets the session into the session context
+ *
+ * @param request The request
+ */
+ public void beginRequest(HttpServletRequest request)
+ {
+ if (request.getAttribute(REQUEST_ATTRIBUTE_NAME) == null)
+ {
+ BeanStore beanStore = new ConcurrentHashMapBeanStore();
+ request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);
+ lifecycle.beginRequest(request.getRequestURI(), beanStore);
+ restoreSessionContext(request);
+ }
+ }
+
+ /**
+ * Ends a HTTP request
+ *
+ * @param request The request
+ */
+ public void endRequest(HttpServletRequest request)
+ {
+ if (request.getAttribute(REQUEST_ATTRIBUTE_NAME) != null)
+ {
+ BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
+ if (beanStore == null)
+ {
+ throw new IllegalStateException("Cannot obtain request scoped beans from the request");
+ }
+ lifecycle.endRequest(request.getRequestURI(), beanStore);
+ request.removeAttribute(REQUEST_ATTRIBUTE_NAME);
+ lifecycle.getSessionContext().setActive(false);
+ lifecycle.getSessionContext().setBeanStore(null);
+ }
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,131 +1,131 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.servlet;
-
-import javax.servlet.ServletRequestEvent;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSessionEvent;
-
-import org.jboss.webbeans.Container;
-import org.jboss.webbeans.context.ContextLifecycle;
-import org.jboss.webbeans.servlet.api.helpers.AbstractServletListener;
-
-/**
- * The Web Beans listener
- *
- * Listens for context/session creation/destruction.
- *
- * Delegates work to the ServletLifeCycle.
- *
- * @author Nicklas Karlsson
- *
- */
-public class WebBeansListener extends AbstractServletListener
-{
-
- private ServletLifecycle lifecycle;
-
- private ServletLifecycle getLifecycle()
- {
- if (lifecycle == null)
- {
- this.lifecycle = new ServletLifecycle(Container.instance().deploymentServices().get(ContextLifecycle.class));
- }
- return lifecycle;
- }
-
- /**
- * Called when the session is created
- *
- * @param event The session event
- */
- @Override
- public void sessionCreated(HttpSessionEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- getLifecycle().beginSession(event.getSession());
- }
- }
-
- /**
- * Called when the session is destroyed
- *
- * @param event The session event
- */
- @Override
- public void sessionDestroyed(HttpSessionEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- getLifecycle().endSession(event.getSession());
- }
- }
-
- /**
- * Called when the request is destroyed
- *
- * @param event The request event
- */
- @Override
- public void requestDestroyed(ServletRequestEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- if (event.getServletRequest() instanceof HttpServletRequest)
- {
- getLifecycle().endRequest((HttpServletRequest) event.getServletRequest());
- }
- else
- {
- throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
- }
- }
- }
-
- /**
- * Called when the request is initialized
- *
- * @param event The request event
- */
- @Override
- public void requestInitialized(ServletRequestEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- if (event.getServletRequest() instanceof HttpServletRequest)
- {
- getLifecycle().beginRequest((HttpServletRequest) event.getServletRequest());
- }
- else
- {
- throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
- }
- }
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.servlet;
+
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSessionEvent;
+
+import org.jboss.webbeans.Container;
+import org.jboss.webbeans.context.ContextLifecycle;
+import org.jboss.webbeans.servlet.api.helpers.AbstractServletListener;
+
+/**
+ * The Web Beans listener
+ *
+ * Listens for context/session creation/destruction.
+ *
+ * Delegates work to the ServletLifeCycle.
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public class WebBeansListener extends AbstractServletListener
+{
+
+ private ServletLifecycle lifecycle;
+
+ private ServletLifecycle getLifecycle()
+ {
+ if (lifecycle == null)
+ {
+ this.lifecycle = new ServletLifecycle(Container.instance().deploymentServices().get(ContextLifecycle.class));
+ }
+ return lifecycle;
+ }
+
+ /**
+ * Called when the session is created
+ *
+ * @param event The session event
+ */
+ @Override
+ public void sessionCreated(HttpSessionEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ getLifecycle().beginSession(event.getSession());
+ }
+ }
+
+ /**
+ * Called when the session is destroyed
+ *
+ * @param event The session event
+ */
+ @Override
+ public void sessionDestroyed(HttpSessionEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ getLifecycle().endSession(event.getSession());
+ }
+ }
+
+ /**
+ * Called when the request is destroyed
+ *
+ * @param event The request event
+ */
+ @Override
+ public void requestDestroyed(ServletRequestEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ if (event.getServletRequest() instanceof HttpServletRequest)
+ {
+ getLifecycle().endRequest((HttpServletRequest) event.getServletRequest());
+ }
+ else
+ {
+ throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
+ }
+ }
+ }
+
+ /**
+ * Called when the request is initialized
+ *
+ * @param event The request event
+ */
+ @Override
+ public void requestInitialized(ServletRequestEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ if (event.getServletRequest() instanceof HttpServletRequest)
+ {
+ getLifecycle().beginRequest((HttpServletRequest) event.getServletRequest());
+ }
+ else
+ {
+ throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
+ }
+ }
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Beans.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Names.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Proxies.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Strings.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Types.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/Arrays2.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ConcurrentCache.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ConcurrentCache.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ConcurrentCache.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,187 +1,187 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.util.collections;
-
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-
-import com.google.common.collect.ForwardingMap;
-
-/**
- * Represents a thread safe map
- *
- * @author Pete Muir
- */
-public class ConcurrentCache<K, V> extends ForwardingMap<K, Future<V>>
-{
-
- // The backing map with the value wrapped in a Future instance
- private ConcurrentHashMap<K, Future<V>> map;
-
- /**
- * Constructor
- */
- public ConcurrentCache()
- {
- map = new ConcurrentHashMap<K, Future<V>>();
- }
-
- /**
- * Gets the Future value from the map
- *
- * @param key The key to look for
- * @return The Future instance of the value
- */
-
- public <T extends V> Future<T> getFuture(K key)
- {
- @SuppressWarnings("unchecked")
- Future<T> future = (Future<T>) super.get(key);
- return future;
- }
-
- /**
- * Gets a value from the map. Blocks until it is available
- *
- * @param key The key to look for
- * @return The value
- */
- public <T extends V> T getValue(K key)
- {
- @SuppressWarnings("unchecked")
- Future<T> value = (Future<T>) map.get(key);
- if (value != null)
- {
- boolean interrupted = false;
- try
- {
- while (true)
- {
- try
- {
- return value.get();
- }
- catch (InterruptedException e)
- {
- interrupted = true;
- }
- catch (ExecutionException e)
- {
- rethrow(e);
- }
- }
- }
- finally
- {
- if (interrupted)
- {
- Thread.currentThread().interrupt();
- }
- }
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Adds an item to the map if it's not already there
-
- * @param key The key to place the item under
- * @param callable The item, wrapped in a Callable instance
- * @return The item added
- */
- public <E> E putIfAbsent(K key, Callable<E> callable)
- {
- @SuppressWarnings("unchecked")
- Future<E> future = (Future<E>) map.get(key);
- Future<E> value = future;
- if (value == null)
- {
- FutureTask<E> task = new FutureTask<E>(callable);
- value = task;
- @SuppressWarnings("unchecked")
- Future<V> t = (Future<V>) task;
- map.put(key, t);
- task.run();
- }
- boolean interrupted = false;
- try
- {
- while (true)
- {
- try
- {
- return value.get();
- }
- catch (InterruptedException e)
- {
- interrupted = true;
- }
- catch (ExecutionException e)
- {
- rethrow(e);
- }
- }
- }
- finally
- {
- if (interrupted)
- {
- Thread.currentThread().interrupt();
- }
- }
- }
-
- /**
- * Gets the delegate map
- *
- * @return The backing map
- */
- @Override
- protected Map<K, Future<V>> delegate()
- {
- return map;
- }
-
- /**
- * Examines and re-throws an exception
- *
- * @param e The exception that happened during execution
- */
- protected void rethrow(ExecutionException e)
- {
- if (e.getCause() instanceof RuntimeException)
- {
- throw (RuntimeException) e.getCause();
- }
- else if (e.getCause() instanceof Error)
- {
- throw (Error) e.getCause();
- }
- else
- {
- throw new IllegalStateException(e.getCause());
- }
- }
-
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.util.collections;
+
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+
+import com.google.common.collect.ForwardingMap;
+
+/**
+ * Represents a thread safe map
+ *
+ * @author Pete Muir
+ */
+public class ConcurrentCache<K, V> extends ForwardingMap<K, Future<V>>
+{
+
+ // The backing map with the value wrapped in a Future instance
+ private ConcurrentHashMap<K, Future<V>> map;
+
+ /**
+ * Constructor
+ */
+ public ConcurrentCache()
+ {
+ map = new ConcurrentHashMap<K, Future<V>>();
+ }
+
+ /**
+ * Gets the Future value from the map
+ *
+ * @param key The key to look for
+ * @return The Future instance of the value
+ */
+
+ public <T extends V> Future<T> getFuture(K key)
+ {
+ @SuppressWarnings("unchecked")
+ Future<T> future = (Future<T>) super.get(key);
+ return future;
+ }
+
+ /**
+ * Gets a value from the map. Blocks until it is available
+ *
+ * @param key The key to look for
+ * @return The value
+ */
+ public <T extends V> T getValue(K key)
+ {
+ @SuppressWarnings("unchecked")
+ Future<T> value = (Future<T>) map.get(key);
+ if (value != null)
+ {
+ boolean interrupted = false;
+ try
+ {
+ while (true)
+ {
+ try
+ {
+ return value.get();
+ }
+ catch (InterruptedException e)
+ {
+ interrupted = true;
+ }
+ catch (ExecutionException e)
+ {
+ rethrow(e);
+ }
+ }
+ }
+ finally
+ {
+ if (interrupted)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Adds an item to the map if it's not already there
+
+ * @param key The key to place the item under
+ * @param callable The item, wrapped in a Callable instance
+ * @return The item added
+ */
+ public <E> E putIfAbsent(K key, Callable<E> callable)
+ {
+ @SuppressWarnings("unchecked")
+ Future<E> future = (Future<E>) map.get(key);
+ Future<E> value = future;
+ if (value == null)
+ {
+ FutureTask<E> task = new FutureTask<E>(callable);
+ value = task;
+ @SuppressWarnings("unchecked")
+ Future<V> t = (Future<V>) task;
+ map.put(key, t);
+ task.run();
+ }
+ boolean interrupted = false;
+ try
+ {
+ while (true)
+ {
+ try
+ {
+ return value.get();
+ }
+ catch (InterruptedException e)
+ {
+ interrupted = true;
+ }
+ catch (ExecutionException e)
+ {
+ rethrow(e);
+ }
+ }
+ }
+ finally
+ {
+ if (interrupted)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+
+ /**
+ * Gets the delegate map
+ *
+ * @return The backing map
+ */
+ @Override
+ protected Map<K, Future<V>> delegate()
+ {
+ return map;
+ }
+
+ /**
+ * Examines and re-throws an exception
+ *
+ * @param e The exception that happened during execution
+ */
+ protected void rethrow(ExecutionException e)
+ {
+ if (e.getCause() instanceof RuntimeException)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ else if (e.getCause() instanceof Error)
+ {
+ throw (Error) e.getCause();
+ }
+ else
+ {
+ throw new IllegalStateException(e.getCause());
+ }
+ }
+
}
\ No newline at end of file
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ConcurrentCache.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/EnumerationList.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/ListComparator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterable.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterable.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterable.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,39 +1,39 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.util.dom;
-
-import java.util.Iterator;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class NodeListIterable implements Iterable<Node>
-!
{
-
- private final NodeList nodeList;
-
- public NodeListIterable(NodeList nodeList)
- {
- this.nodeList = nodeList;
- }
-
- public Iterator<Node> iterator()
- {
- return new NodeListIterator(nodeList);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.util.dom;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class NodeListIterable implements Iterable<Node>
+{
+
+ private final NodeList nodeList;
+
+ public NodeListIterable(NodeList nodeList)
+ {
+ this.nodeList = nodeList;
+ }
+
+ public Iterator<Node> iterator()
+ {
+ return new NodeListIterator(nodeList);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterator.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterator.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,52 +1,52 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.util.dom;
-
-import java.util.Iterator;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class NodeListIterator implements Iterator<Node>
-!
{
-
- private final NodeList nodeList;
- private int index;
-
- public NodeListIterator(NodeList nodeList)
- {
- this.nodeList = nodeList;
- index = 0;
- }
-
- public boolean hasNext()
- {
- return index < nodeList.getLength() - 1;
- }
-
- public Node next()
- {
- index++;
- return nodeList.item(index);
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException("XML DOM is readonly");
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.util.dom;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class NodeListIterator implements Iterator<Node>
+{
+
+ private final NodeList nodeList;
+ private int index;
+
+ public NodeListIterator(NodeList nodeList)
+ {
+ this.nodeList = nodeList;
+ index = 0;
+ }
+
+ public boolean hasNext()
+ {
+ return index < nodeList.getLength() - 1;
+ }
+
+ public Node next()
+ {
+ index++;
+ return nodeList.item(index);
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException("XML DOM is readonly");
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/dom/NodeListIterator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingELContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingELResolver.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingExpressionFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingMethodExpression.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/el/ForwardingValueExpression.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/reflection/ParameterizedTypeImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/serviceProvider/ServiceLoader.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/ws/WSApiAbstraction.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/BeansXmlParser.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/BeansXmlParser.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/BeansXmlParser.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,272 +1,272 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.xml;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.net.URL;
-import java.util.ArrayList;
-!
import java.util.Collections;
-import java.util.List;
-
-import javax.enterprise.inject.InjectionException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.webbeans.DeploymentException;
-import org.jboss.webbeans.resources.spi.ResourceLoader;
-import org.jboss.webbeans.resources.spi.ResourceLoadingException;
-import org.jboss.webbeans.util.dom.NodeListIterable;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-import org.xml.sax.SAXException;
-
-/**
- * Simple parser for beans.xml
- *
- * @author Pete Muir
- *
- */
-public class BeansXmlParser
-{
-
- private static class XmlElement
- {
- private URL file;
- private Element element;
-
- public XmlElement(URL file, Element element)
- {
- super();
- this.file = file;
- this.element = elemen!
t;
- }
-
- public URL getFile()
- {
- !
ret
urn file;
- }
-
- public Element getElement()
- {
- return element;
- }
-
- @Override
- public String toString()
- {
- return "File: " + getFile() + "; Node: " + getElement();
- }
-
- }
-
- private final Iterable<URL> beansXml;
- private final ResourceLoader resourceLoader;
-
- private List<Class<? extends Annotation>> enabledPolicyStereotypes;
- private List<Class<?>> enabledPolicyClasses;
- private List<Class<?>> enabledDecoratorClasses;
- private List<Class<?>> enabledInterceptorClasses;
-
- public List<Class<?>> getEnabledPolicyClasses()
- {
- return enabledPolicyClasses;
- }
-
- public List<Class<? extends Annotation>> getEnabledPolicyStereotypes()
- {
- return enabledPolicyStereotypes;
- }
-
- public List<Class<?>> getEnabledDecoratorClasses()
- {
- return enabledDecoratorClasses;
- }
-
- public List<Class<?>> getEnabledIntercepto!
rClasses()
- {
- return enabledInterceptorClasses;
- }
-
- public BeansXmlParser(ResourceLoader resourceLoader, Iterable<URL> beansXml)
- {
- this.beansXml = beansXml;
- this.resourceLoader = resourceLoader;
- }
-
- public void parse()
- {
- DocumentBuilder documentBuilder;
- try
- {
- documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
- catch (ParserConfigurationException e)
- {
- throw new InjectionException("Error configuring XML parser", e);
- }
- List<XmlElement> policiesElements = new ArrayList<XmlElement>();
- List<XmlElement> decoratorsElements = new ArrayList<XmlElement>();
- List<XmlElement> interceptorsElements = new ArrayList<XmlElement>();
- for (URL url : beansXml)
- {
- InputStream is;
- boolean fileHasContents;
- try
- {
- is = url.openStream();
- fileHasContents !
= is.available() > 0;
- }
- catch (IOException!
e)
-
{
- throw new InjectionException("Error loading beans.xml " + url.toString(), e);
- }
- if (fileHasContents)
- {
- Document document;
- try
- {
- document = documentBuilder.parse(is);
- document.normalize();
- }
- catch (SAXException e)
- {
- throw new DeploymentException("Error parsing beans.xml " + url.toString(), e);
- }
- catch (IOException e)
- {
- throw new DeploymentException("Error loading beans.xml " + url.toString(), e);
- }
- Element beans = document.getDocumentElement();
- for (Node child : new NodeListIterable(beans.getChildNodes()))
- {
- if (child instanceof Element && "alternatives".equals(child.getNodeName()))
- {
- policiesElements.add(new XmlElement(url, (Element) child));
- !
}
- if (child instanceof Element && "interceptors".equals(child.getNodeName()))
- {
- interceptorsElements.add(new XmlElement(url, (Element) child));
- }
-
- if (child instanceof Element && "decorators".equals(child.getNodeName()))
- {
- decoratorsElements.add(new XmlElement(url, (Element) child));
- }
- }
- }
- }
-
- if (policiesElements.size() > 1)
- {
- throw new DeploymentException("<alternatives> can only be specified once, but it is specified muliple times " + policiesElements);
- }
- else if (policiesElements.size() == 1)
- {
- enabledPolicyStereotypes = new ArrayList<Class<? extends Annotation>>();
- enabledPolicyClasses = new ArrayList<Class<?>>();
- processPolicyElement(resourceLoader, policiesElements.get(0), enabledPolicyClasses, enabledPolicyStere!
otypes);
- }
-
- if (decoratorsElements.size()!
> 1)
-
{
- throw new DeploymentException("<decorator> can only be specified once, but it is specified muliple times " + decoratorsElements);
- }
- else if (decoratorsElements.size() == 1)
- {
- enabledDecoratorClasses = new ArrayList<Class<?>>();
- enabledDecoratorClasses.addAll(processElement(resourceLoader, decoratorsElements.get(0)));
- }
-
- if (interceptorsElements.size() > 1)
- {
- throw new DeploymentException("<interceptor> can only be specified once, but it is specified muliple times " + interceptorsElements);
- }
- else if (interceptorsElements.size() == 1)
- {
- enabledInterceptorClasses = new ArrayList<Class<?>>();
- enabledInterceptorClasses.addAll(processElement(resourceLoader, interceptorsElements.get(0)));
- }
-
- }
-
- private static void processPolicyElement(ResourceLoader resourceLoader, XmlElement element, List<Class<?>> enabledPolicyClasses,!
List<Class<? extends Annotation>> enabledPolicyStereotypes)
- {
- for (Node child : new NodeListIterable(element.getElement().getChildNodes()))
- {
- String className = processNode(child);
- if (className != null)
- {
- try
- {
- Class<?> clazz = resourceLoader.classForName(className);
- if (clazz.isAnnotation())
- {
- enabledPolicyStereotypes.add(clazz.asSubclass(Annotation.class));
- }
- else
- {
- enabledPolicyClasses.add(clazz);
- }
- }
- catch (ResourceLoadingException e)
- {
- throw new DeploymentException("Cannot load class " + className + " defined in " + element.getFile().toString());
- }
- }
- }
- }
-
- private static String processNode(Node node)
- {
- if (node instanceof Element)
- {
- !
if (node.getChildNodes().getLength() == 1 && node.getC!
hildNode
s().item(0) instanceof Text)
- {
- String className = ((Text) node.getChildNodes().item(0)).getData();
- return className;
- }
- }
- return null;
- }
-
- private static List<Class<?>> processElement(ResourceLoader resourceLoader, XmlElement element)
- {
- List<Class<?>> list = new ArrayList<Class<?>>();
- for (Node child : new NodeListIterable(element.getElement().getChildNodes()))
- {
- String className = processNode(child);
- if (className != null)
- {
- try
- {
- list.add(resourceLoader.classForName(className));
- }
- catch (ResourceLoadingException e)
- {
- throw new DeploymentException("Cannot load class " + className + " defined in " + element.getFile().toString());
- }
- }
- }
- return list;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.enterprise.inject.InjectionException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.webbeans.DeploymentException;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.resources.spi.ResourceLoadingException;
+import org.jboss.webbeans.util.dom.NodeListIterable;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+import org.xml.sax.SAXException;
+
+/**
+ * Simple parser for beans.xml
+ *
+ * @author Pete Muir
+ *
+ */
+public class BeansXmlParser
+{
+
+ private static class XmlElement
+ {
+ private URL file;
+ private Element element;
+
+ public XmlElement(URL file, Element element)
+ {
+ super();
+ this.file = file;
+ this.element = element;
+ }
+
+ public URL getFile()
+ {
+ return file;
+ }
+
+ public Element getElement()
+ {
+ return element;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "File: " + getFile() + "; Node: " + getElement();
+ }
+
+ }
+
+ private final Iterable<URL> beansXml;
+ private final ResourceLoader resourceLoader;
+
+ private List<Class<? extends Annotation>> enabledPolicyStereotypes;
+ private List<Class<?>> enabledPolicyClasses;
+ private List<Class<?>> enabledDecoratorClasses;
+ private List<Class<?>> enabledInterceptorClasses;
+
+ public List<Class<?>> getEnabledPolicyClasses()
+ {
+ return enabledPolicyClasses;
+ }
+
+ public List<Class<? extends Annotation>> getEnabledPolicyStereotypes()
+ {
+ return enabledPolicyStereotypes;
+ }
+
+ public List<Class<?>> getEnabledDecoratorClasses()
+ {
+ return enabledDecoratorClasses;
+ }
+
+ public List<Class<?>> getEnabledInterceptorClasses()
+ {
+ return enabledInterceptorClasses;
+ }
+
+ public BeansXmlParser(ResourceLoader resourceLoader, Iterable<URL> beansXml)
+ {
+ this.beansXml = beansXml;
+ this.resourceLoader = resourceLoader;
+ }
+
+ public void parse()
+ {
+ DocumentBuilder documentBuilder;
+ try
+ {
+ documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new InjectionException("Error configuring XML parser", e);
+ }
+ List<XmlElement> policiesElements = new ArrayList<XmlElement>();
+ List<XmlElement> decoratorsElements = new ArrayList<XmlElement>();
+ List<XmlElement> interceptorsElements = new ArrayList<XmlElement>();
+ for (URL url : beansXml)
+ {
+ InputStream is;
+ boolean fileHasContents;
+ try
+ {
+ is = url.openStream();
+ fileHasContents = is.available() > 0;
+ }
+ catch (IOException e)
+ {
+ throw new InjectionException("Error loading beans.xml " + url.toString(), e);
+ }
+ if (fileHasContents)
+ {
+ Document document;
+ try
+ {
+ document = documentBuilder.parse(is);
+ document.normalize();
+ }
+ catch (SAXException e)
+ {
+ throw new DeploymentException("Error parsing beans.xml " + url.toString(), e);
+ }
+ catch (IOException e)
+ {
+ throw new DeploymentException("Error loading beans.xml " + url.toString(), e);
+ }
+ Element beans = document.getDocumentElement();
+ for (Node child : new NodeListIterable(beans.getChildNodes()))
+ {
+ if (child instanceof Element && "alternatives".equals(child.getNodeName()))
+ {
+ policiesElements.add(new XmlElement(url, (Element) child));
+ }
+ if (child instanceof Element && "interceptors".equals(child.getNodeName()))
+ {
+ interceptorsElements.add(new XmlElement(url, (Element) child));
+ }
+
+ if (child instanceof Element && "decorators".equals(child.getNodeName()))
+ {
+ decoratorsElements.add(new XmlElement(url, (Element) child));
+ }
+ }
+ }
+ }
+
+ if (policiesElements.size() > 1)
+ {
+ throw new DeploymentException("<alternatives> can only be specified once, but it is specified muliple times " + policiesElements);
+ }
+ else if (policiesElements.size() == 1)
+ {
+ enabledPolicyStereotypes = new ArrayList<Class<? extends Annotation>>();
+ enabledPolicyClasses = new ArrayList<Class<?>>();
+ processPolicyElement(resourceLoader, policiesElements.get(0), enabledPolicyClasses, enabledPolicyStereotypes);
+ }
+
+ if (decoratorsElements.size() > 1)
+ {
+ throw new DeploymentException("<decorator> can only be specified once, but it is specified muliple times " + decoratorsElements);
+ }
+ else if (decoratorsElements.size() == 1)
+ {
+ enabledDecoratorClasses = new ArrayList<Class<?>>();
+ enabledDecoratorClasses.addAll(processElement(resourceLoader, decoratorsElements.get(0)));
+ }
+
+ if (interceptorsElements.size() > 1)
+ {
+ throw new DeploymentException("<interceptor> can only be specified once, but it is specified muliple times " + interceptorsElements);
+ }
+ else if (interceptorsElements.size() == 1)
+ {
+ enabledInterceptorClasses = new ArrayList<Class<?>>();
+ enabledInterceptorClasses.addAll(processElement(resourceLoader, interceptorsElements.get(0)));
+ }
+
+ }
+
+ private static void processPolicyElement(ResourceLoader resourceLoader, XmlElement element, List<Class<?>> enabledPolicyClasses, List<Class<? extends Annotation>> enabledPolicyStereotypes)
+ {
+ for (Node child : new NodeListIterable(element.getElement().getChildNodes()))
+ {
+ String className = processNode(child);
+ if (className != null)
+ {
+ try
+ {
+ Class<?> clazz = resourceLoader.classForName(className);
+ if (clazz.isAnnotation())
+ {
+ enabledPolicyStereotypes.add(clazz.asSubclass(Annotation.class));
+ }
+ else
+ {
+ enabledPolicyClasses.add(clazz);
+ }
+ }
+ catch (ResourceLoadingException e)
+ {
+ throw new DeploymentException("Cannot load class " + className + " defined in " + element.getFile().toString());
+ }
+ }
+ }
+ }
+
+ private static String processNode(Node node)
+ {
+ if (node instanceof Element)
+ {
+ if (node.getChildNodes().getLength() == 1 && node.getChildNodes().item(0) instanceof Text)
+ {
+ String className = ((Text) node.getChildNodes().item(0)).getData();
+ return className;
+ }
+ }
+ return null;
+ }
+
+ private static List<Class<?>> processElement(ResourceLoader resourceLoader, XmlElement element)
+ {
+ List<Class<?>> list = new ArrayList<Class<?>>();
+ for (Node child : new NodeListIterable(element.getElement().getChildNodes()))
+ {
+ String className = processNode(child);
+ if (className != null)
+ {
+ try
+ {
+ list.add(resourceLoader.classForName(className));
+ }
+ catch (ResourceLoadingException e)
+ {
+ throw new DeploymentException("Cannot load class " + className + " defined in " + element.getFile().toString());
+ }
+ }
+ }
+ return list;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/BeansXmlParser.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AbstractProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Any.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/BeanDisambiguator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Plain.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Spare.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedCallable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedConstructor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedMember.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedParameter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/jboss-as/build.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/jboss-as/build.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/jboss-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/jboss-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/jboss-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,2 +1,2 @@
-org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.servlet.ServletTestLauncher
-org.jboss.testharness.container.deploymentExceptionTransformer=org.jboss.webbeans.tck.jbossas.WebBeansProfileServiceDeploymentExceptionTransformer
+org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.servlet.ServletTestLauncher
+org.jboss.testharness.container.deploymentExceptionTransformer=org.jboss.webbeans.tck.jbossas.WebBeansProfileServiceDeploymentExceptionTransformer
Property changes on: ri/trunk/jboss-tck-runner/src/main/resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/jboss-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/jboss-tck-runner/src/test/java/org/jboss/webbeans/tck/jbossas/WebBeansProfileServiceDeploymentExceptionTransformer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/jboss-tck-runner/src/test/resources/jndi.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/lib/maven/LICENSE.txt
===================================================================
--- ri/trunk/lib/maven/LICENSE.txt 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/lib/maven/LICENSE.txt 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,202 +1,202 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Property changes on: ri/trunk/lib/maven/LICENSE.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/lib/maven/NOTICE.txt
===================================================================
--- ri/trunk/lib/maven/NOTICE.txt 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/lib/maven/NOTICE.txt 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,11 +1,11 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Maven distribution. ==
- =========================================================================
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes software (Plexus and Classworlds) developed by
-The Codehaus Foundation (http://www.codehaus.org/).
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Maven distribution. ==
+ =========================================================================
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software (Plexus and Classworlds) developed by
+The Codehaus Foundation (http://www.codehaus.org/).
Property changes on: ri/trunk/lib/maven/NOTICE.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/lib/maven/README.txt
===================================================================
--- ri/trunk/lib/maven/README.txt 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/lib/maven/README.txt 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,78 +1,78 @@
-
- Apache Maven
-
- What is it?
- -----------
-
- Maven is a software project management and comprehension tool. Based on
- the concept of a Project Object Model (POM), Maven can manage a project's
- build, reporting and documentation from a central piece of information.
-
- Documentation
- -------------
-
- The documentation available as of the date of this release is included in
- HTML format in the docs/ directory.
- The most up-to-date documentation can be found at http://maven.apache.org/.
-
- Release Notes
- -------------
-
- The full list of changes can be found at http://maven.apache.org/release-notes.html.
-
- System Requirements
- -------------------
-
- JDK:
- 1.4 or above (this is to execute Maven - it still allows you to build against 1.3
- and prior JDK's).
- Memory:
- No minimum requirement.
- Disk:
- No minimum requirement. Approximately 100MB will be used for your local repository,
- however this will vary depending on usage and can be removed and redownloaded at
- any time.
- Operating System:
- No minimum requirement. On Windows, Windows NT and above or Cygwin is required for
- the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.
-
- Installing Maven
- ----------------
-
- 1) Unpack the archive where you would like to store the binaries, eg:
-
- Unix-based Operating Systems (Linux, Solaris and Mac OS X)
- tar zxvf apache-maven-2.0.x.tar.gz
- Windows 2000/XP
- unzip apache-maven-2.0.x.zip
-
- 2) A directory called "apache-maven-2.0.x" will be created.
-
- 3) Add the bin directory to your PATH, eg:
-
- Unix-based Operating Systems (Linux, Solaris and Mac OS X)
- export PATH=/usr/local/apache-maven-2.0.x/bin:$PATH
- Windows 2000/XP
- set PATH="c:\program files\apache-maven-2.0.x\bin";%PATH%
-
- 4) Make sure JAVA_HOME is set to the location of your JDK
-
- 5) Run "mvn --version" to verify that it is correctly installed.
-
- For complete documentation, see http://maven.apache.org/download.html#Installation
-
- Licensing
- ---------
-
- Please see the file called LICENSE.TXT
-
- Maven URLS
- ----------
-
- Home Page: http://maven.apache.org/
- Downloads: http://maven.apache.org/downloads.html
- Mailing Lists: http://maven.apache.org/mail-lists.html
- Source Code: http://svn.apache.org/repos/asf/maven/
- Issue Tracking: http://jira.codehaus.org/browse/MNG
- Wiki: http://docs.codehaus.org/display/MAVENUSER/
- Available Plugins: http://maven.apache.org/plugins/index.html
+
+ Apache Maven
+
+ What is it?
+ -----------
+
+ Maven is a software project management and comprehension tool. Based on
+ the concept of a Project Object Model (POM), Maven can manage a project's
+ build, reporting and documentation from a central piece of information.
+
+ Documentation
+ -------------
+
+ The documentation available as of the date of this release is included in
+ HTML format in the docs/ directory.
+ The most up-to-date documentation can be found at http://maven.apache.org/.
+
+ Release Notes
+ -------------
+
+ The full list of changes can be found at http://maven.apache.org/release-notes.html.
+
+ System Requirements
+ -------------------
+
+ JDK:
+ 1.4 or above (this is to execute Maven - it still allows you to build against 1.3
+ and prior JDK's).
+ Memory:
+ No minimum requirement.
+ Disk:
+ No minimum requirement. Approximately 100MB will be used for your local repository,
+ however this will vary depending on usage and can be removed and redownloaded at
+ any time.
+ Operating System:
+ No minimum requirement. On Windows, Windows NT and above or Cygwin is required for
+ the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.
+
+ Installing Maven
+ ----------------
+
+ 1) Unpack the archive where you would like to store the binaries, eg:
+
+ Unix-based Operating Systems (Linux, Solaris and Mac OS X)
+ tar zxvf apache-maven-2.0.x.tar.gz
+ Windows 2000/XP
+ unzip apache-maven-2.0.x.zip
+
+ 2) A directory called "apache-maven-2.0.x" will be created.
+
+ 3) Add the bin directory to your PATH, eg:
+
+ Unix-based Operating Systems (Linux, Solaris and Mac OS X)
+ export PATH=/usr/local/apache-maven-2.0.x/bin:$PATH
+ Windows 2000/XP
+ set PATH="c:\program files\apache-maven-2.0.x\bin";%PATH%
+
+ 4) Make sure JAVA_HOME is set to the location of your JDK
+
+ 5) Run "mvn --version" to verify that it is correctly installed.
+
+ For complete documentation, see http://maven.apache.org/download.html#Installation
+
+ Licensing
+ ---------
+
+ Please see the file called LICENSE.TXT
+
+ Maven URLS
+ ----------
+
+ Home Page: http://maven.apache.org/
+ Downloads: http://maven.apache.org/downloads.html
+ Mailing Lists: http://maven.apache.org/mail-lists.html
+ Source Code: http://svn.apache.org/repos/asf/maven/
+ Issue Tracking: http://jira.codehaus.org/browse/MNG
+ Wiki: http://docs.codehaus.org/display/MAVENUSER/
+ Available Plugins: http://maven.apache.org/plugins/index.html
Property changes on: ri/trunk/lib/maven/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/JDKProvider.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/JDKProvider.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/JDKProvider.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,156 +1,156 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.log;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- *
- * @author Gavin King
- *
- */
-class JDKProvider implements LogProvider
-{
- private final Logger logger;
- private final boolean isWrapped;
-
- JDKProvider(String category, boolean wrapped)
- {
- this.logger = Logger.getLogger(category);
- this.isWrapped = wrapped;
- }
-
- private void log(Level level, Object object, Throwable ex)
- {
-
- if (logger.isLoggable(level))
- {
- Throwable dummyException = new Throwable();
- StackTraceElement locations[] = dummyException.getStackTrace();
- String className = "unknown";
- String methodName = "unknown";
- int depth = isWrapped ? 3 : 2;
- if (locations != null && locations.length > depth)
- {
- StackTraceElement caller = locations[depth];
- className = caller.getClassName();
- methodName = caller.getMethodName();
- }
- if (ex == null)
- {
- logger.logp(level, className, methodName, String.valueOf(object));
- }
- else
- {
- logger.logp(level, className, methodName, String.valueOf(object), ex);
- }
- }
-
- }
-
- public void debug(Object object, Throwable t)
- {
- log(Level.FINE, object, t);
- }
-
- public void debug(Object object)
- {
- log(Level.FINE, object, null);
- }
-
- public void error(Object object, Throwable t)
- {
- log(Level.SEVERE, object, t);
- }
-
- public void error(Object object)
- {
- log(Level.SEVERE, object, null);
- }
-
- public void fatal(Object object, Throwable t)
- {
- log(Level.SEVERE, object, t);
- }
-
- public void fatal(Object object)
- {
- log(Level.SEVERE, object, null);
- }
-
- public void info(Object object, Throwable t)
- {
- log(Level.INFO, object, t);
- }
-
- public void info(Object object)
- {
- log(Level.INFO, object, null);
- }
-
- public boolean isDebugEnabled()
- {
- return logger.isLoggable(Level.FINE);
- }
-
- public boolean isErrorEnabled()
- {
- return logger.isLoggable(Level.SEVERE);
- }
-
- public boolean isFatalEnabled()
- {
- return logger.isLoggable(Level.SEVERE);
- }
-
- public boolean isInfoEnabled()
- {
- return logger.isLoggable(Level.INFO);
- }
-
- public boolean isTraceEnabled()
- {
- return logger.isLoggable(Level.FINER);
- }
-
- public boolean isWarnEnabled()
- {
- return logger.isLoggable(Level.WARNING);
- }
-
- public void trace(Object object, Throwable t)
- {
- log(Level.FINER, object, t);
- }
-
- public void trace(Object object)
- {
- log(Level.FINER, object, null);
- }
-
- public void warn(Object object, Throwable t)
- {
- log(Level.WARNING, object, t);
- }
-
- public void warn(Object object)
- {
- log(Level.WARNING, object, null);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.log;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ *
+ * @author Gavin King
+ *
+ */
+class JDKProvider implements LogProvider
+{
+ private final Logger logger;
+ private final boolean isWrapped;
+
+ JDKProvider(String category, boolean wrapped)
+ {
+ this.logger = Logger.getLogger(category);
+ this.isWrapped = wrapped;
+ }
+
+ private void log(Level level, Object object, Throwable ex)
+ {
+
+ if (logger.isLoggable(level))
+ {
+ Throwable dummyException = new Throwable();
+ StackTraceElement locations[] = dummyException.getStackTrace();
+ String className = "unknown";
+ String methodName = "unknown";
+ int depth = isWrapped ? 3 : 2;
+ if (locations != null && locations.length > depth)
+ {
+ StackTraceElement caller = locations[depth];
+ className = caller.getClassName();
+ methodName = caller.getMethodName();
+ }
+ if (ex == null)
+ {
+ logger.logp(level, className, methodName, String.valueOf(object));
+ }
+ else
+ {
+ logger.logp(level, className, methodName, String.valueOf(object), ex);
+ }
+ }
+
+ }
+
+ public void debug(Object object, Throwable t)
+ {
+ log(Level.FINE, object, t);
+ }
+
+ public void debug(Object object)
+ {
+ log(Level.FINE, object, null);
+ }
+
+ public void error(Object object, Throwable t)
+ {
+ log(Level.SEVERE, object, t);
+ }
+
+ public void error(Object object)
+ {
+ log(Level.SEVERE, object, null);
+ }
+
+ public void fatal(Object object, Throwable t)
+ {
+ log(Level.SEVERE, object, t);
+ }
+
+ public void fatal(Object object)
+ {
+ log(Level.SEVERE, object, null);
+ }
+
+ public void info(Object object, Throwable t)
+ {
+ log(Level.INFO, object, t);
+ }
+
+ public void info(Object object)
+ {
+ log(Level.INFO, object, null);
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return logger.isLoggable(Level.FINE);
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return logger.isLoggable(Level.SEVERE);
+ }
+
+ public boolean isFatalEnabled()
+ {
+ return logger.isLoggable(Level.SEVERE);
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return logger.isLoggable(Level.INFO);
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return logger.isLoggable(Level.FINER);
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return logger.isLoggable(Level.WARNING);
+ }
+
+ public void trace(Object object, Throwable t)
+ {
+ log(Level.FINER, object, t);
+ }
+
+ public void trace(Object object)
+ {
+ log(Level.FINER, object, null);
+ }
+
+ public void warn(Object object, Throwable t)
+ {
+ log(Level.WARNING, object, t);
+ }
+
+ public void warn(Object object)
+ {
+ log(Level.WARNING, object, null);
+ }
+
+}
Property changes on: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/JDKProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,102 +1,102 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.log;
-
-/**
- * <p>A <code>Log</code> object is used by RI classes to log messages.
- * They will be logged in any environment that has setup a logging service
- * such as Log4J or the standard JDK logging facilities. In fact, this
- * logging interface is very similar to the other facilities with the
- * difference that logging methods also take any number of optional
- * parameters beyond the message object for later interpolation
- * into the message.</p>
- *
- * <p>The idea of using interpolation parameters is very important for
- * performance reasons in production code. Normally developers write
- * logging messages similar to this one:
- * <pre>
- * log.debug("Started processing of " + obj1 + " with action " + obj2);
- * </pre>
- * The problem that arises at runtime in production systems, is that DEBUG
- * level logging may not be enabled. And even if this logging is going to
- * be a no-op call, Java must still build the string dynamically that is the
- * argument to the call. It is the building of this string that can be quite
- * time consuming. The more complex the objects being concatenated are, the
- * worse the time penalty incurred is. And this time is completely wasted
- * since the string may never be used.</p>
- *
- * <p>Normally to combat the problem of making this call and building the
- * string dynamically, the developer uses a conditional statement to invoke
- * the call only if the corresponding logging level is enabled. So the above
- * call may end up looking like:
- * <pre>
- * if (log.isDebugEnabled())
- * {
- * log.debug("Started processing of " + obj1 + " with action " + obj2);
- * }
- * </pre>
- * Ideally, this structure should always be used to avoid the cost of building the
- * dynamic string (concatenation) and making the unnecessary call. The only
- * drawback to this is that code can become less readable. In some cases, there
- * might be more code devoted to logging than the actual behavior required by a
- * method.</p>
- *
- * <p>A cleaner way to do the logging is to use this interface where simple
- * objects without any concatenation are passed as arguments. Albeit the call
- * itself may still be a no-op when the logging level is not enabled, this is
- * still much smaller than the concatenation process with dynamic strings. Each
- * of the methods defined here will first check to see if the logging level is enabled,
- * if that feature exists in the underlying logging system. If and only if that logging
- * level is enabled, will the implementation proceed with concatenation of the strings
- * and objects passed. So the above code using this interface becomes:
- * <pre>
- * log.debug("Started processing of {0} with action {1}, obj1, obj2);
- * </pre>
- * </p>
- *
- * <p>The interpolation of parameters into the message string are done using
- * {@link java.text.MessageFormat}. See the documentation on that class for
- * more ideas of interpolation possibilities. In the above code, <code>obj1</code>
- * and <code>obj2</code> simply have their <code>toString()</code> methods invoked
- * to produce a string which is then concatenated.</p>
- *
- * @author Gavin King
- * @author David Allen
- *
- */
-public interface Log
-{
- public boolean isDebugEnabled();
- public boolean isErrorEnabled();
- public boolean isFatalEnabled();
- public boolean isInfoEnabled();
- public boolean isTraceEnabled();
- public boolean isWarnEnabled();
- public void trace(Object object, Object... params);
- public void trace(Object object, Throwable t, Object... params);
- public void debug(Object object, Object... params);
- public void debug(Object object, Throwable t, Object... params);
- public void info(Object object, Object... params);
- public void info(Object object, Throwable t, Object... params);
- public void warn(Object object, Object... params);
- public void warn(Object object, Throwable t, Object... params);
- public void error(Object object, Object... params);
- public void error(Object object, Throwable t, Object... params);
- public void fatal(Object object, Object... params);
- public void fatal(Object object, Throwable t, Object... params);
-
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.log;
+
+/**
+ * <p>A <code>Log</code> object is used by RI classes to log messages.
+ * They will be logged in any environment that has setup a logging service
+ * such as Log4J or the standard JDK logging facilities. In fact, this
+ * logging interface is very similar to the other facilities with the
+ * difference that logging methods also take any number of optional
+ * parameters beyond the message object for later interpolation
+ * into the message.</p>
+ *
+ * <p>The idea of using interpolation parameters is very important for
+ * performance reasons in production code. Normally developers write
+ * logging messages similar to this one:
+ * <pre>
+ * log.debug("Started processing of " + obj1 + " with action " + obj2);
+ * </pre>
+ * The problem that arises at runtime in production systems, is that DEBUG
+ * level logging may not be enabled. And even if this logging is going to
+ * be a no-op call, Java must still build the string dynamically that is the
+ * argument to the call. It is the building of this string that can be quite
+ * time consuming. The more complex the objects being concatenated are, the
+ * worse the time penalty incurred is. And this time is completely wasted
+ * since the string may never be used.</p>
+ *
+ * <p>Normally to combat the problem of making this call and building the
+ * string dynamically, the developer uses a conditional statement to invoke
+ * the call only if the corresponding logging level is enabled. So the above
+ * call may end up looking like:
+ * <pre>
+ * if (log.isDebugEnabled())
+ * {
+ * log.debug("Started processing of " + obj1 + " with action " + obj2);
+ * }
+ * </pre>
+ * Ideally, this structure should always be used to avoid the cost of building the
+ * dynamic string (concatenation) and making the unnecessary call. The only
+ * drawback to this is that code can become less readable. In some cases, there
+ * might be more code devoted to logging than the actual behavior required by a
+ * method.</p>
+ *
+ * <p>A cleaner way to do the logging is to use this interface where simple
+ * objects without any concatenation are passed as arguments. Albeit the call
+ * itself may still be a no-op when the logging level is not enabled, this is
+ * still much smaller than the concatenation process with dynamic strings. Each
+ * of the methods defined here will first check to see if the logging level is enabled,
+ * if that feature exists in the underlying logging system. If and only if that logging
+ * level is enabled, will the implementation proceed with concatenation of the strings
+ * and objects passed. So the above code using this interface becomes:
+ * <pre>
+ * log.debug("Started processing of {0} with action {1}, obj1, obj2);
+ * </pre>
+ * </p>
+ *
+ * <p>The interpolation of parameters into the message string are done using
+ * {@link java.text.MessageFormat}. See the documentation on that class for
+ * more ideas of interpolation possibilities. In the above code, <code>obj1</code>
+ * and <code>obj2</code> simply have their <code>toString()</code> methods invoked
+ * to produce a string which is then concatenated.</p>
+ *
+ * @author Gavin King
+ * @author David Allen
+ *
+ */
+public interface Log
+{
+ public boolean isDebugEnabled();
+ public boolean isErrorEnabled();
+ public boolean isFatalEnabled();
+ public boolean isInfoEnabled();
+ public boolean isTraceEnabled();
+ public boolean isWarnEnabled();
+ public void trace(Object object, Object... params);
+ public void trace(Object object, Throwable t, Object... params);
+ public void debug(Object object, Object... params);
+ public void debug(Object object, Throwable t, Object... params);
+ public void info(Object object, Object... params);
+ public void info(Object object, Throwable t, Object... params);
+ public void warn(Object object, Object... params);
+ public void warn(Object object, Throwable t, Object... params);
+ public void error(Object object, Object... params);
+ public void error(Object object, Throwable t, Object... params);
+ public void fatal(Object object, Object... params);
+ public void fatal(Object object, Throwable t, Object... params);
+
}
\ No newline at end of file
Property changes on: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log4JProvider.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log4JProvider.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log4JProvider.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,151 +1,151 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.log;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-
-/**
- *
- * @author Gavin King
- *
- */
-final class Log4JProvider implements LogProvider
-{
- private final Logger logger;
- private final boolean isWrapped;
-
- private static final String LOG_IMPL_FQCN = LogImpl.class.getName();
- private static final String LOG_PROVIDER_FQCN = Log4JProvider.class.getName();
-
- private static final Level TRACE;
- static
- {
- Object trace;
- try
- {
- trace = Level.class.getDeclaredField("TRACE").get(null);
- }
- catch (Exception e)
- {
- trace = Level.DEBUG;
- }
- TRACE = (Level) trace;
- }
-
- Log4JProvider(String category, boolean wrapped)
- {
- logger = Logger.getLogger(category);
- isWrapped = wrapped;
- }
-
- private String getFQCN()
- {
- return isWrapped ? LOG_IMPL_FQCN : LOG_PROVIDER_FQCN;
- }
-
- public void debug(Object object)
- {
- logger.log(getFQCN(), Level.DEBUG, object, null);
- }
-
- public void debug(Object object, Throwable t)
- {
- logger.log(getFQCN(), Level.DEBUG, object, t);
- }
-
- public void error(Object object)
- {
- logger.log(getFQCN(), Level.ERROR, object, null);
- }
-
- public void error(Object object, Throwable t)
- {
- logger.log(getFQCN(), Level.ERROR, object, t);
- }
-
- public void fatal(Object object)
- {
- logger.log(getFQCN(), Level.FATAL, object, null);
- }
-
- public void fatal(Object object, Throwable t)
- {
- logger.log(getFQCN(), Level.FATAL, object, t);
- }
-
- public void info(Object object)
- {
- logger.log(getFQCN(), Level.INFO, object, null);
- }
-
- public void info(Object object, Throwable t)
- {
- logger.log(getFQCN(), Level.INFO, object, t);
- }
-
- public boolean isDebugEnabled()
- {
- return logger.isEnabledFor(Level.DEBUG);
- }
-
- public boolean isErrorEnabled()
- {
- return logger.isEnabledFor(Level.ERROR);
- }
-
- public boolean isFatalEnabled()
- {
- return logger.isEnabledFor(Level.FATAL);
- }
-
- public boolean isInfoEnabled()
- {
- return logger.isEnabledFor(Level.INFO);
- }
-
- public boolean isTraceEnabled()
- {
- return logger.isEnabledFor(TRACE);
- }
-
- public boolean isWarnEnabled()
- {
- return logger.isEnabledFor(Level.WARN);
- }
-
- public void trace(Object object)
- {
- logger.log(getFQCN(), TRACE, object, null);
- }
-
- public void trace(Object object, Throwable t)
- {
- logger.log(getFQCN(), TRACE, object, t);
- }
-
- public void warn(Object object)
- {
- logger.log(getFQCN(), Level.WARN, object, null);
- }
-
- public void warn(Object object, Throwable t)
- {
- logger.log(getFQCN(), Level.WARN, object, t);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.log;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author Gavin King
+ *
+ */
+final class Log4JProvider implements LogProvider
+{
+ private final Logger logger;
+ private final boolean isWrapped;
+
+ private static final String LOG_IMPL_FQCN = LogImpl.class.getName();
+ private static final String LOG_PROVIDER_FQCN = Log4JProvider.class.getName();
+
+ private static final Level TRACE;
+ static
+ {
+ Object trace;
+ try
+ {
+ trace = Level.class.getDeclaredField("TRACE").get(null);
+ }
+ catch (Exception e)
+ {
+ trace = Level.DEBUG;
+ }
+ TRACE = (Level) trace;
+ }
+
+ Log4JProvider(String category, boolean wrapped)
+ {
+ logger = Logger.getLogger(category);
+ isWrapped = wrapped;
+ }
+
+ private String getFQCN()
+ {
+ return isWrapped ? LOG_IMPL_FQCN : LOG_PROVIDER_FQCN;
+ }
+
+ public void debug(Object object)
+ {
+ logger.log(getFQCN(), Level.DEBUG, object, null);
+ }
+
+ public void debug(Object object, Throwable t)
+ {
+ logger.log(getFQCN(), Level.DEBUG, object, t);
+ }
+
+ public void error(Object object)
+ {
+ logger.log(getFQCN(), Level.ERROR, object, null);
+ }
+
+ public void error(Object object, Throwable t)
+ {
+ logger.log(getFQCN(), Level.ERROR, object, t);
+ }
+
+ public void fatal(Object object)
+ {
+ logger.log(getFQCN(), Level.FATAL, object, null);
+ }
+
+ public void fatal(Object object, Throwable t)
+ {
+ logger.log(getFQCN(), Level.FATAL, object, t);
+ }
+
+ public void info(Object object)
+ {
+ logger.log(getFQCN(), Level.INFO, object, null);
+ }
+
+ public void info(Object object, Throwable t)
+ {
+ logger.log(getFQCN(), Level.INFO, object, t);
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return logger.isEnabledFor(Level.DEBUG);
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return logger.isEnabledFor(Level.ERROR);
+ }
+
+ public boolean isFatalEnabled()
+ {
+ return logger.isEnabledFor(Level.FATAL);
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return logger.isEnabledFor(Level.INFO);
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return logger.isEnabledFor(TRACE);
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return logger.isEnabledFor(Level.WARN);
+ }
+
+ public void trace(Object object)
+ {
+ logger.log(getFQCN(), TRACE, object, null);
+ }
+
+ public void trace(Object object, Throwable t)
+ {
+ logger.log(getFQCN(), TRACE, object, t);
+ }
+
+ public void warn(Object object)
+ {
+ logger.log(getFQCN(), Level.WARN, object, null);
+ }
+
+ public void warn(Object object, Throwable t)
+ {
+ logger.log(getFQCN(), Level.WARN, object, t);
+ }
+
+}
Property changes on: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Log4JProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,200 +1,200 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.log;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.text.MessageFormat;
-import java.util.Arrays;
-
-/**
- *
- * @author Gavin King
- *
- */
-class LogImpl implements Log, Externalizable
-{
- private transient LogProvider log;
- private String category;
-
- public LogImpl()
- {
- }
-
- LogImpl(String category)
- {
- this.category = category;
- this.log = Logging.getLogProvider(category, true);
- }
-
- public boolean isDebugEnabled()
- {
- return log.isDebugEnabled();
- }
-
- public boolean isErrorEnabled()
- {
- return log.isErrorEnabled();
- }
-
- public boolean isFatalEnabled()
- {
- return log.isFatalEnabled();
- }
-
- public boolean isInfoEnabled()
- {
- return log.isInfoEnabled();
- }
-
- public boolean isTraceEnabled()
- {
- return log.isTraceEnabled();
- }
-
- public boolean isWarnEnabled()
- {
- return log.isWarnEnabled();
- }
-
- public void trace(Object object, Object... params)
- {
- if (isTraceEnabled())
- {
- log.trace(interpolate(object, params));
- }
- }
-
- public void trace(Object object, Throwable t, Object... params)
- {
- if (isTraceEnabled())
- {
- log.trace(interpolate(object, params), t);
- }
- }
-
- public void debug(Object object, Object... params)
- {
- if (isDebugEnabled())
- {
- log.debug(interpolate(object, params));
- }
- }
-
- public void debug(Object object, Throwable t, Object... params)
- {
- if (isDebugEnabled())
- {
- log.debug(interpolate(object, params), t);
- }
- }
-
- public void info(Object object, Object... params)
- {
- if (isInfoEnabled())
- {
- log.info(interpolate(object, params));
- }
- }
-
- public void info(Object object, Throwable t, Object... params)
- {
- if (isInfoEnabled())
- {
- log.info(interpolate(object, params), t);
- }
- }
-
- public void warn(Object object, Object... params)
- {
- if (isWarnEnabled())
- {
- log.warn(interpolate(object, params));
- }
- }
-
- public void warn(Object object, Throwable t, Object... params)
- {
- if (isWarnEnabled())
- {
- log.warn(interpolate(object, params), t);
- }
- }
-
- public void error(Object object, Object... params)
- {
- if (isErrorEnabled())
- {
- log.error(interpolate(object, params));
- }
- }
-
- public void error(Object object, Throwable t, Object... params)
- {
- if (isErrorEnabled())
- {
- log.error(interpolate(object, params), t);
- }
- }
-
- public void fatal(Object object, Object... params)
- {
- if (isFatalEnabled())
- {
- log.fatal(interpolate(object, params));
- }
- }
-
- public void fatal(Object object, Throwable t, Object... params)
- {
- if (isFatalEnabled())
- {
- log.fatal(interpolate(object, params), t);
- }
- }
-
- private Object interpolate(Object message, Object... params)
- {
- Object interpolatedMessage = message;
- if (params.length > 0)
- {
- for (int i = 0; i < params.length; i++)
- {
- if (params[i] != null && params[i].getClass().isArray())
- {
- params[i] = Arrays.asList((Object[]) params[i]);
- }
- }
- interpolatedMessage = MessageFormat.format(message.toString(), params);
- }
- return interpolatedMessage;
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- category = (String) in.readObject();
- log = Logging.getLogProvider(category, true);
- }
-
- public void writeExternal(ObjectOutput out) throws IOException
- {
- out.writeObject(category);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.log;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.text.MessageFormat;
+import java.util.Arrays;
+
+/**
+ *
+ * @author Gavin King
+ *
+ */
+class LogImpl implements Log, Externalizable
+{
+ private transient LogProvider log;
+ private String category;
+
+ public LogImpl()
+ {
+ }
+
+ LogImpl(String category)
+ {
+ this.category = category;
+ this.log = Logging.getLogProvider(category, true);
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return log.isDebugEnabled();
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return log.isErrorEnabled();
+ }
+
+ public boolean isFatalEnabled()
+ {
+ return log.isFatalEnabled();
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return log.isInfoEnabled();
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return log.isTraceEnabled();
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return log.isWarnEnabled();
+ }
+
+ public void trace(Object object, Object... params)
+ {
+ if (isTraceEnabled())
+ {
+ log.trace(interpolate(object, params));
+ }
+ }
+
+ public void trace(Object object, Throwable t, Object... params)
+ {
+ if (isTraceEnabled())
+ {
+ log.trace(interpolate(object, params), t);
+ }
+ }
+
+ public void debug(Object object, Object... params)
+ {
+ if (isDebugEnabled())
+ {
+ log.debug(interpolate(object, params));
+ }
+ }
+
+ public void debug(Object object, Throwable t, Object... params)
+ {
+ if (isDebugEnabled())
+ {
+ log.debug(interpolate(object, params), t);
+ }
+ }
+
+ public void info(Object object, Object... params)
+ {
+ if (isInfoEnabled())
+ {
+ log.info(interpolate(object, params));
+ }
+ }
+
+ public void info(Object object, Throwable t, Object... params)
+ {
+ if (isInfoEnabled())
+ {
+ log.info(interpolate(object, params), t);
+ }
+ }
+
+ public void warn(Object object, Object... params)
+ {
+ if (isWarnEnabled())
+ {
+ log.warn(interpolate(object, params));
+ }
+ }
+
+ public void warn(Object object, Throwable t, Object... params)
+ {
+ if (isWarnEnabled())
+ {
+ log.warn(interpolate(object, params), t);
+ }
+ }
+
+ public void error(Object object, Object... params)
+ {
+ if (isErrorEnabled())
+ {
+ log.error(interpolate(object, params));
+ }
+ }
+
+ public void error(Object object, Throwable t, Object... params)
+ {
+ if (isErrorEnabled())
+ {
+ log.error(interpolate(object, params), t);
+ }
+ }
+
+ public void fatal(Object object, Object... params)
+ {
+ if (isFatalEnabled())
+ {
+ log.fatal(interpolate(object, params));
+ }
+ }
+
+ public void fatal(Object object, Throwable t, Object... params)
+ {
+ if (isFatalEnabled())
+ {
+ log.fatal(interpolate(object, params), t);
+ }
+ }
+
+ private Object interpolate(Object message, Object... params)
+ {
+ Object interpolatedMessage = message;
+ if (params.length > 0)
+ {
+ for (int i = 0; i < params.length; i++)
+ {
+ if (params[i] != null && params[i].getClass().isArray())
+ {
+ params[i] = Arrays.asList((Object[]) params[i]);
+ }
+ }
+ interpolatedMessage = MessageFormat.format(message.toString(), params);
+ }
+ return interpolatedMessage;
+ }
+
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ category = (String) in.readObject();
+ log = Logging.getLogProvider(category, true);
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ out.writeObject(category);
+ }
+
+}
Property changes on: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogProvider.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogProvider.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogProvider.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,44 +1,44 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.log;
-
-/**
- *
- * @author Gavin King
- *
- */
-public interface LogProvider
-{
- public void trace(Object object);
- public void trace(Object object, Throwable t);
- public void debug(Object object);
- public void debug(Object object, Throwable t);
- public void info(Object object);
- public void info(Object object, Throwable t);
- public void warn(Object object);
- public void warn(Object object, Throwable t);
- public void error(Object object);
- public void error(Object object, Throwable t);
- public void fatal(Object object);
- public void fatal(Object object, Throwable t);
- public boolean isTraceEnabled();
- public boolean isDebugEnabled();
- public boolean isInfoEnabled();
- public boolean isWarnEnabled();
- public boolean isErrorEnabled();
- public boolean isFatalEnabled();
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.log;
+
+/**
+ *
+ * @author Gavin King
+ *
+ */
+public interface LogProvider
+{
+ public void trace(Object object);
+ public void trace(Object object, Throwable t);
+ public void debug(Object object);
+ public void debug(Object object, Throwable t);
+ public void info(Object object);
+ public void info(Object object, Throwable t);
+ public void warn(Object object);
+ public void warn(Object object, Throwable t);
+ public void error(Object object);
+ public void error(Object object, Throwable t);
+ public void fatal(Object object);
+ public void fatal(Object object, Throwable t);
+ public boolean isTraceEnabled();
+ public boolean isDebugEnabled();
+ public boolean isInfoEnabled();
+ public boolean isWarnEnabled();
+ public boolean isErrorEnabled();
+ public boolean isFatalEnabled();
+}
Property changes on: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Logging.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Logging.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Logging.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,63 +1,63 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.log;
-
-/**
- *
- * @author Gavin King
- *
- */
-public class Logging
-{
- private static final boolean isLog4JAvailable;
-
- static
- {
- boolean available;
- try
- {
- Class.forName("org.apache.log4j.Logger");
- available = true;
- }
- catch (ClassNotFoundException cnfe)
- {
- available = false;
- }
- isLog4JAvailable = available;
- }
-
- public static Log getLog(String category)
- {
- return new LogImpl(category);
- }
-
- public static Log getLog(Class<?> clazz)
- {
- return new LogImpl(clazz.getName());
- }
-
- static LogProvider getLogProvider(String category, boolean wrapped)
- {
- return isLog4JAvailable ? new Log4JProvider(category, wrapped) : new JDKProvider(category, wrapped);
- }
-
- public static LogProvider getLogProvider(Class<?> clazz)
- {
- return getLogProvider(clazz.getName(), false);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.log;
+
+/**
+ *
+ * @author Gavin King
+ *
+ */
+public class Logging
+{
+ private static final boolean isLog4JAvailable;
+
+ static
+ {
+ boolean available;
+ try
+ {
+ Class.forName("org.apache.log4j.Logger");
+ available = true;
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ available = false;
+ }
+ isLog4JAvailable = available;
+ }
+
+ public static Log getLog(String category)
+ {
+ return new LogImpl(category);
+ }
+
+ public static Log getLog(Class<?> clazz)
+ {
+ return new LogImpl(clazz.getName());
+ }
+
+ static LogProvider getLogProvider(String category, boolean wrapped)
+ {
+ return isLog4JAvailable ? new Log4JProvider(category, wrapped) : new JDKProvider(category, wrapped);
+ }
+
+ public static LogProvider getLogProvider(Class<?> clazz)
+ {
+ return getLogProvider(clazz.getName(), false);
+ }
+
+}
Property changes on: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/Logging.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/TestAppender.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/BeansImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/ContextsImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/ELImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/ManagersImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/porting-package/src/main/resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingBootstrap.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/InterceptorBindings.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwadingBusinessInterfaceDescriptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbDescriptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/AbstractResourceServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/ForwardingJpaInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/ForwardingResourceInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/ExecutorServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/ForwardingResourceLoader.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/security/spi/SecurityServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/validation/spi/ValidationServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockBootstrap.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockDeployment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockResourceLoader.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockResourceServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockSecurityServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockService.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockServletServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockTransactionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockValidationServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockBeanDeploymentArchive.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockDeployment.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEELifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEjBServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEjbDescriptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockEjbInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockHttpSession.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockResourceLoader.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockResourceServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockSecurityServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletLifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockServletServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/MockValidationServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/TestContainer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/cluster/AbstractClusterTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/cluster/SwitchableMockEELifecycle.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/cluster/SwitchableSingletonProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/mock/el/EL.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/test/AbstractWebBeansTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/test/harness/AbstractStandaloneContainersImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/test/harness/ServletLifecycleContainersImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/java/org/jboss/webbeans/test/harness/StandaloneContainersImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/main/resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/com/acme/RoadRunner.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/ExampleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Game.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Generator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Random.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/examples/Translator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Cow.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Dummy.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Field.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Fox.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/NightTime.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Tame.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Tame.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Tame.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,22 +1,22 @@
-package org.jboss.webbeans.test.unit.activities;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface Tame
-{
-
-}
+package org.jboss.webbeans.test.unit.activities;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Tame
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/BeanWithInjection.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/MyBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SameBeanTypeInChildActivityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SpecialBindingType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Cow.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Donkey.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Dummy.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Dusk.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Field.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Horse.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NightTime.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScope.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Tame.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Tame.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Tame.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,22 +1,22 @@
-package org.jboss.webbeans.test.unit.activities.current;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface Tame
-{
-
-}
+package org.jboss.webbeans.test.unit.activities.current;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Tame
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/Bean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/Child.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/DeclaringTypeTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/ExampleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/Parent.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/AnnotatedTypeDecoratorTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedCallable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedConstructor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedField.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedMember.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedMethod.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedParameter.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/MockAnnotatedType.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/annotated/decoration/NotAnnotated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Bar.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/CheckableInjectionServices.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InjectionServicesTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/WBStartupTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,16 +1,16 @@
-package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Named;
-
-@Stateful
-@Tame
-@Named("Pongo")
-class Hound implements HoundLocal
-{
- @Remove
- public void bye() {
- }
-
-}
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Named;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,21 +1,21 @@
-package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface Synchronous
-{
-
-}
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Synchronous
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,16 +1,16 @@
-package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Named;
-
-@Stateful
-@Tame
-@Named("Pongo")
-class Hound implements HoundLocal
-{
- @Remove
- public void bye() {
- }
-
-}
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Named;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,21 +1,21 @@
-package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface Synchronous
-{
-
-}
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Synchronous
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,16 +1,16 @@
-package org.jboss.webbeans.test.unit.bootstrap.singleEnterprise;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Named;
-
-@Stateful
-@Tame
-@Named("Pongo")
-class Hound implements HoundLocal
-{
- @Remove
- public void bye() {
- }
-
-}
+package org.jboss.webbeans.test.unit.bootstrap.singleEnterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Named;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Fodder.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Horse.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/NaiveClusterTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/Stable.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/cluster/SwitchableContainerTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,39 +1,39 @@
-package org.jboss.webbeans.test.unit.context;
-
-import java.util.concurrent.CountDownLatch;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.test.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ApplicationScopedTest extends AbstractWebBeansTest
-{
-
- @Test
- public void testConcurrentInitilized() throws InterruptedException
- {
- final CountDownLatch latch = new CountDownLatch(10);
- for (int i = 0; i < 10; i++)
- {
- new Thread(new Runnable()
- {
- public void run()
- {
- try
- {
- getCurrentManager().getInstanceByType(ApplictionScopedObject.class).increment();
- }
- finally
- {
- latch.countDown();
- }
- }
- }).start();
- }
- latch.await();
- int value = getCurrentManager().getInstanceByType(ApplictionScopedObject.class).getValue();
- assert value == 10;
- }
-
-}
+package org.jboss.webbeans.test.unit.context;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class ApplicationScopedTest extends AbstractWebBeansTest
+{
+
+ @Test
+ public void testConcurrentInitilized() throws InterruptedException
+ {
+ final CountDownLatch latch = new CountDownLatch(10);
+ for (int i = 0; i < 10; i++)
+ {
+ new Thread(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ getCurrentManager().getInstanceByType(ApplictionScopedObject.class).increment();
+ }
+ finally
+ {
+ latch.countDown();
+ }
+ }
+ }).start();
+ }
+ latch.await();
+ int value = getCurrentManager().getInstanceByType(ApplictionScopedObject.class).getValue();
+ assert value == 10;
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplictionScopedObject.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplictionScopedObject.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplictionScopedObject.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,20 +1,20 @@
-package org.jboss.webbeans.test.unit.context;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.enterprise.context.ApplicationScoped;
-
-@ApplicationScoped
-public class ApplictionScopedObject
-{
- private AtomicInteger counter = new AtomicInteger();
-
- public void increment()
- {
- counter.incrementAndGet();
- }
- public int getValue()
- {
- return counter.get();
- }
-}
+package org.jboss.webbeans.test.unit.context;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.enterprise.context.ApplicationScoped;
+
+@ApplicationScoped
+public class ApplictionScopedObject
+{
+ private AtomicInteger counter = new AtomicInteger();
+
+ public void increment()
+ {
+ counter.incrementAndGet();
+ }
+ public int getValue()
+ {
+ return counter.get();
+ }
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplictionScopedObject.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ContextTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,18 +1,18 @@
-package org.jboss.webbeans.test.unit.context;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Produces;
-
-public class ParameterizedTypeScoped
-{
-
- @RequestScoped
- @Produces
- public List<String> create()
- {
- return Arrays.asList("iemon", "houjitya");
- }
-}
+package org.jboss.webbeans.test.unit.context;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Produces;
+
+public class ParameterizedTypeScoped
+{
+
+ @RequestScoped
+ @Produces
+ public List<String> create()
+ {
+ return Arrays.asList("iemon", "houjitya");
+ }
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,19 +1,19 @@
-package org.jboss.webbeans.test.unit.context;
-
-import java.util.List;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.test.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ParameterizedTypeScopedTest extends AbstractWebBeansTest
-{
-
- @Test
- public void testStringList()
- {
- List<String> str = createContextualInstance(StringHolder.class).getStrings();
- assert str.size() == 2;
- }
-}
+package org.jboss.webbeans.test.unit.context;
+
+import java.util.List;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class ParameterizedTypeScopedTest extends AbstractWebBeansTest
+{
+
+ @Test
+ public void testStringList()
+ {
+ List<String> str = createContextualInstance(StringHolder.class).getStrings();
+ assert str.size() == 2;
+ }
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/StringHolder.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleBeanImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleDecorator1.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleDecorator2.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/decorator/simple/SimpleDecoratorTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/Beer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/BeerProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/ELResolverTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/AccessibleManagerResolutionTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Cat.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Chicken.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Cow.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Horse.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/deployment/structure/Pig.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Animal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/DeadlyAnimal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/DeadlySpider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/DefangedTarantula.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Hound.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Hound.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Hound.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,21 +1,21 @@
-package org.jboss.webbeans.test.unit.environments.servlet;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Named;
-
-@Stateful
-@Tame
-@Named("Pongo")
-class Hound implements HoundLocal
-{
- @Remove
- public void bye() {
- }
-
- public void ping()
- {
-
- }
-
-}
+package org.jboss.webbeans.test.unit.environments.servlet;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Named;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+ public void ping()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Hound.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/HoundLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Salmon.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/ScottishFish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/SeaBass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/ServletEnvironmentTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/ServletLifecycleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Sole.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Spider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Tame.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Tarantula.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/TarantulaProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Tuna.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/environments/servlet/Whitefish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,72 +1,72 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import java.util.Set;
-
-import javax.enterprise.inject.New;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.webbeans.bean.SessionBean;
-import org.jboss.webbeans.bean.NewSessionBean;
-import org.jboss.webbeans.introspector.WBAnnotated;
-import org.jboss.webbeans.literal.NewLiteral;
-import org.jboss.webbeans.test.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
-@Artifact
-(a)Packaging(PackagingType.EAR)
-public class NewEnterpriseBeanTest extends AbstractWebBeansTest
-{
-
- private static final New NEW_LITERAL = new NewLiteral()
- {
-
- public java.lang.Class<?> value()
- {
- return WrappedEnterpriseBean.class;
- }
-
- };
-
- private SessionBean<WrappedEnterpriseBeanLocal> wrappedEnterpriseBean;
- private NewSessionBean<WrappedEnterpriseBeanLocal> newEnterpriseBean;
-
- public void initNewBean()
- {
- Set<Bean<?>> beans = getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class);
- assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class).size() == 1;
- assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class).iterator().next() instanceof SessionBean;
- wrappedEnterpriseBean = (SessionBean<WrappedEnterpriseBeanLocal>) getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class).iterator().next();
-
- assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class, NEW_LITERAL).size() == 1;
- assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class, NEW_LITERAL).iterator().next() instanceof NewSessionBean;
- newEnterpriseBean = (NewSessionBean<WrappedEnterpriseBeanLocal>) getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class, NEW_LITERAL).iterator().next();
-
- }
-
- @Test(groups = { "new", "broken" })
- public void testNewBeanHasImplementationClassOfInjectionPointType()
- {
- initNewBean();
- assert newEnterpriseBean.getType().equals(WrappedEnterpriseBean.class);
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
- {
- initNewBean();
- assert newEnterpriseBean.getInitializerMethods().equals(wrappedEnterpriseBean.getInitializerMethods());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
- {
- initNewBean();
- Set<? extends WBAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
- Set<? extends WBAnnotated<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
- assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
- }
-
-}
+package org.jboss.webbeans.test.unit.implementation;
+
+import java.util.Set;
+
+import javax.enterprise.inject.New;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.bean.SessionBean;
+import org.jboss.webbeans.bean.NewSessionBean;
+import org.jboss.webbeans.introspector.WBAnnotated;
+import org.jboss.webbeans.literal.NewLiteral;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class NewEnterpriseBeanTest extends AbstractWebBeansTest
+{
+
+ private static final New NEW_LITERAL = new NewLiteral()
+ {
+
+ public java.lang.Class<?> value()
+ {
+ return WrappedEnterpriseBean.class;
+ }
+
+ };
+
+ private SessionBean<WrappedEnterpriseBeanLocal> wrappedEnterpriseBean;
+ private NewSessionBean<WrappedEnterpriseBeanLocal> newEnterpriseBean;
+
+ public void initNewBean()
+ {
+ Set<Bean<?>> beans = getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class);
+ assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class).size() == 1;
+ assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class).iterator().next() instanceof SessionBean;
+ wrappedEnterpriseBean = (SessionBean<WrappedEnterpriseBeanLocal>) getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class).iterator().next();
+
+ assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class, NEW_LITERAL).size() == 1;
+ assert getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class, NEW_LITERAL).iterator().next() instanceof NewSessionBean;
+ newEnterpriseBean = (NewSessionBean<WrappedEnterpriseBeanLocal>) getCurrentManager().getBeans(WrappedEnterpriseBeanLocal.class, NEW_LITERAL).iterator().next();
+
+ }
+
+ @Test(groups = { "new", "broken" })
+ public void testNewBeanHasImplementationClassOfInjectionPointType()
+ {
+ initNewBean();
+ assert newEnterpriseBean.getType().equals(WrappedEnterpriseBean.class);
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
+ {
+ initNewBean();
+ assert newEnterpriseBean.getInitializerMethods().equals(wrappedEnterpriseBean.getInitializerMethods());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
+ {
+ initNewBean();
+ Set<? extends WBAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
+ Set<? extends WBAnnotated<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
+ assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,14 +1,14 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.enterprise.context.SessionScoped;
-
-@SessionScoped
-@Stateful
-class WrappedEnterpriseBean implements WrappedEnterpriseBeanLocal
-{
- @Remove
- public void bye() {
- }
-}
+package org.jboss.webbeans.test.unit.implementation;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped
+@Stateful
+class WrappedEnterpriseBean implements WrappedEnterpriseBeanLocal
+{
+ @Remove
+ public void bye() {
+ }
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Random.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/BowlerHatException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/EnterpriseBeanTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/Fedora.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/FedoraImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/Hat.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/HatRemote.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/AlteStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/BeanImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/BeanLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessor.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessor.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessor.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-import javax.ejb.Stateful;
-
-@Stateful
-public class DirectOrderProcessor extends OrderProcessor implements DirectOrderProcessorLocal
-{
-
-}
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+import javax.ejb.Stateful;
+
+@Stateful
+public class DirectOrderProcessor extends OrderProcessor implements DirectOrderProcessorLocal
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-import javax.ejb.Local;
-
-@Local
-public interface DirectOrderProcessorLocal
-{
- void order();
-}
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+import javax.ejb.Local;
+
+@Local
+public interface DirectOrderProcessorLocal
+{
+ void order();
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,101 +1,101 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.context.spi.Context;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.webbeans.test.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 6.5. Lifecycle of stateful session beans
- * 6.6. Lifecycle of stateless session and singleton beans
- * 6.11. Lifecycle of EJBs
- *
- * Mostly overlapping with other tests...
- *
- * @author Nicklas Karlsson
- * @author David Allen
- *
- * Spec version: Public Release Draft 2
- *
- */
-@Artifact
-(a)Packaging(PackagingType.EAR)
-@IntegrationTest
-public class EnterpriseBeanLifecycleTest extends AbstractWebBeansTest
-{
-
- /**
- * When the create() method of a Bean object that represents a stateful
- * session bean that is called, the container creates and returns a session
- * bean proxy, as defined in Section 3.3.9, "Session bean proxies".
- */
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
- public void testCreateSFSB()
- {
- GrossStadt frankfurt = getCurrentManager().getInstanceByType(GrossStadt.class);
- Bean<KleinStadt> stadtBean = getBean(KleinStadt.class);
- assert stadtBean != null : "Expected a bean for stateful session bean Kassel";
- CreationalContext<KleinStadt> creationalContext = new MockCreationalContext<KleinStadt>();
- KleinStadt stadtInstance = stadtBean.create(creationalContext);
- assert stadtInstance != null : "Expected instance to be created by container";
- //assert frankfurt.isKleinStadtCreated() : "PostConstruct should be invoked when bean instance is created";
- frankfurt.resetCreatedFlags();
-
- // Create a second one to make sure create always does create a new session bean
- KleinStadt anotherStadtInstance = stadtBean.create(creationalContext);
- assert anotherStadtInstance != null : "Expected second instance of session bean";
- //assert frankfurt.isKleinStadtCreated();
- assert anotherStadtInstance != stadtInstance : "create() should not return same bean as before";
-
- // Verify that the instance returned is a proxy by checking for all local interfaces
- Class<?>[] classes = stadtInstance.getClass().getInterfaces();
- List<Class<?>> classesList = Arrays.asList(classes);
- Set<Class<?>> interfaces = new HashSet<Class<?>>(classesList);
-
- assert interfaces.contains(KleinStadt.class);
- assert interfaces.contains(SchoeneStadt.class);
- //frankfurt.dispose();
- }
-
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
- public void testDestroyRemovesSFSB() throws Exception
- {
- GrossStadt frankfurt = getCurrentManager().getInstanceByType(GrossStadt.class);
- Bean<KleinStadt> stadtBean = getBean(KleinStadt.class);
- assert stadtBean != null : "Expected a bean for stateful session bean Kassel";
- Context requestContext = getCurrentManager().getContext(RequestScoped.class);
- CreationalContext<KleinStadt> creationalContext = new MockCreationalContext<KleinStadt>();
- KleinStadt kassel = requestContext.get(stadtBean, creationalContext);
- stadtBean.destroy(kassel, creationalContext);
-
- assert frankfurt.isKleinStadtDestroyed() : "Expected SFSB bean to be destroyed";
- kassel = requestContext.get(stadtBean);
- assert kassel == null : "SFSB bean should not exist after being destroyed";
- //frankfurt.dispose();
- }
-
- @Test
- public void testDestroyDoesntTryToRemoveSLSB()
- {
- Bean<BeanLocal> bean = getBean(BeanLocal.class);
- assert bean != null : "Expected a bean for stateless session bean BeanLocal";
- CreationalContext<BeanLocal> creationalContext = getCurrentManager().createCreationalContext(bean);
- BeanLocal instance = bean.create(creationalContext);
- bean.destroy(instance, creationalContext);
- }
-
-}
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 6.5. Lifecycle of stateful session beans
+ * 6.6. Lifecycle of stateless session and singleton beans
+ * 6.11. Lifecycle of EJBs
+ *
+ * Mostly overlapping with other tests...
+ *
+ * @author Nicklas Karlsson
+ * @author David Allen
+ *
+ * Spec version: Public Release Draft 2
+ *
+ */
+@Artifact
+(a)Packaging(PackagingType.EAR)
+@IntegrationTest
+public class EnterpriseBeanLifecycleTest extends AbstractWebBeansTest
+{
+
+ /**
+ * When the create() method of a Bean object that represents a stateful
+ * session bean that is called, the container creates and returns a session
+ * bean proxy, as defined in Section 3.3.9, "Session bean proxies".
+ */
+ @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
+ public void testCreateSFSB()
+ {
+ GrossStadt frankfurt = getCurrentManager().getInstanceByType(GrossStadt.class);
+ Bean<KleinStadt> stadtBean = getBean(KleinStadt.class);
+ assert stadtBean != null : "Expected a bean for stateful session bean Kassel";
+ CreationalContext<KleinStadt> creationalContext = new MockCreationalContext<KleinStadt>();
+ KleinStadt stadtInstance = stadtBean.create(creationalContext);
+ assert stadtInstance != null : "Expected instance to be created by container";
+ //assert frankfurt.isKleinStadtCreated() : "PostConstruct should be invoked when bean instance is created";
+ frankfurt.resetCreatedFlags();
+
+ // Create a second one to make sure create always does create a new session bean
+ KleinStadt anotherStadtInstance = stadtBean.create(creationalContext);
+ assert anotherStadtInstance != null : "Expected second instance of session bean";
+ //assert frankfurt.isKleinStadtCreated();
+ assert anotherStadtInstance != stadtInstance : "create() should not return same bean as before";
+
+ // Verify that the instance returned is a proxy by checking for all local interfaces
+ Class<?>[] classes = stadtInstance.getClass().getInterfaces();
+ List<Class<?>> classesList = Arrays.asList(classes);
+ Set<Class<?>> interfaces = new HashSet<Class<?>>(classesList);
+
+ assert interfaces.contains(KleinStadt.class);
+ assert interfaces.contains(SchoeneStadt.class);
+ //frankfurt.dispose();
+ }
+
+ @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
+ public void testDestroyRemovesSFSB() throws Exception
+ {
+ GrossStadt frankfurt = getCurrentManager().getInstanceByType(GrossStadt.class);
+ Bean<KleinStadt> stadtBean = getBean(KleinStadt.class);
+ assert stadtBean != null : "Expected a bean for stateful session bean Kassel";
+ Context requestContext = getCurrentManager().getContext(RequestScoped.class);
+ CreationalContext<KleinStadt> creationalContext = new MockCreationalContext<KleinStadt>();
+ KleinStadt kassel = requestContext.get(stadtBean, creationalContext);
+ stadtBean.destroy(kassel, creationalContext);
+
+ assert frankfurt.isKleinStadtDestroyed() : "Expected SFSB bean to be destroyed";
+ kassel = requestContext.get(stadtBean);
+ assert kassel == null : "SFSB bean should not exist after being destroyed";
+ //frankfurt.dispose();
+ }
+
+ @Test
+ public void testDestroyDoesntTryToRemoveSLSB()
+ {
+ Bean<BeanLocal> bean = getBean(BeanLocal.class);
+ assert bean != null : "Expected a bean for stateless session bean BeanLocal";
+ CreationalContext<BeanLocal> creationalContext = getCurrentManager().createCreationalContext(bean);
+ BeanLocal instance = bean.create(creationalContext);
+ bean.destroy(instance, creationalContext);
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/FrankfurtAmMain.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/GeschichtslosStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Giessen.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/GrossStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/GutenbergMuseum.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IndirectOrderProcessor.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IndirectOrderProcessor.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IndirectOrderProcessor.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-import javax.ejb.Stateful;
-
-@Stateful
-public class IndirectOrderProcessor extends IntermediateOrderProcessor implements OrderProcessorLocal
-{
-
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+import javax.ejb.Stateful;
+
+@Stateful
+public class IndirectOrderProcessor extends IntermediateOrderProcessor implements OrderProcessorLocal
+{
+
}
\ No newline at end of file
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IndirectOrderProcessor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,6 +1,6 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-class IntermediateOrderProcessor extends OrderProcessor
-{
-
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+class IntermediateOrderProcessor extends OrderProcessor
+{
+
}
\ No newline at end of file
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Kassel.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/KleinStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/LandgraffenSchloss.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Mainz.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Marburg.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/MockCreationalContext.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/NeueStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessor.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessor.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessor.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,30 +1,30 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-
-public class OrderProcessor
-{
- public static boolean postConstructCalled = false;
-
- public static boolean preDestroyCalled = true;
-
- @PostConstruct
- public void postConstruct()
- {
- postConstructCalled = true;
- }
-
- @PreDestroy
- public void preDestroy()
- {
- preDestroyCalled = true;
- }
-
- public void order()
- {
-
- }
-
-
-}
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+
+public class OrderProcessor
+{
+ public static boolean postConstructCalled = false;
+
+ public static boolean preDestroyCalled = true;
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ postConstructCalled = true;
+ }
+
+ @PreDestroy
+ public void preDestroy()
+ {
+ preDestroyCalled = true;
+ }
+
+ public void order()
+ {
+
+ }
+
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessorLocal.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessorLocal.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessorLocal.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
-
-import javax.ejb.Local;
-
-@Local
-public interface OrderProcessorLocal
-{
- void order();
-}
+package org.jboss.webbeans.test.unit.implementation.enterprise.lifecycle;
+
+import javax.ejb.Local;
+
+@Local
+public interface OrderProcessorLocal
+{
+ void order();
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/OrderProcessorLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/RoemerPassage.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/Schloss.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/SchoeneStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/enterprise/lifecycle/UniStadt.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/NormalScopedBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/SimpleEventTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/Updated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/AbstractHtmlUnitTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/TxEventTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/tx/Updated.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ExceptionHandlingTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/FooException.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Lorry_Broken.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Ship.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ShipProducer_Broken.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/Important.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBinding.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,71 +1,71 @@
-package org.jboss.webbeans.test.unit.implementation.newsimple;
-
-import java.util.Set;
-
-import javax.enterprise.inject.New;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.bean.NewManagedBean;
-import org.jboss.webbeans.bean.ManagedBean;
-import org.jboss.webbeans.introspector.WBAnnotated;
-import org.jboss.webbeans.literal.NewLiteral;
-import org.jboss.webbeans.test.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class NewSimpleBeanTest extends AbstractWebBeansTest
-{
- private ManagedBean<WrappedSimpleBean> wrappedSimpleBean;
- private NewManagedBean<WrappedSimpleBean> newSimpleBean;
-
- private static final New NEW_LITERAL = new NewLiteral();
-
- public void initNewBean() {
-
- assert getCurrentManager().getBeans(WrappedSimpleBean.class).size() == 1;
- assert getCurrentManager().getBeans(WrappedSimpleBean.class).iterator().next() instanceof ManagedBean;
- wrappedSimpleBean = (ManagedBean<WrappedSimpleBean>) getCurrentManager().getBeans(WrappedSimpleBean.class).iterator().next();
-
- assert getCurrentManager().getBeans(WrappedSimpleBean.class, NEW_LITERAL).size() == 1;
- assert getCurrentManager().getBeans(WrappedSimpleBean.class, NEW_LITERAL).iterator().next() instanceof NewManagedBean;
- newSimpleBean = (NewManagedBean<WrappedSimpleBean>) getCurrentManager().getBeans(WrappedSimpleBean.class, NEW_LITERAL).iterator().next();
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasImplementationClassOfInjectionPointType()
- {
- initNewBean();
- assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
- }
-
- @Test(groups = { "new" })
- public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
- {
- initNewBean();
- assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameConstructorAsWrappedBean()
- {
- initNewBean();
- assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
- {
- initNewBean();
- assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
- {
- initNewBean();
- Set<? extends WBAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
- Set<? extends WBAnnotated<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
- assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
- }
-
-}
+package org.jboss.webbeans.test.unit.implementation.newsimple;
+
+import java.util.Set;
+
+import javax.enterprise.inject.New;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.bean.NewManagedBean;
+import org.jboss.webbeans.bean.ManagedBean;
+import org.jboss.webbeans.introspector.WBAnnotated;
+import org.jboss.webbeans.literal.NewLiteral;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class NewSimpleBeanTest extends AbstractWebBeansTest
+{
+ private ManagedBean<WrappedSimpleBean> wrappedSimpleBean;
+ private NewManagedBean<WrappedSimpleBean> newSimpleBean;
+
+ private static final New NEW_LITERAL = new NewLiteral();
+
+ public void initNewBean() {
+
+ assert getCurrentManager().getBeans(WrappedSimpleBean.class).size() == 1;
+ assert getCurrentManager().getBeans(WrappedSimpleBean.class).iterator().next() instanceof ManagedBean;
+ wrappedSimpleBean = (ManagedBean<WrappedSimpleBean>) getCurrentManager().getBeans(WrappedSimpleBean.class).iterator().next();
+
+ assert getCurrentManager().getBeans(WrappedSimpleBean.class, NEW_LITERAL).size() == 1;
+ assert getCurrentManager().getBeans(WrappedSimpleBean.class, NEW_LITERAL).iterator().next() instanceof NewManagedBean;
+ newSimpleBean = (NewManagedBean<WrappedSimpleBean>) getCurrentManager().getBeans(WrappedSimpleBean.class, NEW_LITERAL).iterator().next();
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasImplementationClassOfInjectionPointType()
+ {
+ initNewBean();
+ assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
+ {
+ initNewBean();
+ assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameConstructorAsWrappedBean()
+ {
+ initNewBean();
+ assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
+ {
+ initNewBean();
+ assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
+ {
+ initNewBean();
+ Set<? extends WBAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
+ Set<? extends WBAnnotated<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
+ assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,13 +1,13 @@
-package org.jboss.webbeans.test.unit.implementation.newsimple;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-
-@SessionScoped
-class WrappedSimpleBean implements Serializable
-{
- public WrappedSimpleBean() {
-
- }
-}
+package org.jboss.webbeans.test.unit.implementation.newsimple;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped
+class WrappedSimpleBean implements Serializable
+{
+ public WrappedSimpleBean() {
+
+ }
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/IntegerCollectionInjection.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ListInstance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ListStringInstance.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedCollectionInjection.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedListInjection.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/ParameterizedProducerTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/field/Target.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Car.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/CarFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/FooDisposer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/FooProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Government.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/Important.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/IntInjection.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/ManagerProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/ManagerProducerTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBinding.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NullProducerTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/Foo.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/Foo.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/Foo.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,18 +1,18 @@
-package org.jboss.webbeans.test.unit.implementation.proxy;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Named;
-
-@Named
-@RequestScoped
-class Foo implements Serializable
-{
-
- public String getMsg()
- {
- return "Hi";
- }
-
+package org.jboss.webbeans.test.unit.implementation.proxy;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Named;
+
+@Named
+@RequestScoped
+class Foo implements Serializable
+{
+
+ public String getMsg()
+ {
+ return "Hi";
+ }
+
}
\ No newline at end of file
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Ball.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/BallImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Pass.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Shot.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ball.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Defender.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Goalkeeper.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/PrimaryInterceptionBinding.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SecondaryInterceptionBinding.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleBeanImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleBeanWithStereotype.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleDecorator.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleInterceptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleInterceptorStereotype.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/SimpleInterceptorTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/simple/TwoBindingsInterceptor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupInstanceTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,20 +1,20 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface Special
-{
-
-}
+package org.jboss.webbeans.test.unit.lookup;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target({FIELD, METHOD, TYPE, PARAMETER})
+public @interface Special
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,13 +1,13 @@
-package org.jboss.webbeans.test.unit.lookup.circular;
-
-import javax.enterprise.inject.Produces;
-
-class DependentLoopingProducer
-{
-
- @Produces @DependentLooping
- public Violation produceViolation(@DependentLooping Violation violation) {
- return new Violation();
- }
-
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.enterprise.inject.Produces;
+
+class DependentLoopingProducer
+{
+
+ @Produces @DependentLooping
+ public Violation produceViolation(@DependentLooping Violation violation) {
+ return new Violation();
+ }
+
}
\ No newline at end of file
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,17 +1,17 @@
-package org.jboss.webbeans.test.unit.lookup.circular;
-
-import javax.enterprise.inject.Produces;
-
-class DependentSelfConsumingDependentProducer
-{
- @SelfConsumingDependent Violation violation;
-
- @Produces @SelfConsumingDependent
- public Violation produceViolation() {
- return new Violation();
- }
-
- public void ping() {
-
- }
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.enterprise.inject.Produces;
+
+class DependentSelfConsumingDependentProducer
+{
+ @SelfConsumingDependent Violation violation;
+
+ @Produces @SelfConsumingDependent
+ public Violation produceViolation() {
+ return new Violation();
+ }
+
+ public void ping() {
+
+ }
}
\ No newline at end of file
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,15 +1,15 @@
-package org.jboss.webbeans.test.unit.lookup.circular;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-
-@ApplicationScoped
-class NormalLoopingProducer
-{
-
- @Produces @ApplicationScoped @NormalLooping
- public Violation produceViolation(@NormalLooping Violation violation) {
- return new Violation();
- }
-
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+
+@ApplicationScoped
+class NormalLoopingProducer
+{
+
+ @Produces @ApplicationScoped @NormalLooping
+ public Violation produceViolation(@NormalLooping Violation violation) {
+ return new Violation();
+ }
+
}
\ No newline at end of file
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/AbstractFactory.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/AbstractFactory.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/AbstractFactory.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,8 +1,8 @@
-package org.jboss.webbeans.test.unit.lookup.wbri279;
-
-public abstract class AbstractFactory<T>
-{
-
- public abstract T createObject();
-
-}
+package org.jboss.webbeans.test.unit.lookup.wbri279;
+
+public abstract class AbstractFactory<T>
+{
+
+ public abstract T createObject();
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/AbstractFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/DummyParent.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/DummyParent.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/DummyParent.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,6 +1,6 @@
-package org.jboss.webbeans.test.unit.lookup.wbri279;
-
-public class DummyParent
-{
-
-}
+package org.jboss.webbeans.test.unit.lookup.wbri279;
+
+public class DummyParent
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/DummyParent.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntFactory.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntFactory.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntFactory.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,20 +1,20 @@
-package org.jboss.webbeans.test.unit.lookup.wbri279;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target( { TYPE, FIELD, METHOD, PARAMETER })
-@Qualifier
-public @interface IntFactory
-{
-
-}
+package org.jboss.webbeans.test.unit.lookup.wbri279;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target( { TYPE, FIELD, METHOD, PARAMETER })
+@Qualifier
+public @interface IntFactory
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntegerFactory.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntegerFactory.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntegerFactory.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,14 +1,14 @@
-package org.jboss.webbeans.test.unit.lookup.wbri279;
-
-@IntFactory
-public class IntegerFactory extends AbstractFactory<Integer>
-{
-
- public static final Integer VALUE = 123;
-
- public Integer createObject()
- {
- return VALUE;
- }
-
-}
+package org.jboss.webbeans.test.unit.lookup.wbri279;
+
+@IntFactory
+public class IntegerFactory extends AbstractFactory<Integer>
+{
+
+ public static final Integer VALUE = 123;
+
+ public Integer createObject()
+ {
+ return VALUE;
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/IntegerFactory.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/SomeBean.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/SomeBean.java 2009-10-07 17:37:47 UTC (rev 3867)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/SomeBean.java 2009-10-07 18:23:35 UTC (rev 3868)
@@ -1,16 +1,16 @@
-package org.jboss.webbeans.test.unit.lookup.wbri279;
-
-import javax.inject.Inject;
-
-public class SomeBean
-{
-
- @Inject @IntFactory
- IntegerFactory integerFactory;
-
- public String getObjectAsString()
- {
- return integerFactory.createObject().toString();
- }
-
-}
+package org.jboss.webbeans.test.unit.lookup.wbri279;
+
+import javax.inject.Inject;
+
+public class SomeBean
+{
+
+ @Inject @IntFactory
+ IntegerFactory integerFactory;
+
+ public String getObjectAsString()
+ {
+ return integerFactory.createObject().toString();
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/SomeBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri279/Wbri279Test.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/Sheep.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/Cat.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/CatLocal.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/EjbDescriptorLookupTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/Foo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/ManagerTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/ExampleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/External.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/Random.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/noncontextual/WebBean.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/security/SecurityTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/resources/META-INF/jboss-test-harness.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: ri/trunk/tests/src/test/resources/jndi.properties
___________________________________________________________________
Name: svn:eol-style
+ native
15 years, 1 month
Weld SVN: r3867 - ri/trunk/api/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-07 13:37:47 -0400 (Wed, 07 Oct 2009)
New Revision: 3867
Modified:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
Log:
fix eol-style
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java 2009-10-07 12:38:13 UTC (rev 3866)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java 2009-10-07 17:37:47 UTC (rev 3867)
@@ -1,28 +1,28 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessInjectionTarget<X>
-{
- public AnnotatedType<X> getAnnotatedType();
-
- public InjectionTarget<X> getInjectionTarget(!
);
-
- public void setInjectionTarget(InjectionTarget<X> injectionTarget);
-
- public void addDefinitionError(Throwable t);
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessInjectionTarget<X>
+{
+ public AnnotatedType<X> getAnnotatedType();
+
+ public InjectionTarget<X> getInjectionTarget();
+
+ public void setInjectionTarget(InjectionTarget<X> injectionTarget);
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
___________________________________________________________________
Name: svn:eol-style
+ native
15 years, 1 month
Weld SVN: r3866 - ri/branches.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-07 08:38:13 -0400 (Wed, 07 Oct 2009)
New Revision: 3866
Added:
ri/branches/1.0.0.PREVIEW5/
Log:
create milestone 5 branch for Sun integration
Copied: ri/branches/1.0.0.PREVIEW5 (from rev 3865, ri/trunk)
15 years, 1 month
Weld SVN: r3865 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/bean and 5 other directories.
by weld-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2009-10-07 06:01:23 -0400 (Wed, 07 Oct 2009)
New Revision: 3865
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/ClassInterceptionHandlerFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorBindingsAdapter.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorInterceptionHandlerFactory.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ball.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Defender.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Goalkeeper.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
Log:
Support @Interceptors-bound interceptors on managed beans and EJBs with @InterceptionBinding.
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-06 16:11:44 UTC (rev 3864)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -264,7 +264,8 @@
/**
* Interception model
*/
- private transient final InterceptorRegistry<Class<?>, Interceptor> boundInterceptorsRegistry = new InterceptorRegistry<Class<?>, Interceptor>();
+ private transient final InterceptorRegistry<Class<?>, Interceptor<?>> boundInterceptorsRegistry = new InterceptorRegistry<Class<?>, Interceptor<?>>();
+ private transient final InterceptorRegistry<Class<?>, Class<?>> declaredInterceptorsRegistry = new InterceptorRegistry<Class<?>, Class<?>>();
/**
* Create a new, root, manager
@@ -1413,8 +1414,13 @@
this.currentInjectionPoint.remove();
}
- public InterceptorRegistry<Class<?>, Interceptor> getBoundInterceptorsRegistry()
+ public InterceptorRegistry<Class<?>, Interceptor<?>> getBoundInterceptorsRegistry()
{
return boundInterceptorsRegistry;
}
+
+ public InterceptorRegistry<Class<?>, Class<?>> getDeclaredInterceptorsRegistry()
+ {
+ return declaredInterceptorsRegistry;
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-10-06 16:11:44 UTC (rev 3864)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -444,7 +444,7 @@
{
if (manager.getBoundInterceptorsRegistry().getInterceptionModel(getType()) == null)
{
- InterceptionModelBuilder<Class<?>, Interceptor> builder = InterceptionModelBuilder.newBuilderFor(getType(), (Class) Interceptor.class);
+ InterceptionModelBuilder<Class<?>, Interceptor<?>> builder = InterceptionModelBuilder.newBuilderFor(getType(), (Class) Interceptor.class);
Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(manager, getAnnotatedItem().getAnnotations());
for (Class<? extends Annotation> annotation : getStereotypes())
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java 2009-10-06 16:11:44 UTC (rev 3864)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -17,22 +17,28 @@
package org.jboss.webbeans.bean;
import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.Interceptor;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.interceptor.Interceptors;
+import javax.interceptor.ExcludeClassInterceptors;
-import org.jboss.interceptor.proxy.DirectClassInterceptionHandler;
-import org.jboss.interceptor.proxy.InterceptionHandler;
+import org.jboss.interceptor.proxy.InterceptorProxyCreatorImpl;
import org.jboss.interceptor.proxy.InterceptionHandlerFactory;
-import org.jboss.interceptor.proxy.InterceptorProxyCreatorImpl;
import org.jboss.interceptor.util.InterceptionUtils;
+import org.jboss.interceptor.model.InterceptionModelBuilder;
+import org.jboss.interceptor.registry.InterceptorRegistry;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.DeploymentException;
+import org.jboss.webbeans.bean.interceptor.InterceptorInterceptionHandlerFactory;
+import org.jboss.webbeans.bean.interceptor.ClassInterceptionHandlerFactory;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.injection.ConstructorInjectionPoint;
import org.jboss.webbeans.injection.InjectionContextImpl;
@@ -69,7 +75,6 @@
private ManagedBean<?> specializedBean;
-
/**
* Creates a simple, annotation defined Web Bean
*
@@ -115,7 +120,7 @@
{
instance = applyDecorators(instance, creationalContext, originalInjectionPoint);
}
- if (isInterceptionCandidate() && hasInterceptors())
+ if (isInterceptionCandidate() && (hasBoundInterceptors() || hasDeclaredInterceptors()))
{
instance = applyInterceptors(instance, creationalContext);
InterceptionUtils.executePostConstruct(instance);
@@ -176,7 +181,7 @@
{
try
{
- if (!isInterceptionCandidate() || !hasInterceptors())
+ if (!isInterceptionCandidate() || !hasBoundInterceptors())
preDestroy(instance);
else
{
@@ -204,6 +209,8 @@
initPostConstruct();
initPreDestroy();
initEEInjectionPoints();
+ if (isInterceptionCandidate())
+ initDeclaredInterceptors();
}
}
@@ -378,24 +385,40 @@
return !Beans.isInterceptor(getAnnotatedItem()) && !Beans.isDecorator(getAnnotatedItem());
}
- private boolean hasInterceptors()
+ private boolean hasBoundInterceptors()
{
- return manager.getBoundInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
+ if (manager.getBoundInterceptorsRegistry().getInterceptionModel(getType()) != null)
+ return manager.getBoundInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
+ else
+ return false;
}
+ private boolean hasDeclaredInterceptors()
+ {
+ if (manager.getDeclaredInterceptorsRegistry().getInterceptionModel(getType()) != null)
+ return manager.getDeclaredInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
+ else
+ return false;
+ }
+
protected T applyInterceptors(T instance, final CreationalContext<T> creationalContext)
{
try
{
- InterceptionHandlerFactory<Interceptor> factory = new InterceptionHandlerFactory<Interceptor>()
+ List<InterceptorRegistry<Class<?>, ?>> interceptionRegistries = new ArrayList<InterceptorRegistry<Class<?>,?>>();
+ List<InterceptionHandlerFactory<?>> interceptionHandlerFactories = new ArrayList<InterceptionHandlerFactory<?>>();
+ if (hasDeclaredInterceptors())
{
- public InterceptionHandler createFor(final Interceptor interceptor)
- {
- final Object instance = getManager().getReference(interceptor, creationalContext);
- return new DirectClassInterceptionHandler<Interceptor>(instance, interceptor.getBeanClass());
- }
- };
- instance = new InterceptorProxyCreatorImpl<Interceptor>(manager.getBoundInterceptorsRegistry(), factory).createProxyFromInstance(instance, getType());
+ interceptionRegistries.add(manager.getDeclaredInterceptorsRegistry());
+ interceptionHandlerFactories.add(new ClassInterceptionHandlerFactory(creationalContext, getManager()));
+ }
+ if (hasBoundInterceptors())
+ {
+ interceptionRegistries.add(manager.getBoundInterceptorsRegistry());
+ interceptionHandlerFactories.add(new InterceptorInterceptionHandlerFactory(creationalContext, manager));
+ }
+ if (interceptionRegistries.size() > 0)
+ instance = new InterceptorProxyCreatorImpl(interceptionRegistries, interceptionHandlerFactories).createProxyFromInstance(instance, getType());
} catch (Exception e)
{
@@ -404,4 +427,44 @@
return instance;
}
+ protected void initDeclaredInterceptors()
+ {
+ if (manager.getDeclaredInterceptorsRegistry().getInterceptionModel(getType()) == null)
+ {
+ InterceptionModelBuilder<Class<?>, Class<?>> builder = InterceptionModelBuilder.newBuilderFor(getType(), (Class) Class.class);
+
+ Class<?>[] classDeclaredInterceptors = null;
+ if (getAnnotatedItem().isAnnotationPresent(Interceptors.class))
+ {
+ classDeclaredInterceptors = getType().getAnnotation(Interceptors.class).value();
+ }
+
+ if (classDeclaredInterceptors != null)
+ {
+ builder.interceptPostConstruct().with(classDeclaredInterceptors);
+ builder.interceptPreDestroy().with(classDeclaredInterceptors);
+ }
+
+ List<WBMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
+ for (WBMethod<?, ?> method : businessMethods)
+ {
+ boolean excludeClassInterceptors = method.isAnnotationPresent(ExcludeClassInterceptors.class);
+ Class<?>[] methodDeclaredInterceptors = null;
+ if (method.isAnnotationPresent(Interceptors.class))
+ {
+ methodDeclaredInterceptors = method.getAnnotation(Interceptors.class).value();
+ }
+ if (!excludeClassInterceptors && classDeclaredInterceptors != null)
+ {
+ builder.interceptAroundInvoke(((AnnotatedMethod) method).getJavaMember()).with(classDeclaredInterceptors);
+ }
+ if (methodDeclaredInterceptors != null)
+ {
+ builder.interceptAroundInvoke(((AnnotatedMethod) method).getJavaMember()).with(methodDeclaredInterceptors);
+ }
+ }
+ manager.getDeclaredInterceptorsRegistry().registerInterceptionModel(getType(), builder.build());
+ }
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java 2009-10-06 16:11:44 UTC (rev 3864)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -40,6 +40,7 @@
import org.jboss.webbeans.bean.proxy.EnterpriseBeanInstance;
import org.jboss.webbeans.bean.proxy.EnterpriseBeanProxyMethodHandler;
import org.jboss.webbeans.bean.proxy.Marker;
+import org.jboss.webbeans.bean.interceptor.InterceptorBindingsAdapter;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.ejb.InternalEjbDescriptor;
import org.jboss.webbeans.ejb.api.SessionObjectReference;
@@ -53,6 +54,7 @@
import org.jboss.webbeans.resources.ClassTransformer;
import org.jboss.webbeans.util.Beans;
import org.jboss.webbeans.util.Proxies;
+import org.jboss.interceptor.model.InterceptionModel;
/**
* An enterprise bean representation
@@ -115,6 +117,7 @@
checkConflictingRoles();
checkObserverMethods();
checkScopeAllowed();
+ registerInterceptors();
}
}
@@ -394,6 +397,12 @@
{
return true;
}
-
+
+ private void registerInterceptors()
+ {
+ InterceptionModel<Class<?>,javax.enterprise.inject.spi.Interceptor<?>> model = manager.getBoundInterceptorsRegistry().getInterceptionModel(ejbDescriptor.getBeanClass());
+ if (model != null)
+ getManager().getServices().get(EjbServices.class).registerInterceptors(getEjbDescriptor(), new InterceptorBindingsAdapter(model));
+ }
}
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/ClassInterceptionHandlerFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/ClassInterceptionHandlerFactory.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/ClassInterceptionHandlerFactory.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.bean.interceptor;
+
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.interceptor.proxy.InterceptionHandlerFactory;
+import org.jboss.interceptor.proxy.InterceptionHandler;
+import org.jboss.interceptor.proxy.DirectClassInterceptionHandler;
+import org.jboss.webbeans.DeploymentException;
+import org.jboss.webbeans.BeanManagerImpl;
+
+/**
+ * @author Marius Bogoevici
+*/
+public class ClassInterceptionHandlerFactory implements InterceptionHandlerFactory<Class>
+{
+ private final CreationalContext<?> creationalContext;
+ private BeanManagerImpl manager;
+
+ public ClassInterceptionHandlerFactory(CreationalContext<?> creationalContext, BeanManagerImpl manager)
+ {
+ this.creationalContext = creationalContext;
+ this.manager = manager;
+ }
+
+ public InterceptionHandler createFor(Class clazz)
+ {
+ try
+ {
+ // this is not a managed instance - assume no-argument constructor exists
+ Object interceptorInstance = clazz.newInstance();
+ // inject
+ manager.createInjectionTarget(manager.createAnnotatedType(clazz)).inject(interceptorInstance, creationalContext);
+ return new DirectClassInterceptionHandler(interceptorInstance, clazz);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException(e);
+ }
+ }
+}
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorBindingsAdapter.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorBindingsAdapter.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorBindingsAdapter.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.bean.interceptor;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.Arrays;
+import java.lang.reflect.Method;
+
+import javax.enterprise.inject.spi.Interceptor;
+import javax.enterprise.inject.spi.InterceptionType;
+
+import org.jboss.webbeans.ejb.spi.InterceptorBindings;
+import org.jboss.interceptor.model.InterceptionModel;
+
+/**
+ * @author Marius Bogoevici
+ */
+public class InterceptorBindingsAdapter implements InterceptorBindings
+{
+
+ private InterceptionModel<Class<?>, Interceptor<?>> interceptionModel;
+
+ public InterceptorBindingsAdapter(InterceptionModel<Class<?>, Interceptor<?>> interceptionModel)
+ {
+ if (interceptionModel == null)
+ {
+ throw new IllegalArgumentException("Interception model must not be null");
+ }
+ this.interceptionModel = interceptionModel;
+ }
+
+ public Collection<Interceptor<?>> getAllInterceptors()
+ {
+ return interceptionModel.getAllInterceptors();
+ }
+
+ public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method)
+ {
+ if (interceptionType == null)
+ {
+ throw new IllegalArgumentException("InterceptionType must not be null");
+ }
+
+ if (method == null)
+ {
+ throw new IllegalArgumentException("Method must not be null");
+ }
+
+ org.jboss.interceptor.model.InterceptionType internalInterceptionType = org.jboss.interceptor.model.InterceptionType.valueOf(interceptionType.name());
+
+ if (internalInterceptionType.isLifecycleCallback())
+ {
+ throw new IllegalArgumentException("Interception type must not be lifecycle, but it is " + interceptionType.name());
+ }
+
+ return interceptionModel.getInterceptors(internalInterceptionType, method);
+
+ }
+
+ public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType)
+ {
+ if (interceptionType == null)
+ {
+ throw new IllegalArgumentException("InterceptionType must not be null");
+ }
+
+ org.jboss.interceptor.model.InterceptionType internalInterceptionType = org.jboss.interceptor.model.InterceptionType.valueOf(interceptionType.name());
+
+ if (!internalInterceptionType.isLifecycleCallback())
+ {
+ throw new IllegalArgumentException("Interception type must be lifecycle, but it is " + interceptionType.name());
+ }
+
+ return interceptionModel.getInterceptors(internalInterceptionType, null);
+ }
+}
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorInterceptionHandlerFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorInterceptionHandlerFactory.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/interceptor/InterceptorInterceptionHandlerFactory.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.bean.interceptor;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Interceptor;
+
+import org.jboss.interceptor.proxy.DirectClassInterceptionHandler;
+import org.jboss.interceptor.proxy.InterceptionHandler;
+import org.jboss.interceptor.proxy.InterceptionHandlerFactory;
+import org.jboss.webbeans.BeanManagerImpl;
+
+/**
+ * @author Marius Bogoevici
+*/
+public class InterceptorInterceptionHandlerFactory implements InterceptionHandlerFactory<Interceptor<?>>
+{
+ private final CreationalContext creationalContext;
+ private BeanManagerImpl manager;
+
+ public InterceptorInterceptionHandlerFactory(CreationalContext creationalContext, BeanManagerImpl manager)
+ {
+ this.creationalContext = creationalContext;
+ this.manager = manager;
+ }
+
+ public BeanManagerImpl getManager()
+ {
+ return manager;
+ }
+
+ public InterceptionHandler createFor(final Interceptor interceptor)
+ {
+ Object instance = getManager().getReference(interceptor, creationalContext);
+ return new DirectClassInterceptionHandler(instance, interceptor.getBeanClass());
+ }
+
+}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-10-06 16:11:44 UTC (rev 3864)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -25,6 +25,7 @@
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.ProcessObserverMethod;
import javax.enterprise.inject.spi.ProcessProducer;
+import javax.enterprise.inject.spi.Interceptor;
import javax.inject.Inject;
import org.jboss.webbeans.BeanManagerImpl;
@@ -47,6 +48,7 @@
import org.jboss.webbeans.bootstrap.events.ProcessProducerImpl;
import org.jboss.webbeans.ejb.EJBApiAbstraction;
import org.jboss.webbeans.ejb.InternalEjbDescriptor;
+import org.jboss.webbeans.ejb.spi.EjbServices;
import org.jboss.webbeans.event.ObserverFactory;
import org.jboss.webbeans.event.ObserverMethodImpl;
import org.jboss.webbeans.introspector.WBClass;
@@ -60,6 +62,7 @@
import org.jboss.webbeans.util.Reflections;
import org.jboss.webbeans.util.reflection.ParameterizedTypeImpl;
import org.jboss.webbeans.ws.WSApiAbstraction;
+import org.jboss.interceptor.model.InterceptionModel;
public class AbstractBeanDeployer<E extends BeanDeployerEnvironment>
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java 2009-10-06 16:11:44 UTC (rev 3864)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -26,7 +26,7 @@
public void testEnterpriseBeanInterceptionMetadataAdded() throws Exception
{
SessionBean<Ball> ballSessionBean = (SessionBean<Ball>)getCurrentManager().getBeans(Ball.class).iterator().next();
- InterceptionModel<Class<?>, Interceptor> interceptionModel = getCurrentManager().getBoundInterceptorsRegistry().getInterceptionModel(ballSessionBean.getType());
+ InterceptionModel<Class<?>, Interceptor<?>> interceptionModel = getCurrentManager().getBoundInterceptorsRegistry().getInterceptionModel(ballSessionBean.getType());
List<javax.enterprise.inject.spi.Interceptor> interceptors =
new ArrayList<javax.enterprise.inject.spi.Interceptor>(interceptionModel.getAllInterceptors());
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ball.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ball.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ball.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb3model;
+
+import javax.interceptor.Interceptors;
+import javax.interceptor.ExcludeClassInterceptors;
+
+/**
+ * @author Marius Bogoevici
+ */
+(a)Interceptors(Goalkeeper.class)
+public class Ball
+{
+ public static boolean played = false;
+
+ @ExcludeClassInterceptors
+ @Interceptors(Defender.class)
+ public void shoot()
+ {
+ played = true;
+ }
+
+ @Interceptors(Defender.class)
+ public void pass()
+ {
+ played = true;
+ };
+
+ public void lob()
+ {
+ played = true;
+ };
+}
Copied: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Defender.java (from rev 3861, ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java)
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Defender.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Defender.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb3model;
+
+import javax.interceptor.Interceptor;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+import org.jboss.webbeans.test.unit.interceptor.ejb.Pass;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+public class Defender
+{
+ public static boolean defended = false;
+
+ @AroundInvoke
+ public Object defend(InvocationContext context) throws Exception
+ {
+ defended = true;
+ return context.proceed();
+ }
+}
\ No newline at end of file
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb3model;
+
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.BeforeMethod;
+
+
+/**
+ * @author Marius Bogoevici
+ */
+@Artifact
+public class Ejb3InterceptionModelTests extends AbstractWebBeansTest
+{
+ @BeforeMethod
+ public void reset()
+ {
+ Ball.played = false;
+ Goalkeeper.caught = false;
+ Defender.defended = false;
+ }
+
+ @Test
+ public void testSimpleInterceptor()
+ {
+ Bean bean = getCurrentManager().getBeans(Ball.class).iterator().next();
+ CreationalContext creationalContext = getCurrentManager().createCreationalContext(bean);
+ Ball ball = (Ball) bean.create(creationalContext);
+ ball.shoot();
+ assert Defender.defended;
+ assert Ball.played;
+ assert !Goalkeeper.caught;
+ }
+
+
+ @Test
+ public void testSimpleInterceptor2()
+ {
+ Bean bean = getCurrentManager().getBeans(Ball.class).iterator().next();
+ CreationalContext creationalContext = getCurrentManager().createCreationalContext(bean);
+ Ball ball = (Ball) bean.create(creationalContext);
+ ball.pass();
+ assert Defender.defended;
+ assert Ball.played;
+ assert Goalkeeper.caught;
+ }
+
+ @Test
+ public void testSimpleInterceptor3()
+ {
+ Bean bean = getCurrentManager().getBeans(Ball.class).iterator().next();
+ CreationalContext creationalContext = getCurrentManager().createCreationalContext(bean);
+ Ball ball = (Ball) bean.create(creationalContext);
+ ball.lob();
+ assert !Defender.defended;
+ assert Ball.played;
+ assert Goalkeeper.caught;
+ }
+
+}
Copied: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Goalkeeper.java (from rev 3861, ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java)
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Goalkeeper.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb3model/Goalkeeper.java 2009-10-07 10:01:23 UTC (rev 3865)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb3model;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+public class Goalkeeper
+{
+
+ public static boolean caught = false;
+
+ @AroundInvoke
+ public Object catchBall(InvocationContext invocationContext) throws Exception
+ {
+ caught = true;
+ return invocationContext.proceed();
+ }
+}
\ No newline at end of file
15 years, 1 month
[webbeans-commits] Webbeans SVN: r3862 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-05 19:56:13 -0400 (Mon, 05 Oct 2009)
New Revision: 3862
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
Log:
minor
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-10-05 23:01:36 UTC (rev 3861)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-10-05 23:56:13 UTC (rev 3862)
@@ -40,18 +40,14 @@
}
@Test(groups = { "producerMethod" })
- @SpecAssertions( {
- @SpecAssertion(section = "3.3", id = "aa")
- } )
+ @SpecAssertion(section = "3.3", id = "aa")
public void testProducerOnNonBean() throws Exception
{
assert getBeans(Cherry.class).isEmpty();
}
@Test(groups = "producerMethod")
- @SpecAssertions( {
- @SpecAssertion(section = "3.3.5", id = "b")
- } )
+ @SpecAssertion(section = "3.3.5", id = "b")
public void testStaticDisposerMethod() throws Exception
{
assert getBeans(String.class).size() == 1;
15 years, 1 month
[webbeans-commits] Webbeans SVN: r3861 - in ri/trunk/tests/src/test: java/org/jboss/webbeans/test/unit/interceptor/ejb and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2009-10-05 19:01:36 -0400 (Mon, 05 Oct 2009)
New Revision: 3861
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Ball.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/BallImpl.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Pass.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Shot.java
ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/interceptor/ejb/
ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/interceptor/ejb/beans.xml
Log:
Testing interceptor metadata discovery to SessionBeans.
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Ball.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Ball.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Ball.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import javax.ejb.Local;
+
+/**
+ * @author Marius Bogoevici
+ */
+@Local
+public interface Ball
+{
+
+ void shoot();
+
+ void pass();
+}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/BallImpl.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/BallImpl.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/BallImpl.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Stateless
+public class BallImpl implements Ball
+{
+ @Shot
+ public void shoot()
+ {
+ }
+
+ @Pass
+ public void pass()
+ {
+ }
+}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Defender.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import javax.interceptor.Interceptor;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Pass @Interceptor
+public class Defender
+{
+ @AroundInvoke
+ public Object defend(InvocationContext context) throws Exception
+ {
+ return context.proceed();
+ }
+}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,45 @@
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.inject.spi.Interceptor;
+
+import org.jboss.interceptor.model.InterceptionModel;
+import static org.jboss.interceptor.model.InterceptionType.AROUND_INVOKE;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.webbeans.bean.SessionBean;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+@BeansXml("beans.xml")
+public class EnterpriseBeanInterceptionTests extends AbstractWebBeansTest
+{
+
+ @Test(groups = { "interceptors"})
+ public void testEnterpriseBeanInterceptionMetadataAdded() throws Exception
+ {
+ SessionBean<Ball> ballSessionBean = (SessionBean<Ball>)getCurrentManager().getBeans(Ball.class).iterator().next();
+ InterceptionModel<Class<?>, Interceptor> interceptionModel = getCurrentManager().getBoundInterceptorsRegistry().getInterceptionModel(ballSessionBean.getType());
+ List<javax.enterprise.inject.spi.Interceptor> interceptors =
+ new ArrayList<javax.enterprise.inject.spi.Interceptor>(interceptionModel.getAllInterceptors());
+
+ assert interceptors.size() == 2;
+ assert interceptors.get(0).getBeanClass().equals(Goalkeeper.class);
+ assert interceptors.get(1).getBeanClass().equals(Defender.class);
+
+ assert interceptionModel.getInterceptors(AROUND_INVOKE, ballSessionBean.getType().getMethod("shoot")).size() == 1;
+ assert interceptionModel.getInterceptors(AROUND_INVOKE, ballSessionBean.getType().getMethod("shoot")).get(0).getBeanClass().equals(Goalkeeper.class);
+
+ assert interceptionModel.getInterceptors(AROUND_INVOKE, ballSessionBean.getType().getMethod("pass")).size() == 1;
+ assert interceptionModel.getInterceptors(AROUND_INVOKE, ballSessionBean.getType().getMethod("pass")).get(0).getBeanClass().equals(Defender.class);
+
+ }
+
+}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Goalkeeper.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import javax.interceptor.Interceptor;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Shot @Interceptor
+public class Goalkeeper
+{
+
+ @AroundInvoke
+ public Object catchBall(InvocationContext invocationContext) throws Exception
+ {
+ return invocationContext.proceed();
+ }
+}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Pass.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Pass.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Pass.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@InterceptorBinding
+@Retention(RUNTIME)
+(a)Target({ElementType.METHOD, ElementType.TYPE})
+@Documented
+public @interface Pass
+{
+}
\ No newline at end of file
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Shot.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Shot.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/interceptor/ejb/Shot.java 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.test.unit.interceptor.ejb;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@InterceptorBinding
+@Retention(RUNTIME)
+(a)Target({ElementType.METHOD, ElementType.TYPE})
+@Documented
+public @interface Shot
+{
+}
Added: ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/interceptor/ejb/beans.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/interceptor/ejb/beans.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/webbeans/test/unit/interceptor/ejb/beans.xml 2009-10-05 23:01:36 UTC (rev 3861)
@@ -0,0 +1,6 @@
+<beans>
+ <interceptors>
+ <class>org.jboss.webbeans.test.unit.interceptor.ejb.Goalkeeper</class>
+ <class>org.jboss.webbeans.test.unit.interceptor.ejb.Defender</class>
+ </interceptors>
+</beans>
15 years, 1 month
[webbeans-commits] Webbeans SVN: r3860 - in ri/trunk/impl/src/main/java/org/jboss/webbeans: bean and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2009-10-05 19:00:55 -0400 (Mon, 05 Oct 2009)
New Revision: 3860
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java
Log:
Expanding interceptor metadata discovery to SessionBeans.
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-05 18:25:00 UTC (rev 3859)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-05 23:00:55 UTC (rev 3860)
@@ -264,7 +264,7 @@
/**
* Interception model
*/
- private transient final InterceptorRegistry<Class<?>, Interceptor> managedBeanBoundInterceptorsRegistry = new InterceptorRegistry<Class<?>, Interceptor>();
+ private transient final InterceptorRegistry<Class<?>, Interceptor> boundInterceptorsRegistry = new InterceptorRegistry<Class<?>, Interceptor>();
/**
* Create a new, root, manager
@@ -1413,8 +1413,8 @@
this.currentInjectionPoint.remove();
}
- public InterceptorRegistry<Class<?>, Interceptor> getManagedBeanInterceptorRegistry()
+ public InterceptorRegistry<Class<?>, Interceptor> getBoundInterceptorsRegistry()
{
- return managedBeanBoundInterceptorsRegistry;
+ return boundInterceptorsRegistry;
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-10-05 18:25:00 UTC (rev 3859)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-10-05 23:00:55 UTC (rev 3860)
@@ -25,17 +25,18 @@
import java.util.List;
import java.util.Set;
-import javassist.util.proxy.ProxyFactory;
-import javassist.util.proxy.ProxyObject;
-
import javax.enterprise.context.Dependent;
import javax.enterprise.context.NormalScope;
import javax.enterprise.context.spi.CreationalContext;
+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 javax.enterprise.inject.spi.InterceptionType;
+import javax.enterprise.inject.spi.Interceptor;
import javax.inject.Scope;
+import org.jboss.interceptor.model.InterceptionModelBuilder;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bean.proxy.DecoratorProxyMethodHandler;
@@ -47,10 +48,14 @@
import org.jboss.webbeans.introspector.WBMethod;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
import org.jboss.webbeans.util.Beans;
import org.jboss.webbeans.util.Proxies;
import org.jboss.webbeans.util.Strings;
+import javassist.util.proxy.ProxyFactory;
+import javassist.util.proxy.ProxyObject;
+
/**
* An abstract bean representation common for class-based beans
*
@@ -116,6 +121,8 @@
initDecorators();
checkType();
initProxyClassForDecoratedBean();
+ if (isInterceptionCandidate())
+ initInterceptors();
}
protected void checkType()
@@ -409,6 +416,54 @@
{
return preDestroy;
}
-
+ protected abstract boolean isInterceptionCandidate();
+
+ /**
+ * Extracts the complete set of interception bindings from a given set of annotations.
+ *
+ * @param manager
+ * @param annotations
+ * @return
+ */
+ protected static Set<Annotation> flattenInterceptorBindings(BeanManagerImpl manager, Set<Annotation> annotations)
+ {
+ Set<Annotation> foundInterceptionBindingTypes = new HashSet<Annotation>();
+ for (Annotation annotation: annotations)
+ {
+ if (manager.isInterceptorBindingType(annotation.annotationType()))
+ {
+ foundInterceptionBindingTypes.add(annotation);
+ foundInterceptionBindingTypes.addAll(manager.getServices().get(MetaAnnotationStore.class).getInterceptorBindingModel(annotation.annotationType()).getInheritedInterceptionBindingTypes());
+ }
+ }
+ return foundInterceptionBindingTypes;
+ }
+
+ protected void initInterceptors()
+ {
+ if (manager.getBoundInterceptorsRegistry().getInterceptionModel(getType()) == null)
+ {
+ InterceptionModelBuilder<Class<?>, Interceptor> builder = InterceptionModelBuilder.newBuilderFor(getType(), (Class) Interceptor.class);
+
+ Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(manager, getAnnotatedItem().getAnnotations());
+ for (Class<? extends Annotation> annotation : getStereotypes())
+ {
+ classBindingAnnotations.addAll(flattenInterceptorBindings(manager, manager.getStereotypeDefinition(annotation)));
+ }
+
+ builder.interceptPostConstruct().with(manager.resolveInterceptors(InterceptionType.POST_CONSTRUCT, classBindingAnnotations.toArray(new Annotation[0])).toArray(new Interceptor<?>[]{}));
+ builder.interceptPreDestroy().with(manager.resolveInterceptors(InterceptionType.PRE_DESTROY, classBindingAnnotations.toArray(new Annotation[0])).toArray(new Interceptor<?>[]{}));
+
+ List<WBMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
+ for (WBMethod<?, ?> method : businessMethods)
+ {
+ List<Annotation> methodBindingAnnotations = new ArrayList<Annotation>(classBindingAnnotations);
+ methodBindingAnnotations.addAll(flattenInterceptorBindings(manager, method.getAnnotations()));
+ List<Interceptor<?>> methodBoundInterceptors = manager.resolveInterceptors(InterceptionType.AROUND_INVOKE, methodBindingAnnotations.toArray(new Annotation[]{}));
+ builder.interceptAroundInvoke(((AnnotatedMethod) method).getJavaMember()).with(methodBoundInterceptors.toArray(new Interceptor[]{}));
+ }
+ manager.getBoundInterceptorsRegistry().registerInterceptionModel(getType(), builder.build());
+ }
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java 2009-10-05 18:25:00 UTC (rev 3859)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java 2009-10-05 23:00:55 UTC (rev 3860)
@@ -16,21 +16,15 @@
*/
package org.jboss.webbeans.bean;
+import java.util.Set;
+
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.InterceptionType;
import javax.enterprise.inject.spi.Interceptor;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.HashSet;
-import org.jboss.interceptor.model.InterceptionModelBuilder;
import org.jboss.interceptor.proxy.DirectClassInterceptionHandler;
import org.jboss.interceptor.proxy.InterceptionHandler;
import org.jboss.interceptor.proxy.InterceptionHandlerFactory;
@@ -210,8 +204,6 @@
initPostConstruct();
initPreDestroy();
initEEInjectionPoints();
- if (isInterceptionCandidate())
- initInterceptors();
}
}
@@ -223,31 +215,7 @@
this.resourceInjectionPoints = Beans.getResourceInjectionPoints(this, getAnnotatedItem(), manager);
}
- private void initInterceptors()
- {
- InterceptionModelBuilder<Class<?>, Interceptor> builder = InterceptionModelBuilder.newBuilderFor(getType(), (Class) Interceptor.class);
- Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(manager, annotatedItem.getAnnotations());
- for (Class<? extends Annotation> annotation: getStereotypes())
- {
- classBindingAnnotations.addAll(flattenInterceptorBindings(manager, manager.getStereotypeDefinition(annotation)));
- }
-
- builder.interceptPostConstruct().with(manager.resolveInterceptors(InterceptionType.POST_CONSTRUCT, classBindingAnnotations.toArray(new Annotation[0])).toArray(new Interceptor<?>[]{}));
- builder.interceptPreDestroy().with(manager.resolveInterceptors(InterceptionType.PRE_DESTROY, classBindingAnnotations.toArray(new Annotation[0])).toArray(new Interceptor<?>[]{}));
-
- List<WBMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
- for (WBMethod<?, ?> method : businessMethods)
- {
- List<Annotation> methodBindingAnnotations = new ArrayList<Annotation>(classBindingAnnotations);
- methodBindingAnnotations.addAll(flattenInterceptorBindings(manager, method.getAnnotations()));
- List<Interceptor<?>> methodBoundInterceptors = manager.resolveInterceptors(InterceptionType.AROUND_INVOKE, methodBindingAnnotations.toArray(new Annotation[]{}));
- builder.interceptAroundInvoke(((AnnotatedMethod)method).getJavaMember()).with(methodBoundInterceptors.toArray(new Interceptor[]{}));
- }
- manager.getManagedBeanInterceptorRegistry().registerInterceptionModel(getType(), builder.build());
- }
-
-
/**
* Validates the type
*/
@@ -405,17 +373,17 @@
return specializedBean;
}
- private boolean isInterceptionCandidate()
+ protected boolean isInterceptionCandidate()
{
return !Beans.isInterceptor(getAnnotatedItem()) && !Beans.isDecorator(getAnnotatedItem());
}
private boolean hasInterceptors()
{
- return manager.getManagedBeanInterceptorRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
+ return manager.getBoundInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
}
- private T applyInterceptors(T instance, final CreationalContext<T> creationalContext)
+ protected T applyInterceptors(T instance, final CreationalContext<T> creationalContext)
{
try
{
@@ -427,7 +395,7 @@
return new DirectClassInterceptionHandler<Interceptor>(instance, interceptor.getBeanClass());
}
};
- instance = new InterceptorProxyCreatorImpl<Interceptor>(manager.getManagedBeanInterceptorRegistry(), factory).createProxyFromInstance(instance, getType());
+ instance = new InterceptorProxyCreatorImpl<Interceptor>(manager.getBoundInterceptorsRegistry(), factory).createProxyFromInstance(instance, getType());
} catch (Exception e)
{
@@ -436,24 +404,4 @@
return instance;
}
- /**
- * Extracts the complete set of interception bindings from a given set of annotations.
- *
- * @param manager
- * @param annotations
- * @return
- */
- protected static Set<Annotation> flattenInterceptorBindings(BeanManagerImpl manager, Set<Annotation> annotations)
- {
- Set<Annotation> foundInterceptionBindingTypes = new HashSet<Annotation>();
- for (Annotation annotation: annotations)
- {
- if (manager.isInterceptorBindingType(annotation.annotationType()))
- {
- foundInterceptionBindingTypes.add(annotation);
- foundInterceptionBindingTypes.addAll(manager.getServices().get(MetaAnnotationStore.class).getInterceptorBindingModel(annotation.annotationType()).getInheritedInterceptionBindingTypes());
- }
- }
- return foundInterceptionBindingTypes;
- }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java 2009-10-05 18:25:00 UTC (rev 3859)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SessionBean.java 2009-10-05 23:00:55 UTC (rev 3860)
@@ -389,6 +389,11 @@
{
return Collections.emptySet();
}
+
+ protected boolean isInterceptionCandidate()
+ {
+ return true;
+ }
}
15 years, 1 month
[webbeans-commits] Webbeans SVN: r3859 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-05 14:25:00 -0400 (Mon, 05 Oct 2009)
New Revision: 3859
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/SimpleBean.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
Change tests to jboss-as-broken, split out an assertion
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -44,7 +44,7 @@
public class ProcessObserverMethodErrorTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test(groups = "jboss-as-broken")
@SpecAssertion(section = "11.5.9", id = "da")
public void testAddDefinitionError()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -45,7 +45,7 @@
public class ProcessObserverMethodExceptionTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test(groups = "jboss-as-broken")
@SpecAssertion(section = "11.5.9", id = "db")
public void testExceptionIsDefinitionError()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodObserver.java 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodObserver.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -8,6 +8,6 @@
{
public void observeObserverMethodForEventC(@Observes ProcessObserverMethod<?, EventC> event)
{
- new RuntimeException("Definition error for EventC");
+ throw new RuntimeException("Definition error for EventC");
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -34,6 +34,16 @@
assert getBeans(GiraffeLocal.class).size() == 1;
assert getBeans(GiraffeLocal.class).iterator().next().getScope().equals(Dependent.class);
}
+
+
+ @Test(groups = { "new", "jboss-as-broken" })
+ @SpecAssertion(section = "3.7.1", id = "ab")
+ public void testConstructorAnnotatedInjectCalled()
+ {
+ ExplicitConstructor bean = getInstanceByType(ExplicitConstructor.class);
+ assert bean.getConstructorCalls() == 1;
+ assert bean.getInjectedSimpleBean() instanceof SimpleBean;
+ }
@Test(groups = { "enterpriseBeans" })
@SpecAssertion(section = "3.2", id = "c")
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.definition;
+
+import javax.ejb.Local;
+
+@Local
+public interface ExplicitConstructor
+{
+ public int getConstructorCalls();
+ public void setConstructorCalls(int numCalls);
+
+ public SimpleBean getInjectedSimpleBean();
+ public void setInjectedSimpleBean(SimpleBean injectedSimpleBean);
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -0,0 +1,52 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.definition;
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.New;
+import javax.inject.Inject;
+
+import org.jboss.jsr299.tck.literals.NewLiteral;
+
+@Stateless
+public class ExplicitConstructorSessionBean implements ExplicitConstructor
+{
+
+ private static int constructorCalls = 0;
+ private static SimpleBean injectedSimpleBean;
+
+ public static final New NEW = new NewLiteral()
+ {
+
+ public Class<?> value()
+ {
+ return ExplicitConstructorSessionBean.class;
+ }
+ };
+
+ @Inject
+ public ExplicitConstructorSessionBean(SimpleBean bean)
+ {
+ constructorCalls++;
+ injectedSimpleBean = bean;
+ }
+
+ public int getConstructorCalls()
+ {
+ return constructorCalls;
+ }
+
+ public void setConstructorCalls(int numCalls)
+ {
+ constructorCalls = numCalls;
+ }
+
+ public SimpleBean getInjectedSimpleBean()
+ {
+ return injectedSimpleBean;
+ }
+
+ public void setInjectedSimpleBean(SimpleBean injectedSimpleBean)
+ {
+ ExplicitConstructorSessionBean.injectedSimpleBean = injectedSimpleBean;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/SimpleBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/SimpleBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/SimpleBean.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.definition;
+
+class SimpleBean
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/SimpleBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -22,7 +22,7 @@
public class NewEnterpriseBeanICTest extends AbstractJSR299Test
{
- @Test(groups = { "new", "ri-broken" })
+ @Test(groups = { "new", "jboss-as-broken" })
@SpecAssertion(section = "3.12", id = "l")
public void testNewBeanHasSameConstructor()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-10-05 18:25:00 UTC (rev 3859)
@@ -70,7 +70,7 @@
}
@Test
- @SpecAssertion(section = "3.7.1", id = "a")
+ @SpecAssertion(section = "3.7.1", id = "aa")
public void testInitializerAnnotatedConstructor() throws Exception
{
Sheep.constructedCorrectly = false;
@@ -92,7 +92,7 @@
}
@Test
- @SpecAssertion(section = "3.7.1", id = "a")
+ @SpecAssertion(section = "3.7.1", id = "aa")
public void testInitializerAnnotatedConstructorUsedOverEmptyConstuctor() throws Exception
{
getInstanceByType(Turkey.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-10-05 18:07:40 UTC (rev 3858)
+++ tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-10-05 18:25:00 UTC (rev 3859)
@@ -1229,14 +1229,21 @@
<section id="3.7" title="Bean constructors">
<assertion id="a">
- <text>When the container instantiates a managed bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
+ <text>When the container instantiates a bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
</assertion>
</section>
<section id="3.7.1" title="Declaring a bean constructor">
- <assertion id="a">
+ <group>
<text>The bean constructor may be identified by annotating the constructor |@Inject|</text>
- </assertion>
+ <assertion id="aa">
+ <text>Test an @Inject constructor is used on a managed bean</text>
+ </assertion>
+ <assertion id="ab">
+ <text>Test an @Inject constructor is used on a session bean</text>
+ </assertion>
+ </group>
+
<assertion id="ba">
<text>If a bean class does not explicitly declare a constructor using |@Inject|, the constructor that accepts no parameters is the bean constructor.</text>
15 years, 1 month
[webbeans-commits] Webbeans SVN: r3858 - ri/trunk/impl/src/main/java/org/jboss/webbeans and 7 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-05 14:07:40 -0400 (Mon, 05 Oct 2009)
New Revision: 3858
Removed:
ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java
Log:
Remove deprecated interface, fix RI for test
Deleted: ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -1,33 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package javax.enterprise.event;
-
-/**
- * The contract between the manager and an observer object.
- * This interface should not be called directly by the application.
- *
- * @author Gavin King
- *
- * @deprecated Removed in latest rev of spec.
- *
- * TODO Move into RI and remove TCK assertions
- */
-@Deprecated
-public interface Observer<T>
-{
- public boolean notify(T event);
-}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -18,9 +18,7 @@
import java.io.Serializable;
import java.lang.annotation.Annotation;
-import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -58,9 +56,10 @@
import javax.enterprise.inject.spi.PassivationCapable;
import javax.inject.Qualifier;
+import org.jboss.interceptor.registry.InterceptorRegistry;
import org.jboss.webbeans.bean.DecoratorImpl;
-import org.jboss.webbeans.bean.SessionBean;
import org.jboss.webbeans.bean.InterceptorImpl;
+import org.jboss.webbeans.bean.SessionBean;
import org.jboss.webbeans.bean.proxy.ClientProxyProvider;
import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
import org.jboss.webbeans.context.CreationalContextImpl;
@@ -78,12 +77,20 @@
import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
import org.jboss.webbeans.metadata.cache.ScopeModel;
-import org.jboss.webbeans.resolution.*;
+import org.jboss.webbeans.resolution.NameBasedResolver;
+import org.jboss.webbeans.resolution.Resolvable;
+import org.jboss.webbeans.resolution.ResolvableFactory;
+import org.jboss.webbeans.resolution.ResolvableWBClass;
+import org.jboss.webbeans.resolution.TypeSafeBeanResolver;
+import org.jboss.webbeans.resolution.TypeSafeDecoratorResolver;
+import org.jboss.webbeans.resolution.TypeSafeInterceptorResolver;
+import org.jboss.webbeans.resolution.TypeSafeObserverResolver;
+import org.jboss.webbeans.resolution.TypeSafeResolver;
import org.jboss.webbeans.resources.ClassTransformer;
import org.jboss.webbeans.util.Beans;
+import org.jboss.webbeans.util.Observers;
import org.jboss.webbeans.util.Proxies;
import org.jboss.webbeans.util.Reflections;
-import org.jboss.interceptor.registry.InterceptorRegistry;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@@ -581,7 +588,7 @@
public <T> Set<ObserverMethod<?, T>> resolveObserverMethods(T event, Annotation... bindings)
{
- checkEventObjectType(event);
+ Observers.checkEventObjectType(event);
return resolveObserverMethods(event.getClass(), bindings);
}
@@ -631,32 +638,6 @@
}
- private void checkEventObjectType(Object event)
- {
- Class<?> eventType = event.getClass();
- Type[] types;
- Type resolvedType = new Reflections.HierarchyDiscovery(eventType).getResolvedType();
- if (resolvedType instanceof Class<?>)
- {
- types = new Type[0];
- }
- else if (resolvedType instanceof ParameterizedType)
- {
- types = ((ParameterizedType) resolvedType).getActualTypeArguments();
- }
- else
- {
- throw new IllegalArgumentException("Event type " + resolvedType + " is not allowed");
- }
- for (Type type : types)
- {
- if (type instanceof TypeVariable)
- {
- throw new IllegalArgumentException("Cannot provide an event type parameterized with a type parameter " + resolvedType);
- }
- }
- }
-
/**
* A collection of enabled policy classes
*
@@ -875,7 +856,7 @@
public void fireEvent(Type eventType, Object event, Annotation... qualifiers)
{
- checkEventObjectType(event);
+ Observers.checkEventObjectType(event);
notifyObservers(event, resolveObserverMethods(eventType, qualifiers));
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -27,6 +27,7 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.bean.builtin.facade.AbstractFacade;
+import org.jboss.webbeans.util.Observers;
import org.jboss.webbeans.util.Strings;
/**
@@ -92,6 +93,7 @@
public <U extends T> Event<U> selectEvent(Type subtype, Annotation[] bindings)
{
+ Observers.checkEventObjectType(subtype);
return new EventImpl<U>(
subtype,
this.getManager(),
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -18,30 +18,43 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
-import javax.enterprise.event.Observer;
-
/**
* @author pmuir
*
*/
public class Observers
{
-
- public static Type getTypeOfObserver(Observer<?> observer)
+
+ public static void checkEventObjectType(Type eventType)
{
- for (Type type : observer.getClass().getGenericInterfaces())
+ Type[] types;
+ Type resolvedType = new Reflections.HierarchyDiscovery(eventType).getResolvedType();
+ if (resolvedType instanceof Class<?>)
{
- if (type instanceof ParameterizedType)
+ types = new Type[0];
+ }
+ else if (resolvedType instanceof ParameterizedType)
+ {
+ types = ((ParameterizedType) resolvedType).getActualTypeArguments();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Event type " + resolvedType + " is not allowed");
+ }
+ for (Type type : types)
+ {
+ if (type instanceof TypeVariable<?>)
{
- ParameterizedType ptype = (ParameterizedType) type;
- if (Observer.class.isAssignableFrom((Class<?>) ptype.getRawType()))
- {
- return ptype.getActualTypeArguments()[0];
- }
+ throw new IllegalArgumentException("Cannot provide an event type parameterized with a type parameter " + resolvedType);
}
}
- throw new RuntimeException("Cannot find observer's event type: " + observer);
}
+ public static void checkEventObjectType(Object event)
+ {
+ checkEventObjectType(event.getClass());
+
+ }
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -11,7 +11,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.UnsatisfiedResolutionException;
import javax.enterprise.inject.spi.Annotated;
@@ -269,6 +268,7 @@
return bindingTypes;
}
+ @Override
public Set<Class<? extends Annotation>> getStereotypes()
{
return Collections.emptySet();
@@ -281,20 +281,21 @@
@Test
public void testObserverBelongingToChildDoesNotFireForParentActivity()
{
- BeanManager childActivity = getCurrentManager().createActivity();
- Observer<NightTime> observer = new Observer<NightTime>()
- {
-
- public boolean notify(NightTime event)
- {
- assert false;
- return false;
- }
-
- };
- //TODO Fix this test to use an observer method in a child activity
-// childActivity.addObserver(observer);
- getCurrentManager().fireEvent(new NightTime());
+
+// BeanManager childActivity = getCurrentManager().createActivity();
+// ObserverMethod<NightTime> observer = new Observer<NightTime>()
+// {
+//
+// public boolean notify(NightTime event)
+// {
+// assert false;
+// return false;
+// }
+//
+// };
+// //TODO Fix this test to use an observer method in a child activity
+//// childActivity.addObserver(observer);
+// getCurrentManager().fireEvent(new NightTime());
}
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -10,7 +10,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
@@ -30,14 +29,7 @@
public class ELCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -5,10 +5,8 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -21,14 +19,7 @@
public class EventCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
@@ -64,26 +55,26 @@
@Test
public void testEventProcessedByCurrentActivity()
{
- Context dummyContext = new DummyContext();
- getCurrentManager().addContext(dummyContext);
- WebBeansManager childActivity = getCurrentManager().createActivity();
- TestableObserver<NightTime> observer = new TestableObserver<NightTime>()
- {
+// Context dummyContext = new DummyContext();
+// getCurrentManager().addContext(dummyContext);
+// WebBeansManager childActivity = getCurrentManager().createActivity();
+// TestableObserver<NightTime> observer = new TestableObserver<NightTime>()
+// {
+//
+// boolean observed = false;
+//
+// public boolean notify(NightTime event)
+// {
+// observed = true;
+// return false;
+// }
+//
+// public boolean isObserved()
+// {
+// return observed;
+// }
- boolean observed = false;
-
- public boolean notify(NightTime event)
- {
- observed = true;
- return false;
- }
-
- public boolean isObserved()
- {
- return observed;
- }
-
- };
+// };
//TODO Fix this test to use observer method within a child activity
// childActivity.addObserver(observer);
// childActivity.setCurrent(dummyContext.getScopeType());
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -6,7 +6,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
@@ -22,14 +21,7 @@
public class InactiveScopeTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -5,7 +5,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
@@ -21,13 +20,6 @@
public class InjectedManagerCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
private static class DummyContext implements Context
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -10,7 +10,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
@@ -30,13 +29,6 @@
public class InstanceCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
public static class TameLiteral extends AnnotationLiteral<Tame> implements Tame {}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -5,7 +5,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
@@ -23,14 +22,6 @@
public class JndiManagerCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -5,7 +5,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
@@ -16,14 +15,6 @@
public class NonNormalScopeTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -32,7 +32,6 @@
@Resource(source="javax.enterprise.inject.spi.Extension", destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
})
@IntegrationTest
-// TODO declare injection point on Cat and verify remaining assertions
public class CustomBeanImplementationTest extends AbstractJSR299Test
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -35,7 +35,7 @@
@SpecVersion(spec="cdi", version="PFD2")
public class UseBeforeValidationTest extends AbstractJSR299Test
{
- @Test(groups = {"ri-broken", "rewrite"})
+ @Test(groups = {"broken", "rewrite"})
//Still not clear how the container should now allow this, but the RI is clearly not implementing this assertion
// TODO Needs Extension stuff adding
// TODO very hard to test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java 2009-10-05 17:50:49 UTC (rev 3857)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java 2009-10-05 18:07:40 UTC (rev 3858)
@@ -51,11 +51,10 @@
assert alarm.getNumViolentBreakIns() == 1;
}
- @Test(groups = {"events", "ri-broken" }, expectedExceptions = IllegalArgumentException.class)
+ @Test(groups = {"events" }, expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "10.3.1", id = "eab")
public <T> void testEventSelectThrowsExceptionIfEventTypeHasTypeVariable()
{
- // TODO This test *doesn't* pass an event with a type variable in, it passes in a raw class PLM
SecuritySensor sensor = getInstanceByType(SecuritySensor.class);
sensor.securityEvent.select(new TypeLiteral<SecurityEvent_Illegal<T>>() {});
}
15 years, 1 month