Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quarkus bootstrap #212

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions content/en/docs/01.0/12_quarkus.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ phase.
* Reflection and proxies behavior can be analyzed and turned into bytecode as well


### Creating a Quarkus Service

If you want to test out the following you can create a simple quarkus service with:


```bash
mvn io.quarkus:quarkus-maven-plugin:{{% param "quarkusVersion" %}}:create \
-DprojectGroupId=ch.puzzle \
-DprojectArtifactId=quarkus-introduction-service \
-DclassName="ch.puzzle.quarkustechlab.IntroductionResource" \
-Dpath="/hello"
```

Your project is now ready in the `quarkus-introduction-service` folder.


### Record and replay

How Quarkus solves the movement from run-time to built-time is with the concept of recording and replay.
Expand Down Expand Up @@ -123,17 +139,18 @@ In the class `io/quarkus/runner/ApplicationImpl.class` you can see the invocatio
```java
// $FF: synthetic class
public class ApplicationImpl extends Application {

static Logger LOG;
public static StartupContext STARTUP_CONTEXT;

public ApplicationImpl() {
super(false);
}

/* Phase STATIC_INIT */
static {
System.setProperty("io.netty.allocator.maxOrder", "1");
System.setProperty("io.netty.machineId", "e9:71:7b:30:45:7b:fa:40");
System.setProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager");
System.setProperty("io.netty.allocator.maxOrder", "1");
System.setProperty("io.netty.machineId", "e2:dd:dc:62:56:a3:ba:f8");
ProfileManager.setLaunchMode(LaunchMode.NORMAL);
StepTiming.configureEnabled();
Timing.staticInitStarted();
Expand All @@ -144,25 +161,23 @@ public class ApplicationImpl extends Application {

try {
StepTiming.configureStart();
((StartupTask)(new syntheticBean1188624218())).deploy(var0);
((StartupTask)(new setupLoggingStaticInit-1235809433())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new ioThreadDetector-1463825589())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new setupLoggingStaticInit-1235809433())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new blockingOP558072755())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new build163995889())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new servletContextBean-1962634234())).deploy(var0);
((StartupTask)(new staticInit-1777814589())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new initStatic1190120725())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new generateResources-1025303321())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new setupResteasyInjection2143006352())).deploy(var0);
StepTiming.printStepTime(var0);
((StartupTask)(new build-649634386())).deploy(var0);
((StartupTask)(new staticInit-210558872())).deploy(var0);
StepTiming.printStepTime(var0);
} catch (Throwable var2) {
ApplicationStateNotification.notifyStartupFailed(var2);
Expand All @@ -175,6 +190,8 @@ public class ApplicationImpl extends Application {
protected final void doStart(String[] var1) {
/* ... */
}

/* removed for simplicity */
}
```

Expand Down