-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISPN-14584 Add Infinispan Quarkus Embedded documentation
- Loading branch information
1 parent
7977a64
commit 225b641
Showing
6 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
documentation/src/main/asciidoc/stories/assembly_quarkus_embedded.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[id='quarkus_embedded'] | ||
:context: quarkus | ||
= Using the Quarkus Extension | ||
{brandname} provides an extension that integrates with the Quarkus framework and allows you to: | ||
|
||
* Create a natively compiled Infinispan application | ||
include::{topics}/ref_quarkus_dependencies.adoc[leveloffset=+1] | ||
include::{topics}/proc_quarkus_injecting_embedded.adoc[leveloffset=+1] | ||
include::{topics}/proc_quarkus_native_compilation.adoc[leveloffset=+1] | ||
|
||
// Restore the parent context. | ||
ifdef::parent-context[:context: {parent-context}] | ||
ifndef::parent-context[:!context:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
documentation/src/main/asciidoc/topics/dependencies_maven/cdi_embedded_quarkus.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<dependency> | ||
<groupId>org.infinispan</groupId> | ||
<artifactId>infinispan-quarkus-embedded</artifactId> | ||
</dependency> |
26 changes: 26 additions & 0 deletions
26
documentation/src/main/asciidoc/topics/proc_quarkus_injecting_embedded.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[id='quarkus_inject_embedded'] | ||
= Injecting Embedded Caches | ||
Inject a `EmbeddedCacheManager` instance into your Quarkus application. | ||
|
||
.Procedure | ||
|
||
. Optionally define the `quarkus.infinispan-embedded.xml-config` with the path of a xml file that's used to configure the injected instance. | ||
+ | ||
[source,java] | ||
---- | ||
quarkus.infinispan-embedded.xml-config=/example/path/to/config.xml | ||
---- | ||
. Add the `@Inject` annotation to an uninitialized `EmbeddedCacheManager` class variable | ||
+ | ||
[source,java] | ||
---- | ||
import javax.inject.Inject; | ||
import org.infinispan.manager.EmbeddedCacheManager; | ||
... | ||
@Path("/example") | ||
public class ExampleResource { | ||
@Inject | ||
EmbeddedCacheManager emc; | ||
} | ||
---- |
11 changes: 11 additions & 0 deletions
11
documentation/src/main/asciidoc/topics/proc_quarkus_native_compilation.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[id='quarkus_native_compilation'] | ||
= Native Compilation | ||
Natively compile your Quarkus {brandname} application | ||
|
||
.Prerequisites | ||
|
||
* Ensure all https://quarkus.io/guides/building-native-image#prerequisites[Quarkus native prerequisites] are satisfied | ||
|
||
.Procedure | ||
|
||
. `mvn clean package -Pnative` |
9 changes: 9 additions & 0 deletions
9
documentation/src/main/asciidoc/topics/ref_quarkus_dependencies.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[id='quarkus_embedded_dependencies'] | ||
= Quarkus Dependencies | ||
Update your `pom.xml` with one of the following dependencies to include the | ||
{brandname} Quarkus extension in your project: | ||
|
||
.Embedded (Library) Mode | ||
---- | ||
include::dependencies_maven/cdi_embedded_quarkus.xml[] | ||
---- |