io.quarkus.arc.Unremovable Java Examples
The following examples show how to use
io.quarkus.arc.Unremovable.
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: InfluxdbResource.java From camel-quarkus with Apache License 2.0 | 5 votes |
@Unremovable @Singleton @javax.enterprise.inject.Produces InfluxDB createInfluxDbConnection() { InfluxDB influxDbConnection = InfluxDBFactory.connect(connectionUrl); influxDbConnection.query(new Query("CREATE DATABASE " + DB_NAME)); return influxDbConnection; }
Example #2
Source File: RefResource.java From camel-quarkus with Apache License 2.0 | 5 votes |
@Unremovable @Singleton @Named("my-endpoint") @javax.enterprise.inject.Produces public Endpoint myEndpoint() { return camelContext.getEndpoint("direct:start"); }
Example #3
Source File: RefResource.java From camel-quarkus with Apache License 2.0 | 5 votes |
@Unremovable @Singleton @Named("my-expression") @javax.enterprise.inject.Produces public Expression myExpression() { return new ExpressionAdapter() { @Override public Object evaluate(Exchange exchange) { return exchange.getMessage().getBody(String.class).toUpperCase(); } }; }
Example #4
Source File: RefResource.java From camel-quarkus with Apache License 2.0 | 5 votes |
@Unremovable @Singleton @Named("my-route") @javax.enterprise.inject.Produces public RoutesBuilder myRoute() { return new RouteBuilder() { @Override public void configure() throws Exception { from("my-endpoint") .transform().ref("my-expression"); } }; }
Example #5
Source File: ProducerOfUnusedUnremovableBean.java From quarkus with Apache License 2.0 | 4 votes |
@Unremovable @Produces public Bean produce() { return new Bean(); }
Example #6
Source File: UnremovableAnnotationsProcessor.java From quarkus with Apache License 2.0 | 4 votes |
@BuildStep UnremovableBeanBuildItem unremovableBeans() { return UnremovableBeanBuildItem.targetWithAnnotation(DotName.createSimple(Unremovable.class.getName())); }
Example #7
Source File: NarayanaJtaProducers.java From quarkus with Apache License 2.0 | 4 votes |
@Produces @ApplicationScoped @Unremovable // needed by Arc for transactional observers public TransactionSynchronizationRegistry transactionSynchronizationRegistry() { return new TransactionSynchronizationRegistryImple(); }