-
Notifications
You must be signed in to change notification settings - Fork 629
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
2ebd6c5
commit 6685830
Showing
7 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
13 changes: 13 additions & 0 deletions
13
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,13 @@ | ||
[id='quarkus_embedded'] | ||
:context: quarkus | ||
= Using the Quarkus extension | ||
{brandname} provides an extension that integrates with the Quarkus framework. | ||
The extension lets you create natively compiled {brandname} applications. | ||
|
||
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 to interact with {brandname} caches.. | ||
|
||
.Procedure | ||
|
||
. Optional: Use the `quarkus.infinispan-embedded.xml-config` property to set the path to an XML file that includes the configuration of 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; | ||
} | ||
---- |
15 changes: 15 additions & 0 deletions
15
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,15 @@ | ||
[id='quarkus_native_compilation'] | ||
= Compiling Quarkus {brandname} application | ||
Generate a native executable for Quarkus {brandname} application. | ||
|
||
.Prerequisites | ||
|
||
* Have a Quarkus based project. For a complete list of prerequisites, see link:https://quarkus.io/guides/building-native-image#prerequisites[Quarkus native prerequisites]. | ||
|
||
.Procedure | ||
* Natively compile your Quarkus {brandname} application: | ||
+ | ||
[source] | ||
---- | ||
mvn clean package -Pnative | ||
---- |
8 changes: 8 additions & 0 deletions
8
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,8 @@ | ||
[id='quarkus_embedded_dependencies'] | ||
= Quarkus dependencies | ||
Include the {brandname} Quarkus extension in your `pom.xml`: | ||
|
||
.Embedded mode | ||
---- | ||
include::dependencies_maven/cdi_embedded_quarkus.xml[] | ||
---- |