javax.enterprise.context.control.ActivateRequestContext Java Examples

The following examples show how to use javax.enterprise.context.control.ActivateRequestContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BeanArchives.java    From quarkus with Apache License 2.0 6 votes vote down vote up
private static IndexView buildAdditionalIndex() {
    Indexer indexer = new Indexer();
    // CDI API
    index(indexer, ActivateRequestContext.class.getName());
    index(indexer, Default.class.getName());
    index(indexer, Any.class.getName());
    index(indexer, Named.class.getName());
    index(indexer, Initialized.class.getName());
    index(indexer, BeforeDestroyed.class.getName());
    index(indexer, Destroyed.class.getName());
    index(indexer, Intercepted.class.getName());
    index(indexer, Model.class.getName());
    // Arc built-in beans
    index(indexer, ActivateRequestContextInterceptor.class.getName());
    index(indexer, InjectableRequestContextController.class.getName());
    return indexer.complete();
}
 
Example #2
Source File: AutoProducerMethodTest.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@ActivateRequestContext
@Test
public void testProducerWorks() {
    assertEquals("ok", bean.foo);
    assertEquals(13l, bean.longVal);
    assertTrue(bean.strings.isEmpty());
}
 
Example #3
Source File: Task.java    From Java-EE-8-and-Angular with MIT License 4 votes vote down vote up
@ActivateRequestContext
public void doWorkInRequest() {
    System.out.println("ActivateRequestContext - found LoginBean: " + this.bean);
}
 
Example #4
Source File: ControllerClient.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@ActivateRequestContext
String getControllerId() {
    return controller.getId();
}
 
Example #5
Source File: AutoProducerMethodDisabledTest.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@ActivateRequestContext
@Test
public void testProducerIsIgnored() {
    assertFalse(bean.foo.isResolvable());
}