[webbeans-dev] Context.get with mismatched scopes
by David Allen
Hi Gavin,
I was just writing some tests and realized the spec in section 8.1 does
not clearly state what happens if I use a context from one scope and a
bean from a different scope. Should this be a runtime exception?
Example:
@Dependent
public class MyBean {}
...
Bean myBean = manager.resolveByType(MyBean.class).iterator().next();
MyBean myBeanInstance =
manager.getContext(SessionScoped.class).get(myBean);
-------------
David Allen
david.allen(a)acm.org
15 years, 7 months
[webbeans-dev] JBoss AS integration
by Pete Muir
https://jira.jboss.org/jira/browse/JBAS-6371
Web Beans 1.0.0.ALPHA2 is now included in JBoss AS trunk (6.0 series)
and 5.1 branch by default, so to deploy a Web Beans app to either of
these, you just need to put a META-INF/web-beans.xml file in your app,
and start using JSR-299 annotations :-)
Discussions are still under way whether to backport this to JBoss 5.0.x.
15 years, 10 months
[webbeans-dev] Alpha2
by Pete Muir
All,
We are approaching alpha2, so please don't commit anything big to the
RI. Two tasks are outstanding - to fix the EJB3 integration, and to
test the dependent object destruction written by Nik.
We'll get both done tomorrow, and then start the release process. The
examples look like the are working, so it should be a reasonably
smooth ride...
Pete
15 years, 10 months
[webbeans-dev] Packages proposal
by Gavin King
Here's a proposal for API repackaging:
javax.annotation: (existing package)
@NonBinding
javax.interceptor: (existing package)
@Interceptor
@InterceptorBindingType
javax.decorator: (decorators)
@Decorator
@Decorates
javax.stereotype: (stereotypes)
@Stereotype
@Model
javax.context: (scopes and contexts)
@ScopeType
@ApplicationScoped
@RequestScoped
@SessionScoped
@ConversationScoped
Context
Contextual
ContextNotActiveException
Conversation
javax.inject: (injection, binding types, deployment types)
@BindingType
@DeploymentType
@Named
@Initializer
@New
@Specializes
@Realizes
@Current
@Production
@Standard
@Produces
@Disposes
@Obtains
Instance
DefinitionException
DeploymentException
ExecutionException
IllegalProductException
CreationException
AmbiguousDependencyException
DuplicateBindingTypeException
InconsistentSpecializationException
NullableDependencyException
UnproxyableDependencyException
UnsatisfiedDependencyException
UnserializableDependencyException
TypeLiteral
AnnotationLiteral
javax.inject.manager: (framework integration SPI)
@Initialized
@Deployed
Bean
InjectionPoint
Decorator
Interceptor
InterceptionType
Manager
javax.event: (events)
@Observes
@Asynchronously
@IfExists
@AfterTransactionCompletion
@AfterTransactionFailure
@AfterTransactionSuccess
@BeforeTransactionCompletion
@Fires
Event
Observer
ObserverException
The types I'm most uncomfortable with are TypeLiteral and
AnnotationLiteral, which aren't really specific to injection. I wonder
if there's some other place they could go....?
Arguably @Named belongs somewhere else....
And there's a piece of me which wants to put @Realizes and
@Specializes in javax.stereotype, for some reason which I can't quite
put my finger on....
Thoughts?
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
15 years, 10 months
[webbeans-dev] New draft for review
by Gavin King
Hi folks, here's the latest, incorporating:
* New name: Java Contexts and Dependency Injection
* Repackaging
* Aggregated namespages 9.2 (please review!)
* Standard schema location 9.3 (please review!)
* Notes regarding open issues in appendix A, chapter 3 and chapter 9
I still need to incorporate Mike's changes to chapter 1.
I will submit this spec to the JCP in about 12 hours from now!
Please let me know ASAP of any problems!
Thanks.
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
15 years, 10 months
[webbeans-dev] Clarification of behavior
by David Allen
In section 8.5 of the spec, it states:
An observer method must be a method of a simple bean
implementation class or session bean implementation class. An
observer method may be either static or non-static. If the bean
is a session bean, the observer method must be a business
method of the EJB or a static method of the bean class.
In the case of the latter, what is the behavior of the container if a
session bean violates that statement? Perhaps DefinitionException?
Usually the spec is explicit about the exception thrown.
Thanks,
--
David Allen <drallendc(a)gmail.com>
15 years, 10 months