[
https://issues.jboss.org/browse/JBIDE-12645?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich updated JBIDE-12645:
------------------------------------------
Description:
See
http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html/contexts.html...
Steps:
1. Import into Eclipse test project
/jbosstools-javaee/cdi/tests/org.jboss.tools.cdi.core.test/projects/weld1.1
2. Open Java source src/test/Test.java
{code}
package test;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
import org.jboss.weld.context.ApplicationContext;
import org.jboss.weld.context.ConversationContext;
import org.jboss.weld.context.DependentContext;
import org.jboss.weld.context.RequestContext;
import org.jboss.weld.context.SessionContext;
import org.jboss.weld.context.SingletonContext;
import org.jboss.weld.context.bound.Bound;
import org.jboss.weld.context.bound.BoundConversationContext;
import org.jboss.weld.context.bound.BoundRequestContext;
import org.jboss.weld.context.bound.BoundSessionContext;
import org.jboss.weld.context.ejb.Ejb;
import org.jboss.weld.context.ejb.EjbRequestContext;
import org.jboss.weld.context.http.Http;
import org.jboss.weld.context.http.HttpConversationContext;
import org.jboss.weld.context.http.HttpRequestContext;
import org.jboss.weld.context.http.HttpSessionContext;
import org.jboss.weld.context.unbound.Unbound;
public class Test {
//Bean @Default DependentContext is injected
@Inject DependentContext dependentContext;
//Bean @Default ApplicationContext is injected
@Inject ApplicationContext applicationContext;
//Bean @Default SingletonContext is injected
@Inject SingletonContext singletonContext;
//Bean @Unbound RequestContext is injected
@Inject @Unbound RequestContext unboundRequestContext;
//Bean @Bound @Default BoundRequestContext is injected
@Inject @Bound RequestContext boundRequestContext;
@Inject @Default BoundRequestContext boundRequestContext2;
//Bean @Http @Default HttpRequestContext is injected
@Inject @Http RequestContext httpRequestContext;
@Inject @Default HttpRequestContext httpRequestContext2;
//Bean @Ejb @Default EjbRequestContext is injected
@Inject @Ejb RequestContext ejbRequestContext;
@Inject @Default EjbRequestContext ejbRequestContext2;
//Bean BoundConversationContext is injected
@Inject @Bound ConversationContext boundConversationContext;
@Inject @Default BoundConversationContext boundConversationContext2;
//Bean HttpConversationContext is injected
@Inject @Http ConversationContext httpConversationContext;
@Inject @Default HttpConversationContext httpConversationContext2;
//Bean @Bound @Default BoundSessionContext is injected
@Inject @Bound SessionContext boundSessionContext;
@Inject @Default BoundSessionContext boundSessionContext2;
//Bean @Http @Default HttpSessionContext is injected
@Inject @Http SessionContext httpSessionContext;
@Inject @Default HttpSessionContext httpSessionContext2;
//Invalid: 3 beans are available for injection.
@Inject RequestContext invalidRequestContext;
//Invalid: 2 beans are available for injection.
@Inject ConversationContext invalidConversationContext;
//Invalid: 2 beans are available for injection.
@Inject SessionContext invalidSessionContext;
}
{code}
ASSERT: All injection points are satisfied, for three last injection points multiple beans
are available.
Open-on opens interfaces for correspondent beans.
was:See
http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html/contexts.html...
Weld extensions: built in contexts
----------------------------------
Key: JBIDE-12645
URL:
https://issues.jboss.org/browse/JBIDE-12645
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: CDI extensions
Reporter: Alexey Kazakov
Assignee: Viacheslav Kabanovich
Fix For: 4.2.x
See
http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html/contexts.html...
Steps:
1. Import into Eclipse test project
/jbosstools-javaee/cdi/tests/org.jboss.tools.cdi.core.test/projects/weld1.1
2. Open Java source src/test/Test.java
{code}
package test;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
import org.jboss.weld.context.ApplicationContext;
import org.jboss.weld.context.ConversationContext;
import org.jboss.weld.context.DependentContext;
import org.jboss.weld.context.RequestContext;
import org.jboss.weld.context.SessionContext;
import org.jboss.weld.context.SingletonContext;
import org.jboss.weld.context.bound.Bound;
import org.jboss.weld.context.bound.BoundConversationContext;
import org.jboss.weld.context.bound.BoundRequestContext;
import org.jboss.weld.context.bound.BoundSessionContext;
import org.jboss.weld.context.ejb.Ejb;
import org.jboss.weld.context.ejb.EjbRequestContext;
import org.jboss.weld.context.http.Http;
import org.jboss.weld.context.http.HttpConversationContext;
import org.jboss.weld.context.http.HttpRequestContext;
import org.jboss.weld.context.http.HttpSessionContext;
import org.jboss.weld.context.unbound.Unbound;
public class Test {
//Bean @Default DependentContext is injected
@Inject DependentContext dependentContext;
//Bean @Default ApplicationContext is injected
@Inject ApplicationContext applicationContext;
//Bean @Default SingletonContext is injected
@Inject SingletonContext singletonContext;
//Bean @Unbound RequestContext is injected
@Inject @Unbound RequestContext unboundRequestContext;
//Bean @Bound @Default BoundRequestContext is injected
@Inject @Bound RequestContext boundRequestContext;
@Inject @Default BoundRequestContext boundRequestContext2;
//Bean @Http @Default HttpRequestContext is injected
@Inject @Http RequestContext httpRequestContext;
@Inject @Default HttpRequestContext httpRequestContext2;
//Bean @Ejb @Default EjbRequestContext is injected
@Inject @Ejb RequestContext ejbRequestContext;
@Inject @Default EjbRequestContext ejbRequestContext2;
//Bean BoundConversationContext is injected
@Inject @Bound ConversationContext boundConversationContext;
@Inject @Default BoundConversationContext boundConversationContext2;
//Bean HttpConversationContext is injected
@Inject @Http ConversationContext httpConversationContext;
@Inject @Default HttpConversationContext httpConversationContext2;
//Bean @Bound @Default BoundSessionContext is injected
@Inject @Bound SessionContext boundSessionContext;
@Inject @Default BoundSessionContext boundSessionContext2;
//Bean @Http @Default HttpSessionContext is injected
@Inject @Http SessionContext httpSessionContext;
@Inject @Default HttpSessionContext httpSessionContext2;
//Invalid: 3 beans are available for injection.
@Inject RequestContext invalidRequestContext;
//Invalid: 2 beans are available for injection.
@Inject ConversationContext invalidConversationContext;
//Invalid: 2 beans are available for injection.
@Inject SessionContext invalidSessionContext;
}
{code}
ASSERT: All injection points are satisfied, for three last injection points multiple
beans are available.
Open-on opens interfaces for correspondent beans.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira