Kategorie: Tech & Trends

P in temPel Sorgenfreier 24/7 Applikationsbetrieb mit gepardec-run Wie kann uns KI in der Software Entwicklung unterstützen?

Blog

Wie kann uns KI in der Software Entwicklung unterstützen?

...class AdventCalendarDay1 { public ...
...AdventCalendarDay1 { public static ...
...{ public static void ...
...main(String[] args) { ...
...args) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Read ...
... // Read input ...
...input from user ...
...from user ...
...user ...
... ...
... Scanner ...
... Scanner scanner ...
... Scanner scanner = ...
...= new Scanner(System.in); ...
...new Scanner(System.in); ...
...Scanner(System.in); ...
... ...
... String ...
... String input ...
... String input = ...
...input = scanner.nextLine(); ...
...= scanner.nextLine(); ...
...scanner.nextLine(); ...
... ...
... scanner.close(); ...
... scanner.close(); ...
... scanner.close(); ...
... scanner.close(); ...
... scanner.close(); ...
...scanner.close(); ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Split ...
... // Split the ...
...array of integers ...
...of integers ...
...integers ...
... ...
... String[] ...
... String[] depthStrings ...
... String[] depthStrings = ...
...depthStrings = input.split("\n"); ...
...= input.split("\n"); ...
...input.split("\n"); ...
... ...
... int[] ...
... int[] depths ...
... int[] depths = ...
...= new int; ...
...new int; ...
...int; ...
... ...
... for ...
... for (int ...
... for (int i ...
...depthStrings.length; i++) { ...
...i++) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... depths ...
... depths = ...
... depths = Integer.parseInt(depthStrings); ...
...depths = Integer.parseInt(depthStrings); ...
...= Integer.parseInt(depthStrings); ...
...Integer.parseInt(depthStrings); ...
... ...
... } ...
... } ...
... } ...
... } ...
... } ...
...} ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Count ...
... // Count the ...
...the depth increases ...
...depth increases ...
...increases ...
... ...
... int ...
... int numIncreases ...
... int numIncreases = ...
...numIncreases = 0; ...
...= 0; ...
...0; ...
... ...
... for ...
... for (int ...
... for (int i ...
...depths.length; i++) { ...
...i++) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... if ...
... if (depths ...
... if (depths > ...
...> depths) { ...
...depths) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... numIncreases++; ...
... numIncreases++; ...
... numIncreases++; ...
... numIncreases++; ...
... numIncreases++; ...
...numIncreases++; ...
... ...
... ...
... ...
... ...
... ...
... } ...
... } ...
... } ...
... } ...
... } ...
...} ...
... ...
... } ...
... } ...
... } ...
... } ...
... } ...
...} ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Print ...
... // Print the ...
...Print the result ...
...the result ...
...result ...
... ...
... System.out.println(numIncreases); ...
... System.out.println(numIncreases); ...
... System.out.println(numIncreases); ...
... System.out.println(numIncreases); } } 2. ...
... System.out.println(numIncreases); } } 2. Code ...
...System.out.println(numIncreases); } } 2. Code Review In ...

Anzeigen

How to implement CRD Healthchecks for ArgoCD?

Blog

How to implement CRD Healthchecks for ArgoCD?

...~= nil then if obj.status.conditions ~= ...
...~= nil then for ...
...nil then for _, ...
...then for _, condition ...
...in ipairs(obj.status.conditions) do ...
...ipairs(obj.status.conditions) do ...
...do if ...
... if condition.type ...
... if condition.type == ...
...== "False" then ...
..."False" then ...
...then ...
... ...
... hs.status ...
... hs.status = ...
... hs.status = "Degraded" ...
...hs.status = "Degraded" ...
...= "Degraded" ...
..."Degraded" ...
... ...
... hs.message ...
... hs.message = ...
... hs.message = condition.message ...
...condition.message or condition.reason ...
...or condition.reason ...
...condition.reason ...
... ...
... return ...
... return hs ...
... return hs ...
... return hs ...
...return hs ...
...hs end ...
... end ...
... end ...
... end ...
... end ...
...end if ...
... if condition.type ...
... if condition.type == ...
...== "True" then ...
..."True" then ...
...then ...
... ...
... hs.status ...
... hs.status = ...
... hs.status = "Healthy" ...
...hs.status = "Healthy" ...
...= "Healthy" ...
..."Healthy" ...
... ...
... hs.message ...
... hs.message = ...
... hs.message = condition.message ...
...condition.message or condition.reason ...
...or condition.reason ...
...condition.reason ...
... ...
... return ...
... return hs ...
... return hs ...
... return hs ...
...return hs ...
...hs end ...
... end ...
... end ...
... end end ...
... end end ...
...end end end end return ...
... end end end return hs ‘’’ “hs” refers ...

Anzeigen

Warum Software verrostet und wie wir gegen den Verfall ankämpfen. Openly Shift Observability Left and Up – Eine gesamtheitliche Sicht zu Thema Observability How can you use Advanced Cluster Management for OpenShift? Was ist der Nutzen von gutem UX-Design? Als Red Hat Premier Partner setzen wir auf JBoss EAP Warum wir auf Jakarta-Enterprise setzen? 4 Techniken für eine gemeinsame Sicht auf den Code Service Binding for Kubernetes So war es auf der W-JAX 2022 in München. Ein Nachbericht. WildFly 23 to WildFly 26

Blog

WildFly 23 to WildFly 26

...name="keycloak">      <authentication>        <login-module                        code="org.keycloak.adapters.jboss.KeycloakLoginModule"            flag="required"/>      </authentication>    </security-domain> and in web.xml <login-config> ...
...in web.xml <login-config> ...
...web.xml <login-config> ...
... <auth-method>KEYCLOAK</auth-method> ...
... <auth-method>KEYCLOAK</auth-method> ...
... <auth-method>KEYCLOAK</auth-method> ...
... <auth-method>KEYCLOAK</auth-method> </login-config> Additionally we ...
... <auth-method>KEYCLOAK</auth-method> </login-config> Additionally we had ...
...nice. Just use  <login-config> ...
...Just use  <login-config> ...
...use  <login-config> ...
... ...
... <auth-method>OIDC</auth-method> ...
... <auth-method>OIDC</auth-method> ...
... <auth-method>OIDC</auth-method> ...
... <auth-method>OIDC</auth-method> </login-config> in ...
... <auth-method>OIDC</auth-method> </login-config> in web.xml ...
...<auth-method>OIDC</auth-method> </login-config> in web.xml and ...
...keycloak.json use oidc.json: { "client-id" ...
...use oidc.json: { "client-id" : ...
...oidc.json: { "client-id" : "${env.KEYCLOAK_CLIENT_ID}", ...
..."client-id" : "${env.KEYCLOAK_CLIENT_ID}", "provider-url": ...
...: "${env.KEYCLOAK_CLIENT_ID}", "provider-url": ...
..."${env.KEYCLOAK_CLIENT_ID}", "provider-url": ...
... "provider-url": ...
... "provider-url": ...
..."provider-url": ...
... ...
... "${env.KEYCLOAK_AUTH_SERVER_URL}/realms/${env.KEYCLOAK_REALM}", ...
... "${env.KEYCLOAK_AUTH_SERVER_URL}/realms/${env.KEYCLOAK_REALM}", ...
... "${env.KEYCLOAK_AUTH_SERVER_URL}/realms/${env.KEYCLOAK_REALM}", ...
... "${env.KEYCLOAK_AUTH_SERVER_URL}/realms/${env.KEYCLOAK_REALM}", "ssl-required": ...
... "${env.KEYCLOAK_AUTH_SERVER_URL}/realms/${env.KEYCLOAK_REALM}", "ssl-required": "external", ...
..."${env.KEYCLOAK_AUTH_SERVER_URL}/realms/${env.KEYCLOAK_REALM}", "ssl-required": "external", ...
... "ssl-required": "external", "credentials": ...
..."ssl-required": "external", "credentials": {"secret":"${env.KEYCLOAK_CREDENTIALS_SECRET}"}, ...
..."external", "credentials": {"secret":"${env.KEYCLOAK_CREDENTIALS_SECRET}"}, ...
... "credentials": {"secret":"${env.KEYCLOAK_CREDENTIALS_SECRET}"}, "disable-trust-manager":true, ...
..."credentials": {"secret":"${env.KEYCLOAK_CREDENTIALS_SECRET}"}, "disable-trust-manager":true, ...
...{"secret":"${env.KEYCLOAK_CREDENTIALS_SECRET}"}, "disable-trust-manager":true, ...
... "disable-trust-manager":true, "allow-any-hostname": ...
... "disable-trust-manager":true, "allow-any-hostname": true ...
..."disable-trust-manager":true, "allow-any-hostname": true ...
... "allow-any-hostname": true } With these changes ...
...module we configured <login-config> ...
...we configured <login-config> ...
...configured <login-config> ...
... <auth-method>MP-JWT</auth-method> ...
... <auth-method>MP-JWT</auth-method> ...
... <auth-method>MP-JWT</auth-method> ...
... <auth-method>MP-JWT</auth-method> </login-config> in web.xml ...
... <auth-method>MP-JWT</auth-method> </login-config> in web.xml and ...

Anzeigen

Simplify Hogarama – Security Pair Programming TypeScript Decorators and why you should use them

Blog

TypeScript Decorators and why you should use them

...log = ( target: (new () ...
...prototype (for non-static) propertyKey: string, // ...
...in the class descriptor: PropertyDescriptor // ...
...property ) => { // Save the ...
...given property value const original = ...
...original = descriptor.value; // Intercept the ...
...given property value descriptor.value = function ...
...function () { console.log("Hello"); ...
...() { console.log("Hello"); ...
...{ console.log("Hello"); ...
... console.log("Hello"); original(); ...
... console.log("Hello"); original(); ...
...console.log("Hello"); original(); }; ...
... original(); }; // ...
...original(); }; // Return the ...
...new property value return descriptor; }; This decorator ...
...snippet: class Test { @log public ...
...{ @log public static method() ...
...static method() { console.log("World"); ...
...method() { console.log("World"); ...
...{ console.log("World"); } } Test.method(); // ...
... console.log("World"); } } Test.method(); // => Hello // ...
...} } Test.method(); // => Hello // World Class ...
...=> Hello // World Class vs. ...
...Hello // World Class vs. Property ...
...snippet: @classDecorator class Test { @propertyDecorator private ...
...{ @propertyDecorator private _property: string ...
...string = ""; @methodDecorator public ...
...""; @methodDecorator public method(@parameterDecorator parameter: ...
...parameter: string) { console.log(`${this._property} ...
...string) { console.log(`${this._property} ${parameter} ...
...{ console.log(`${this._property} ${parameter} World!`); ...
...console.log(`${this._property} ${parameter} World!`); } @methodDecorator ...
...World!`); } @methodDecorator // method ...
...applied to accessor set property(value: string) ...
...property(value: string) { this._property ...
...string) { this._property = ...
...{ this._property = value; ...
...this._property = value; } } If you are ...
...PropertyDecorator = ( target: Object, ...
... target: Object, propertyKey: string | ...
...MethodDecorator = <T>( target: Object, ...
... target: Object, propertyKey: string | ...
...string | symbol, descriptor: TypedPropertyDescriptor<T> ) => ...
...ParameterDecorator = ( target: Object, ...
... target: Object, propertyKey: string | ...
...string | symbol, parameterIndex: number ) => ...
...descriptor) => { // target = ...
...of applied class // ...
...class // ...
... // ...
...// ...
... ...
... ...
... ...
... if ...
... if instance ...
... if instance method: ...
...of applied class // propertyKey = ...
...of the method // descriptor = ...
...accessors, enumerable, ...) return descriptor; }; const propertyDecorator: ...
...propertyKey) => { // target = ...
...of applied property, // ...
...property, // ...
... // ...
...// ...
... ...
... ...
... ...
... if ...
... if instance ...
... if instance property: ...
...of applied property // propertyKey = ...
...(target) => { // target = ...
...ParameterDecorator = ( target, propertyKey, ...
...( target, propertyKey, parameterIndex ) ...
...target, propertyKey, parameterIndex ) => { ...
...parameterIndex ) => { // target = ...
...applied method parameter, // ...
...parameter, // ...
... // ...
...// ...
... ...
... ...
... ...
... if ...
... if instance ...
... if instance method: ...
...applied method parameter // propertyKey = ...
...the method parameter // parameterIndex = ...
...pattern while leveraging to create parametrized ...
...MethodDecorator => { console.log("Init with logLevel:", ...
...with logLevel:", logLevel); return (_, _2, ...
...PropertyDescriptor) => { const ...
...=> { const originalValue ...
...{ const originalValue = ...
...originalValue = descriptor.value!; descriptor.value ...
...= descriptor.value!; descriptor.value = ...
...descriptor.value!; descriptor.value = () ...
...() => { ...
...=> { ...
...{ console("Method ...
... console("Method called"); ...
... console("Method called"); ...
... console("Method called"); ...
...console("Method called"); ...
...called"); originalValue(); ...
... originalValue(); ...
... originalValue(); ...
... originalValue(); }; ...
... originalValue(); }; ...
...originalValue(); }; ...
... }; return ...
... }; return descriptor; ...
...}; return descriptor; ...
... return descriptor; }; }; class Test { ...
...}; }; class Test { @log("error") public ...
...{ @log("error") public static method() ...
...with logLevel: error // Method ...
...logLevel: error // Method called // ...
...error // Method called // ...
... Method called // Method ...
...Method called // Method called Metadata There ...
...called // Method called Metadata There is ...
...once class Test { @Reflect.metadata("magic", 42) // ...
...use the decorators static text = ...
...number is: "; static doSomething() { ...
...static doSomething() { // ...
...doSomething() { // Then ...
...{ // Then you ...
...has some metadata // ...
...some metadata // Keep ...
...metadata // Keep in ...
...is also queried // ...
...also queried // e.g. ...
...queried // e.g. "design:type", ...
..."design:type", "design:paramtypes", etc. const ...
..."design:paramtypes", etc. const metadataKeys ...
...etc. const metadataKeys = ...
...= Reflect.getOwnMetadataKeys(Test, "text"); // ...
...Reflect.getOwnMetadataKeys(Test, "text"); // And ...
..."text"); // And then ...
...that metadata key // ...
...metadata key // Note: ...
...key // Note: in ...
...directly access , // ...
...access , // because ...
..., // because we ...
...metadata property specified // ...
...property specified // and ...
...specified // and the ...
...the design:type metadata const ...
...design:type metadata const magicNumber ...
...metadata const magicNumber = ...
...Reflect.getMetadata(metadataKeys, Test, "text"); console.log(Test.text ...
...Test, "text"); console.log(Test.text + ...
..."text"); console.log(Test.text + magicNumber); ...
...console.log(Test.text + magicNumber); } } Test.doSomething(); // => The ...

Anzeigen

LF-Projekttagebuch: Bewerberservice fließt durch Argo Ein Desaster ruft um Hilfe bevor es zuschlägt Kafka – Die Verwandlung Schreibst du User Stories oder tust du nur so? How to ride a camel through clouds

Blog

How to ride a camel through clouds

...Integration Patterns (EIPs) . It comes ...
...extends RouteBuilder { @Override public ...
...{ @Override public void configure() ...
...throws Exception { ...
...Exception { ...
...{ from("timer:java?period=1000") ...
... from("timer:java?period=1000") ...
... from("timer:java?period=1000") ...
... from("timer:java?period=1000") ...
... from("timer:java?period=1000") ...
...from("timer:java?period=1000") ...
... ...
... .setHeader("example") ...
... .setHeader("example") ...
... .setHeader("example") ...
... .setHeader("example") ...
... .setHeader("example") ...
....setHeader("example") ...
... ...
... ...
... ...
... .constant("Java") ...
... .constant("Java") ...
... .constant("Java") ...
... .constant("Java") ...
... .constant("Java") ...
....constant("Java") ...
... ...
... .setBody() ...
... .setBody() ...
... .setBody() ...
... .setBody() ...
... .setBody() ...
....setBody() ...
... ...
... ...
... ...
... .simple("Hello ...
... .simple("Hello World! ...
... .simple("Hello World! Camel ...
...written in ${header.example}.") ...
...in ${header.example}.") ...
...${header.example}.") ...
... ...
... .to("log:info"); ...
... .to("log:info"); ...
... .to("log:info"); ...
... .to("log:info"); ...
... .to("log:info"); ...
....to("log:info"); ...
... ...
... } } Assuming ...
... } } Assuming the project ...
...the correct messages Scenario: Integration basic ...
...prints Hello World Given ...
...Hello World Given Camel-K ...
...World Given Camel-K integration ...
...basic is running Then ...
...is running Then Camel-K ...
...running Then Camel-K integration ...
...this: apiVersion: camel.apache.org/v1alpha1 kind: Kamelet metadata: name: twitter-search-source ...
... name: twitter-search-source labels: ...
...twitter-search-source labels: camel.apache.org/kamelet.type: ...
... labels: camel.apache.org/kamelet.type: "source" spec: ...
...labels: camel.apache.org/kamelet.type: "source" spec: ...
... camel.apache.org/kamelet.type: "source" spec: definition: ...
..."source" spec: definition: title: ...
... definition: title: "Timer" ...
...definition: title: "Timer" ...
... title: "Timer" description: ...
...title: "Timer" description: "Produces ...
..."Timer" description: "Produces periodic ...
...a custom payload" required: ...
...custom payload" required: ...
...payload" required: ...
... required: ...
... required: ...
...required: - ...
... - message ...
... - message ...
... - message properties: ...
...- message properties: ...
...message properties: ...
... properties: ...
... properties: ...
...properties: period: ...
... period: ...
... period: ...
... period: ...
... period: ...
...period: ...
... ...
... title: ...
... title: Period ...
... title: Period ...
... title: Period ...
...title: Period ...
...Period ...
... ...
... description: ...
... description: The ...
... description: The time ...
...between two events ...
...two events ...
...events ...
... ...
... type: ...
... type: integer ...
... type: integer ...
... type: integer ...
...type: integer ...
...integer ...
... ...
... default: ...
... default: 1000 ...
... default: 1000 ...
... default: 1000 ...
...default: 1000 ...
...1000 message: ...
... message: ...
... message: ...
... message: ...
... message: ...
...message: ...
... ...
... title: ...
... title: Message ...
... title: Message ...
... title: Message ...
...title: Message ...
...Message ...
... ...
... description: ...
... description: The ...
... description: The message ...
...message to generate ...
...to generate ...
...generate ...
... ...
... type: ...
... type: string ...
... type: string ...
... type: string types: ...
...string types: out: ...
... types: out: ...
...types: out: ...
... out: ...
... out: ...
...out: mediaType: ...
... mediaType: text/plain ...
... mediaType: text/plain ...
... mediaType: text/plain flow: ...
...text/plain flow: from: ...
... flow: from: ...
...flow: from: ...
... from: ...
... from: ...
...from: uri: ...
... uri: timer:tick ...
... uri: timer:tick ...
... uri: timer:tick ...
...uri: timer:tick ...
...timer:tick parameters: ...
... parameters: ...
... parameters: ...
... parameters: ...
... parameters: ...
...parameters: ...
... ...
... period: ...
... period: "{{period}}" ...
... period: "{{period}}" ...
... period: "{{period}}" ...
...period: "{{period}}" ...
..."{{period}}" steps: ...
... steps: ...
... steps: ...
... steps: ...
... steps: ...
...steps: ...
... ...
... - ...
... - set-body: ...
... - set-body: ...
... - set-body: ...
...- set-body: ...
...set-body: ...
... ...
... ...
... ...
... ...
... ...
... constant: ...
... constant: "{{message}}" ...
... constant: "{{message}}" ...
... constant: "{{message}}" ...
...constant: "{{message}}" ...
..."{{message}}" ...
... ...
... - ...
... - to: ...
... - to: "kamelet:sink" Example ...

Anzeigen

CheetUnit – Ein simples Java EE Integrationstest Framework Kennen Sie Ihre Applikation? Was ist Open Source eigentlich? Hogarama und “The Second System Effect” CI/CD Gluing it all together – a personal story Third Step – JEE Microservices with MicroProfile-Rest-Client

Blog

Third Step - JEE Microservices with MicroProfile-Rest-Client

...as JBoss modules. <dependency> ...
...JBoss modules. <dependency> ...
...modules. <dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
...<artifactId>microprofile-rest-client-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
...<version>${version.microprofile.rest.client}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
...<artifactId>microprofile-config-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
...<version>${version.microprofile.config}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> Integration ...
... </dependency> Integration with ...
... </dependency> Integration with Thorntail ...
...MicroProfile-Rest-Client and MicroProfile-Config. <dependencyManagement> ...
...and MicroProfile-Config. <dependencyManagement> ...
...MicroProfile-Config. <dependencyManagement> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
...<artifactId>bom</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
...<version>${version.thorntail}</version> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> ...
...</dependencies> ...
... ...
... ...
... ...
... ...
... ...
... </dependencyManagement> ...
... </dependencyManagement> ...
... </dependencyManagement> ...
... </dependencyManagement> ...
... </dependencyManagement> ...
...</dependencyManagement> ...
... ...
... ...
... ...
... ...
... ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
...<artifactId>microprofile-config</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
...<artifactId>microprofile-restclient</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... ...
... ...
... ...
... ...
... </dependencies> Integration ...
... </dependencies> Integration with ...
... </dependencies> Integration with Quarkus ...
...specific Quarkus version. <dependencyManagement> ...
...Quarkus version. <dependencyManagement> ...
...version. <dependencyManagement> ...
... ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
...<artifactId>quarkus-bom</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
...<version>${quarkus.version}</version> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> </dependencyManagement> ...
... </dependencies> </dependencyManagement> ...
...</dependencies> </dependencyManagement> ...
... </dependencyManagement> <dependencies> ...
... </dependencyManagement> <dependencies> ...
... <dependencies> ...
... <dependencies> <!-- ...
...<dependencies> <!-- MicroProfile-Config ...
... <!-- MicroProfile-Config is ...
...of configuring ...
...configuring ...
... ...
... ...
... ...
... ...
... Quarkus, ...
... Quarkus, so ...
... Quarkus, so there ...
...a dependency --> ...
...dependency --> ...
...--> ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
...<artifactId>quarkus-rest-client</artifactId> ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> How to ...
... </dependency> </dependencies> How to implement ...
...#################################################### @RegisterRestClient(configKey = "restClient") @RegisterClientHeaders(ClientHeaders.class) @RegisterProviders({ ...
...= "restClient") @RegisterClientHeaders(ClientHeaders.class) @RegisterProviders({ ...
..."restClient") @RegisterClientHeaders(ClientHeaders.class) @RegisterProviders({ ...
... ...
... @RegisterProvider(Provider.class) }) // ...
... @RegisterProvider(Provider.class) }) // #################################################### @Path("/") public ...
... @RegisterProvider(Provider.class) }) // #################################################### @Path("/") public interface ...
...interface ExternalRestResource { @Path("/get") ...
...ExternalRestResource { @Path("/get") ...
...{ @Path("/get") ...
... @Path("/get") @GET ...
... @Path("/get") @GET ...
...@Path("/get") @GET ...
... @GET @Produces(MediaType.APPLICATION_JSON) ...
... @GET @Produces(MediaType.APPLICATION_JSON) ...
...@GET @Produces(MediaType.APPLICATION_JSON) ...
... @Produces(MediaType.APPLICATION_JSON) String ...
... @Produces(MediaType.APPLICATION_JSON) String get(); } The ...
...@Produces(MediaType.APPLICATION_JSON) String get(); } The following ...
...implements ClientHeadersFactory { @Override ...
...ClientHeadersFactory { @Override ...
...{ @Override ...
... @Override public ...
... @Override public MultivaluedMap<String, ...
...@Override public MultivaluedMap<String, String> ...
...MultivaluedMap<String, String> ...
...String> ...
... ...
... update(MultivaluedMap<String, ...
... update(MultivaluedMap<String, String> ...
... update(MultivaluedMap<String, String> incomingHeaders, ...
...update(MultivaluedMap<String, String> incomingHeaders, ...
...String> incomingHeaders, ...
...incomingHeaders, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... MultivaluedMap<String, ...
... MultivaluedMap<String, String> ...
... MultivaluedMap<String, String> clientOutgoingHeaders) ...
...String> clientOutgoingHeaders) { ...
...clientOutgoingHeaders) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Will ...
... // Will be ...
...with outgoing headers ...
...outgoing headers ...
...headers ...
... ...
... return ...
... return new ...
... return new MultivaluedHashMap<>() ...
...new MultivaluedHashMap<>() {{ ...
...MultivaluedHashMap<>() {{ ...
...{{ ...
... ...
... ...
... ...
... ...
... ...
... put("X-Test", ...
... put("X-Test", Collections.singletonList("test ...
... put("X-Test", Collections.singletonList("test header")); ...
...put("X-Test", Collections.singletonList("test header")); ...
...Collections.singletonList("test header")); ...
...header")); ...
... ...
... }}; ...
... }}; ...
... }}; ...
... }}; } }   This ...
... }}; } }   This implementation ...
...}}; } }   This implementation has ...
...the @RegisterClientHeaders annotation. <dependencyManagement> <dependencies> ...
...annotation. <dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
...<artifactId>quarkus-bom</artifactId> ...
... ...
... ...
... ...
... ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
...<version>${quarkus.version}</version> ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> ...
... </dependency> </dependencies> </dependencyManagement> ...
... </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... <!-- ...
... <!-- Does ...
... <!-- Does not ...
...dependency defined. ...
...defined. ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... It ...
... It uses ...
... It uses Smallrye ...
...implementation of ...
...of ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... the ...
... the MicroProfile-Config ...
... the MicroProfile-Config as ...
...as default ...
...default ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... for ...
... for configurations ...
... for configurations --> ...
...for configurations --> </dependencies> ExceptionMapping MicroProfile-Rest-Client provides the ...
...RestClientExceptionMapper implements ...
...implements ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ResponseExceptionMapper<RuntimeException> ...
... ResponseExceptionMapper<RuntimeException> { ...
... ResponseExceptionMapper<RuntimeException> { ...
... ResponseExceptionMapper<RuntimeException> { @Override ...
...ResponseExceptionMapper<RuntimeException> { @Override ...
...{ @Override ...
... @Override public ...
... @Override public RuntimeException ...
...@Override public RuntimeException toThrowable(Response ...
...toThrowable(Response response) { ...
...response) { ...
...{ ...
... ...
... return ...
... return new ...
... return new RuntimeException(“Error ...
...occurred ” ...
...” ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... + ...
... + response.getStatus()); ...
... + response.getStatus()); ...
... + response.getStatus()); } } There ...
...+ response.getStatus()); } } There are ...
...response.getStatus()); } } There are two ...
...interface ExternalRestResource { ... } @RequestScoped public ...
...ExternalRestResource { ... } @RequestScoped public class ...
...{ ... } @RequestScoped public class CDIBean ...
...class CDIBean { @Inject ...
...CDIBean { @Inject ...
...{ @Inject ...
... @Inject @RestClient ...
... @Inject @RestClient ...
...@Inject @RestClient ...
... @RestClient ExternalRestResource ...
... @RestClient ExternalRestResource externalRestResource; } RestClientBuilder If ...
...@RestClient ExternalRestResource externalRestResource; } RestClientBuilder If dynamic ...
...CDI Producer method. RestClientBuilder.newBuilder() ...
...Producer method. RestClientBuilder.newBuilder() ...
...method. RestClientBuilder.newBuilder() ...
... ...
... ...
... ...
... .baseUri(new ...
... .baseUri(new URI(baseUrl)) ...
... .baseUri(new URI(baseUrl)) ...
... .baseUri(new URI(baseUrl)) ...
....baseUri(new URI(baseUrl)) ...
...URI(baseUrl)) ...
... ...
... ...
... ...
... .readTimeout(connectTimeout, ...
... .readTimeout(connectTimeout, TimeUnit.SECONDS) ...
... .readTimeout(connectTimeout, TimeUnit.SECONDS) ...
... .readTimeout(connectTimeout, TimeUnit.SECONDS) ...
....readTimeout(connectTimeout, TimeUnit.SECONDS) ...
...TimeUnit.SECONDS) ...
... ...
... ...
... ...
... .connectTimeout(connectTimeout, ...
... .connectTimeout(connectTimeout, TimeUnit.SECONDS) ...
... .connectTimeout(connectTimeout, TimeUnit.SECONDS) ...
... .connectTimeout(connectTimeout, TimeUnit.SECONDS) ...
....connectTimeout(connectTimeout, TimeUnit.SECONDS) ...
...TimeUnit.SECONDS) ...
... ...
... ...
... ...
... .register(ClientTracingFeature.class) ...
... .register(ClientTracingFeature.class) ...
... .register(ClientTracingFeature.class) ...
... .register(ClientTracingFeature.class) ...
... .register(ClientTracingFeature.class) ...
....register(ClientTracingFeature.class) ...
... ...
... ...
... ...
... .build(ExternalRestResource.class); It ...
... .build(ExternalRestResource.class); It is ...
... .build(ExternalRestResource.class); It is fairly ...

Anzeigen

Second Step – JEE Microservices with MicroProfile-Opentracing

Blog

Second Step - JEE Microservices with MicroProfile-Opentracing

...rest clients --> ...
...clients --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
...<artifactId>microprofile-rest-client-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
...<version>${version.microprofile.rest.client}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- Because ...
... <!-- Because MicroProfile-Rest-Client ...
...MicroProfile-Rest-Client is ...
...is ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... configured ...
... configured via ...
... configured via MicroProfile-Config ...
...via MicroProfile-Config --> ...
...MicroProfile-Config --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
...<artifactId>microprofile-config-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
...<version>${version.microprofile.config}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- Provides ...
... <!-- Provides an ...
...custom server ...
...server ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... and ...
... and client ...
... and client side ...
...side tracing (SpanDecorators). ...
...tracing (SpanDecorators). ...
...(SpanDecorators). ...
... ...
... ...
... ...
... ...
... ...
... ...
... WIldfly ...
... WIldfly Module ...
... WIldfly Module will ...
...during runtime --> ...
...runtime --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
...<artifactId>opentracing-jaxrs2</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
...<version>0.4.1</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- Provides ...
... <!-- Provides an ...
...provides our ...
...our ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... Tracer ...
... Tracer to ...
... Tracer to the ...
...application and subsystem. ...
...and subsystem. ...
...subsystem. ...
... ...
... ...
... ...
... ...
... ...
... ...
... WIldfly ...
... WIldfly Module ...
... WIldfly Module will ...
...during runtime --> ...
...runtime --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
...<artifactId>opentracing-tracerresolver</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
...<version>0.1.8</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- The ...
... <!-- The opentracing ...
...opentracing api --> ...
...api --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
...<artifactId>microprofile-opentracing-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
...<version>${version.microprofile.opentracing}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> Integration ...
... </dependency> Integration with ...
... </dependency> Integration with Thorntail Thorntail ...
...fraction for MicroProfile-Config. <dependencyManagement> ...
...for MicroProfile-Config. <dependencyManagement> ...
...MicroProfile-Config. <dependencyManagement> <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
...<artifactId>bom</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
...<version>${version.thorntail}</version> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> </dependencies> ...
... </dependencies> ...
... </dependencies> </dependencyManagement> ...
... </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
...<artifactId>microprofile-config</artifactId> </dependency> ...
... </dependency> ...
... </dependency> </dependencies> Configuration Getting ...
... </dependency> </dependencies> Configuration Getting Opentracing to ...
...api. jboss-deployment-structure.xml <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> ...
...version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> ...
...encoding="UTF-8"?> <jboss-deployment-structure> <deployment> ...
... <deployment> ...
... <deployment> ...
...<deployment> ...
... ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... ...
... ...
... <!-- ...
... <!-- Because ...
... <!-- Because we ...
...the Tracer --> ...
...Tracer --> ...
...--> ...
... ...
... ...
... ...
... ...
... ...
... <module ...
... <module name="io.jaegertracing.jaeger" ...
... <module name="io.jaegertracing.jaeger" /> ...
...<module name="io.jaegertracing.jaeger" /> ...
...name="io.jaegertracing.jaeger" /> ...
.../> ...
... ...
... ...
... ...
... ...
... ...
... <!-- ...
... <!-- Contains ...
... <!-- Contains api ...
...for SpanDecorators --> ...
...SpanDecorators --> ...
...--> ...
... ...
... ...
... ...
... ...
... ...
... <module ...
... <module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
... <module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
... <module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
...<module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
...name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
... ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> </deployment> </jboss-deployment-structure> ...
... </dependencies> </deployment> </jboss-deployment-structure> TracerFactory ...
...</dependencies> </deployment> </jboss-deployment-structure> TracerFactory discovered ...
...and registered in ...
...registered in ...
...in ...
... ...
... ...
... ...
... ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory Create ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory Create Tracer ...
... at.ihet.samples.microprofile.opentracing.TracerFactory Create Tracer from ...
... io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...{ @Override ...
... @Override public ...
... @Override public Tracer ...
...@Override public Tracer getTracer() ...
...Tracer getTracer() { ...
...getTracer() { ...
...{ ...
... ...
... Configuration ...
... Configuration configuration ...
... Configuration configuration = ...
...configuration = Configuration.fromEnv(); ...
...= Configuration.fromEnv(); ...
...Configuration.fromEnv(); ...
... ...
... Tracer ...
... Tracer tracer ...
... Tracer tracer = ...
...tracer = configuration.getTracer(); ...
...= configuration.getTracer(); ...
...configuration.getTracer(); ...
... ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
...GlobalTracer.register(tracer); ...
... ...
... return ...
... return tracer; ...
... return tracer; ...
... return tracer; } } Jaeger ...
...return tracer; } } Jaeger configuration ...
...tracer; } } Jaeger configuration either ...
...fraction for MicroProfile-Rest-Client. <dependencyManagement> <dependencies> ...
...for MicroProfile-Rest-Client. <dependencyManagement> <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
...<artifactId>bom</artifactId> ...
... ...
... ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
...<version>${version.thorntail}</version> ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> </dependencyManagement> ...
... </dependency> </dependencies> </dependencyManagement> <dependencies> ...
...</dependency> </dependencies> </dependencyManagement> <dependencies> ...
... </dependencies> </dependencyManagement> <dependencies> <dependency> ...
...</dependencies> </dependencyManagement> <dependencies> <dependency> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> </dependency> ...
... <artifactId>microprofile-config</artifactId> </dependency> ...
...<artifactId>microprofile-config</artifactId> </dependency> ...
... </dependency> <dependency> ...
... </dependency> <dependency> ...
...</dependency> <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> </dependency> ...
... <artifactId>microprofile-restclient</artifactId> </dependency> ...
...<artifactId>microprofile-restclient</artifactId> </dependency> ...
... </dependency> <dependency> ...
... </dependency> <dependency> ...
...</dependency> <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> </dependency> </dependencies>   Additionally ...
...<artifactId>microprofile-opentracing</artifactId> </dependency> </dependencies>   Additionally to ...
... </dependency> </dependencies>   Additionally to the ...
...traces. Throntail YAML configuration: thorntail: jaeger: ...
...configuration: thorntail: jaeger: service-name: ...
... jaeger: service-name: microprofile-opentracing-thorntail ...
...jaeger: service-name: microprofile-opentracing-thorntail ...
... service-name: microprofile-opentracing-thorntail agent-host: ...
...service-name: microprofile-opentracing-thorntail agent-host: localhost ...
...microprofile-opentracing-thorntail agent-host: localhost ...
... agent-host: localhost agent-port: ...
...agent-host: localhost agent-port: 6831 ...
...localhost agent-port: 6831 ...
... agent-port: 6831 reporter-log-spans: ...
...agent-port: 6831 reporter-log-spans: true ...
...6831 reporter-log-spans: true ...
... reporter-log-spans: true reporter-flush-interval: ...
...reporter-log-spans: true reporter-flush-interval: 2000 ...
...true reporter-flush-interval: 2000 ...
... reporter-flush-interval: 2000 sampler-type: ...
...reporter-flush-interval: 2000 sampler-type: const ...
...2000 sampler-type: const ...
... sampler-type: const sampler-parameter: ...
...sampler-type: const sampler-parameter: 1 Integration ...
...const sampler-parameter: 1 Integration with ...
...specific Quarkus version. <dependencyManagement> <dependencies> ...
...version. <dependencyManagement> <dependencies> ...
... <dependencies> <dependency> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
...<artifactId>quarkus-bom</artifactId> ...
... ...
... ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
...<version>${quarkus.version}</version> ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> ...
... </dependency> </dependencies> </dependencyManagement> ...
...</dependency> </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> <!-- ...
...<dependencies> <!-- MicroProfile-Config ...
... <!-- MicroProfile-Config is ...
...of configuring ...
...configuring ...
... ...
... Quarkus, ...
... Quarkus, so ...
... Quarkus, so there ...
...a dependency --> ...
...dependency --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
...<artifactId>quarkus-rest-client</artifactId> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Quarkus ...
... <!-- Quarkus uses ...
...smallrye implementation --> ...
...implementation --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
...<artifactId>quarkus-smallrye-opentracing</artifactId> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Because ...
... <!-- Because we ...
...Tracer --> ...
...--> ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
...<artifactId>quarkus-jaeger</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Because ...
... <!-- Because we ...
...server and ...
...and ...
... ...
... ...
... ...
... ...
... ...
... client ...
... client side ...
... client side tracing ...
...side tracing --> ...
...tracing --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
...<artifactId>opentracing-jaxrs2</artifactId> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Because ...
... <!-- Because we ...
...Tracer --> ...
...--> ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
...<artifactId>opentracing-tracerresolver</artifactId> ...
... ...
... </dependency> </dependencies> Additionally ...
... </dependency> </dependencies> Additionally to ...
... </dependency> </dependencies> Additionally to the ...
...TracerFactory implements ...
...implements io.opentracing.contrib.tracerresolver.TracerFactory ...
... io.opentracing.contrib.tracerresolver.TracerFactory { ...
... io.opentracing.contrib.tracerresolver.TracerFactory { ...
... io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...{ @Override ...
... @Override public ...
... @Override public Tracer ...
...@Override public Tracer getTracer() ...
...Tracer getTracer() { ...
...getTracer() { ...
...{ ...
... ...
... Configuration ...
... Configuration configuration ...
... Configuration configuration = ...
...configuration = Configuration.fromEnv(); ...
...= Configuration.fromEnv(); ...
...Configuration.fromEnv(); ...
... ...
... Tracer ...
... Tracer tracer ...
... Tracer tracer = ...
...tracer = configuration.getTracer(); ...
...= configuration.getTracer(); ...
...configuration.getTracer(); ...
... ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
...GlobalTracer.register(tracer); ...
... ...
... return ...
... return tracer; ...
... return tracer; ...
... return tracer; } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
...return tracer; } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
...tracer; } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory The ...
...} } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory The TracerFactory ...
... at.ihet.samples.microprofile.opentracing.TracerFactory The TracerFactory is ...
...implements ServerSpanDecorator { @Override ...
...ServerSpanDecorator { @Override ...
...{ @Override ...
... @Override public ...
... @Override public void ...
...@Override public void decorateRequest(ContainerRequestContext ...
...void decorateRequest(ContainerRequestContext ...
...decorateRequest(ContainerRequestContext ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... requestContext, ...
... requestContext, Span ...
... requestContext, Span span) ...
...Span span) { ...
...span) { ...
...{ span.setOperationName(requestContext.getUriInfo().getPath()); ...
... span.setOperationName(requestContext.getUriInfo().getPath()); ...
... span.setOperationName(requestContext.getUriInfo().getPath()); ...
... span.setOperationName(requestContext.getUriInfo().getPath()); } ...
... span.setOperationName(requestContext.getUriInfo().getPath()); } ...
...span.setOperationName(requestContext.getUriInfo().getPath()); } ...
... } @Override ...
... } @Override ...
...} @Override ...
... @Override public ...
... @Override public void ...
...@Override public void decorateResponse(ContainerResponseContext ...
...void decorateResponse(ContainerResponseContext ...
...decorateResponse(ContainerResponseContext ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... responseContext, ...
... responseContext, Span ...
... responseContext, Span span) ...
...Span span) { ...
...span) { ...
...{ ...
... ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
...span.setBaggageItem("response.body", ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); } } // ...
... JsonbBuilder.create().toJson(response.getEntity())); } } // Register ...
...JsonbBuilder.create().toJson(response.getEntity())); } } // Register server ...
...implements DynamicFeature { private ...
...DynamicFeature { private static ...
...{ private static DynamicFeature ...
...tracingFeature = new ...
...= new ...
... ...
... ...
... ...
... ...
... ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
...ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Here ...
... // Here we ...
...register our decorator ...
...our decorator ...
...decorator ...
... ...
... ...
... ...
... ...
... ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
....withDecorators(Collections.singletonList( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... new ...
... new ServerTracingDecorator())) ...
... new ServerTracingDecorator())) ...
... new ServerTracingDecorator())) ...
...new ServerTracingDecorator())) ...
...ServerTracingDecorator())) ...
... ...
... ...
... ...
... ...
... ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
....withSerializationDecorators(Collections.emptyList()) ...
... ...
... ...
... ...
... ...
... ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
....withTraceSerialization(false) ...
... ...
... ...
... ...
... ...
... ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
....withJoinExistingActiveSpan(false) ...
... ...
... ...
... ...
... ...
... ...
... .build(); ...
... .build(); ...
... .build(); ...
... .build(); @Override ...
... .build(); @Override ...
....build(); @Override ...
... @Override public ...
... @Override public void ...
...@Override public void configure(ResourceInfo ...
...configure(ResourceInfo resourceInfo, ...
...resourceInfo, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... FeatureContext ...
... FeatureContext context) ...
... FeatureContext context) { ...
...FeatureContext context) { ...
...context) { ...
...{ ...
... ...
... // ...
... // Here ...
... // Here we ...
...custom built feature ...
...built feature ...
...feature ...
... ...
... tracingFeature.configure(resourceInfo, ...
... tracingFeature.configure(resourceInfo, context); ...
... tracingFeature.configure(resourceInfo, context); ...
... tracingFeature.configure(resourceInfo, context); } } // ...
...tracingFeature.configure(resourceInfo, context); } } // Client ...
...context); } } // Client side ...
...implements ClientSpanDecorator { @Override ...
...ClientSpanDecorator { @Override ...
...{ @Override ...
... @Override public ...
... @Override public void ...
...@Override public void decorateRequest(ClientRequestContext ...
...decorateRequest(ClientRequestContext requestContext, ...
...requestContext, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... Span ...
... Span span) ...
... Span span) { ...
...Span span) { ...
...span) { ...
...{ ...
... ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
...span.setBaggageItem("request.body", ...
... ...
... ...
... ...
... ...
... ...
... ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
...JsonbBuilder.create().toJson(response.getEntity())); ...
... ...
... span.setOperationName(String.format(" ...
... span.setOperationName(String.format(" %s", ...
... span.setOperationName(String.format(" %s", ...
... span.setOperationName(String.format(" %s", ...
...span.setOperationName(String.format(" %s", ...
...%s", ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
...requestContext.getUri().getHost(), ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... requestContext.getUri().getPath())); ...
... requestContext.getUri().getPath())); ...
... requestContext.getUri().getPath())); ...
... requestContext.getUri().getPath())); } ...
... requestContext.getUri().getPath())); } ...
...requestContext.getUri().getPath())); } ...
... } @Override ...
... } @Override ...
...} @Override ...
... @Override public void ...
... @Override public void decorateResponse(ClientResponseContext ...
...decorateResponse(ClientResponseContext responseContext, ...
...responseContext, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... Span ...
... Span span) ...
... Span span) { ...
...Span span) { ...
...span) { ...
...{ String ...
... String body ...
... String body = ...
...body = ""; ...
...= ""; ...
...""; if ...
... if (responseContext.hasEntity()) ...
... if (responseContext.hasEntity()) { ...
...if (responseContext.hasEntity()) { ...
...(responseContext.hasEntity()) { ...
...{ ...
... body ...
... body = ...
... body = readEntityFromInputStream( ...
...body = readEntityFromInputStream( ...
...= readEntityFromInputStream( ...
...readEntityFromInputStream( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
...responseContext.getEntityStream()); ...
... responseContext.setEntityStream(new ...
... responseContext.setEntityStream(new ...
... responseContext.setEntityStream(new ...
... responseContext.setEntityStream(new ...
...responseContext.setEntityStream(new ...
... ...
... ...
... ...
... ...
... BufferedInputStream( ...
... BufferedInputStream( ...
... BufferedInputStream( ...
... BufferedInputStream( ...
...BufferedInputStream( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... new ...
... new ByteArrayInputStream( ...
... new ByteArrayInputStream( ...
... new ByteArrayInputStream( ...
...new ByteArrayInputStream( ...
...ByteArrayInputStream( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
...body.getBytes(StandardCharsets.UTF_8)))); ...
... } ...
... } ...
... } ...
... } ...
... } ...
...} ...
... ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", body); ...
... span.setBaggageItem("response.body", body); ...
... span.setBaggageItem("response.body", body); } ...
...span.setBaggageItem("response.body", body); } ...
...body); } ...
... } private ...
... } private String ...
...} private String readEntityFromInputStream(final ...
...InputStream is) { ...
...is) { ...
...{ try ...
... try { ...
... try { ...
... try { ...
...try { ...
...{ ...
... ...
... ...
... ...
... ByteArrayOutputStream ...
... ByteArrayOutputStream bos ...
... ByteArrayOutputStream bos = ...
...= new ByteArrayOutputStream(1024); ...
...new ByteArrayOutputStream(1024); ...
...ByteArrayOutputStream(1024); ...
... ...
... ...
... ...
... IOUtils.copy(is, ...
... IOUtils.copy(is, bos); ...
... IOUtils.copy(is, bos); ...
... IOUtils.copy(is, bos); ...
...IOUtils.copy(is, bos); ...
...bos); ...
... ...
... ...
... ...
... return ...
... return new ...
... return new String(bos.toByteArray(),StandardCharsets.UTF_8); ...
...return new String(bos.toByteArray(),StandardCharsets.UTF_8); ...
...new String(bos.toByteArray(),StandardCharsets.UTF_8); ...
...String(bos.toByteArray(),StandardCharsets.UTF_8); ...
... ...
... } ...
... } catch ...
... } catch (Throwable ...
...(Throwable e) { ...
...e) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... return ...
... return "not_readable: ...
... return "not_readable: " ...
..." + e.getMessage(); ...
...+ e.getMessage(); ...
...e.getMessage(); ...
... ...
... } ...
... } ...
... } ...
... } } } The ...
... } } } The client ...
...} } } The client side ...
...ExternalRestResource createRestClient() { try { ...
...createRestClient() { try { ...
... try { final ...
...try { final ClientTracingFeature ...
...{ final ClientTracingFeature feature ...
...feature = createClientTracingFeature(); return ...
...= createClientTracingFeature(); return RestClientBuilder.newBuilder() ...
...createClientTracingFeature(); return RestClientBuilder.newBuilder() ...
... return RestClientBuilder.newBuilder() ...
...return RestClientBuilder.newBuilder() ...
...RestClientBuilder.newBuilder() ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .baseUrl(new ...
... .baseUrl(new URL("http://httpbin.org")) ...
... .baseUrl(new URL("http://httpbin.org")) ...
... .baseUrl(new URL("http://httpbin.org")) ...
....baseUrl(new URL("http://httpbin.org")) ...
...URL("http://httpbin.org")) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .readTimeout(2000, ...
... .readTimeout(2000, TimeUnit.SECONDS) ...
... .readTimeout(2000, TimeUnit.SECONDS) ...
... .readTimeout(2000, TimeUnit.SECONDS) ...
....readTimeout(2000, TimeUnit.SECONDS) ...
...TimeUnit.SECONDS) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .connectTimeout(2000, ...
... .connectTimeout(2000, TimeUnit.SECONDS) ...
... .connectTimeout(2000, TimeUnit.SECONDS) ...
... .connectTimeout(2000, TimeUnit.SECONDS) ...
....connectTimeout(2000, TimeUnit.SECONDS) ...
...TimeUnit.SECONDS) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Here ...
... // Here we ...
...custom built feature ...
...built feature ...
...feature ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .register(feature) ...
... .register(feature) ...
... .register(feature) ...
... .register(feature) ...
... .register(feature) ...
....register(feature) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .build(ExternalRestResource.class); ...
... .build(ExternalRestResource.class); ...
... .build(ExternalRestResource.class); ...
... .build(ExternalRestResource.class); } catch ...
... .build(ExternalRestResource.class); } catch (MalformedURLException ...
...(MalformedURLException e) { throw ...
...e) { throw new ...
...{ throw new RuntimeException("URI ...
...is not valid"); } } private ClientTracingFeature ...
...not valid"); } } private ClientTracingFeature createClientTracingFeature() ...
...ClientTracingFeature createClientTracingFeature() { return new ClientTracingFeature.Builder(GlobalTracer.get()) ...
...return new ClientTracingFeature.Builder(GlobalTracer.get()) ...
...new ClientTracingFeature.Builder(GlobalTracer.get()) ...
...ClientTracingFeature.Builder(GlobalTracer.get()) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
....withTraceSerialization(false) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Here ...
... // Here we ...
...register our decorator ...
...our decorator ...
...decorator ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
....withDecorators(Collections.singletonList( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... new ...
... new ClientTracingDecorator())) ...
... new ClientTracingDecorator())) ...
... new ClientTracingDecorator())) ...
...new ClientTracingDecorator())) ...
...ClientTracingDecorator())) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .build(); } Trace ...
... .build(); } Trace CDI ...
... .build(); } Trace CDI Beans MicroProfile-Opentracing ...
...class CustomRestResource { ... } Trace ...
...CustomRestResource { ... } Trace rest ...
...{ ... } Trace rest clients Unfortunately ...
...a custom tracing feature @RegisterRestClient(configKey = "externalResource") @RegisterProviders(@RegisterProvider(ClientTracingFeature.class)) @Path("/") public ...
...interface ExternalRestResource { ... } // If ...
...ExternalRestResource { ... } // If you ...

Anzeigen

Keycloak für Learning Friday Projekt „Hogarama“ First Step – JEE Microservices with MicroProfile-Config

Blog

First Step - JEE Microservices with MicroProfile-Config

...as JBoss modules. <dependency> ...
...JBoss modules. <dependency> <groupId>org.eclipse.microprofile.config</groupId> ...
...modules. <dependency> <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> <artifactId>microprofile-config-api</artifactId> ...
...<groupId>org.eclipse.microprofile.config</groupId> <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> <version>${version.microprofile.config}</version> ...
...<artifactId>microprofile-config-api</artifactId> <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> <scope>provided</scope> </dependency> Integration ...
...<version>${version.microprofile.config}</version> <scope>provided</scope> </dependency> Integration with ...
... <scope>provided</scope> </dependency> Integration with Thorntail Thorntail ...
...fraction for MicroProfile-Config. <dependencyManagement> ...
...for MicroProfile-Config. <dependencyManagement> ...
...MicroProfile-Config. <dependencyManagement> <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
...<artifactId>bom</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
...<version>${version.thorntail}</version> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> </dependencies> ...
... </dependencies> ...
... </dependencies> </dependencyManagement> ...
... </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
...<artifactId>microprofile-config</artifactId> </dependency> ...
... </dependency> ...
... </dependency> </dependencies> Integration ...
... </dependency> </dependencies> Integration with Quarkus Quarkus, ...
...specific Quarkus version. <dependencyManagement> <dependencies> ...
...version. <dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
...<artifactId>quarkus-bom</artifactId> ...
... ...
... ...
... ...
... ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
...<version>${quarkus.version}</version> ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> ...
... </dependency> </dependencies> </dependencyManagement> ...
... </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... <!-- ...
... <!-- Does ...
... <!-- Does not ...
...dependency defined. ...
...defined. ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... It ...
... It uses ...
... It uses Smallrye ...
...implementation of ...
...of ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... the ...
... the MicroProfile-Config ...
... the MicroProfile-Config as ...
...as default ...
...default ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... for ...
... for configurations ...
... for configurations --> ...
...for configurations --> </dependencies> How to provide ...
...in standalone.xml: <system-properties> <property ...
...standalone.xml: <system-properties> <property name="conax.request.dir" ...
...<system-properties> <property name="conax.request.dir" value="/tmp/cmnt/req"/> ...
...standalone.xml: <subsystem xmlns="urn:wildfly:microprofile-config-smallrye:1.0"> <config-source ...
...<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:1.0"> <config-source name="props"> ...
...xmlns="urn:wildfly:microprofile-config-smallrye:1.0"> <config-source name="props"> ...
... <config-source name="props"> ...
...<config-source name="props"> ...
...name="props"> ...
... ...
... <property ...
... <property name="prop1" ...
... <property name="prop1" value="foo"/> ...
...<property name="prop1" value="foo"/> ...
...name="prop1" value="foo"/> ...
...value="foo"/> ...
... ...
... <property ...
... <property name="prop2" ...
... <property name="prop2" value="bar"/> ...
...<property name="prop2" value="bar"/> </config-source> </subsystem> Directory ...
...name="prop2" value="bar"/> </config-source> </subsystem> Directory configuration ...
...value="bar"/> </config-source> </subsystem> Directory configuration in ...
...standalone.xml: <subsystem xmlns="urn:wildfly:microprofile-config-smallrye:1.0"> <config-source name="file-props"> ...
... <config-source name="file-props"> ...
...<config-source name="file-props"> ...
...name="file-props"> <dir ...
... <dir path="/etc/config/numbers-app"/> ...
... <dir path="/etc/config/numbers-app"/> ...
... <dir path="/etc/config/numbers-app"/> </config-source> </subsystem> Configuring ...
...via the JBoss-CLI: ...
...the JBoss-CLI: ...
...JBoss-CLI: ...
... ...
... ...
... ...
... ...
... /subsystem=microprofile-config-smallrye/config-source=file-props ...
... /subsystem=microprofile-config-smallrye/config-source=file-props \ ...
... /subsystem=microprofile-config-smallrye/config-source=file-props \ ...
.../subsystem=microprofile-config-smallrye/config-source=file-props \ ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... :add(dir={path=/etc/config/numbers-app}) Configuring ...
... :add(dir={path=/etc/config/numbers-app}) Configuring properties ...
... :add(dir={path=/etc/config/numbers-app}) Configuring properties via ...
...via the JBoss-CLI: /subsystem=microprofile-config-smallrye/config-source=props ...
...the JBoss-CLI: /subsystem=microprofile-config-smallrye/config-source=props \ ...
... /subsystem=microprofile-config-smallrye/config-source=props \ ...
.../subsystem=microprofile-config-smallrye/config-source=props \ ...
...\ ...
... ...
... ...
... ...
... ...
... :add(properties={"prop1" ...
... :add(properties={"prop1" = ...
... :add(properties={"prop1" = "foo", ...
...MicroProfile-Config configuration: # Configurations for ...
...for all stages thorntail: ...
...stages thorntail: microprofile: ...
... thorntail: microprofile: ...
...thorntail: microprofile: ...
... microprofile: ...
... microprofile: ...
...microprofile: config: ...
... config: ...
... config: ...
... config: ...
... config: ...
...config: ...
... ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
...config-sources: ...
... ...
... ...
... ...
... STATIC_CONFIG: ...
... STATIC_CONFIG: ...
... STATIC_CONFIG: ...
... STATIC_CONFIG: ...
... STATIC_CONFIG: ...
...STATIC_CONFIG: ...
... ...
... ...
... ...
... ...
... ...
... properties: ...
... properties: ...
... properties: ...
... properties: ...
... properties: ...
...properties: ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... info: ...
... info: "The ...
... info: "The application ...
..."The application info..." — — - ...
...— — - project: ...
...- project: stage: ...
... project: stage: local ...
...project: stage: local ...
...stage: local thorntail: ...
... thorntail: microprofile: ...
... thorntail: microprofile: ...
...thorntail: microprofile: ...
... microprofile: ...
... microprofile: ...
...microprofile: config: ...
... config: ...
... config: ...
... config: ...
... config: ...
...config: ...
... ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
...config-sources: ...
... ...
... ...
... ...
... LOCAL_CONFIG: ...
... LOCAL_CONFIG: ...
... LOCAL_CONFIG: ...
... LOCAL_CONFIG: ...
... LOCAL_CONFIG: ...
...LOCAL_CONFIG: ...
... ...
... ...
... ...
... ...
... ...
... properties: ...
... properties: ...
... properties: ...
... properties: ...
... properties: ...
...properties: ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... prop: ...
... prop: "local-prop" ...
... prop: "local-prop" ...
... prop: "local-prop" — — - ...
...— — - project: ...
...- project: stage: ...
... project: stage: test ...
...project: stage: test ...
... stage: test thorntail: ...
...test thorntail: microprofile: ...
... thorntail: microprofile: ...
...thorntail: microprofile: ...
... microprofile: ...
... microprofile: ...
...microprofile: config: ...
... config: ...
... config: ...
... config: ...
... config: ...
...config: ...
... ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
...config-sources: ...
... ...
... ...
... ...
... TEST_CONFIG: ...
... TEST_CONFIG: ...
... TEST_CONFIG: ...
... TEST_CONFIG: ...
... TEST_CONFIG: ...
...TEST_CONFIG: ...
... ...
... ...
... ...
... ...
... ...
... properties: ...
... properties: ...
... properties: ...
... properties: ...
... properties: ...
...properties: ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... prop: ...
... prop: "test-prop" ...
... prop: "test-prop" ...
...prop: "test-prop" — — - ...
...— — - project: ...
...- project: stage: ...
... project: stage: cloud ...
...project: stage: cloud ...
... stage: cloud thorntail: ...
...cloud thorntail: microprofile: ...
... thorntail: microprofile: ...
...thorntail: microprofile: ...
... microprofile: ...
... microprofile: ...
...microprofile: config: ...
... config: ...
... config: ...
... config: ...
... config: ...
...config: ...
... ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
... config-sources: ...
...config-sources: ...
... ...
... ...
... ...
... CLOUD_CONFIG: ...
... CLOUD_CONFIG: ...
... CLOUD_CONFIG: ...
... CLOUD_CONFIG: ...
... CLOUD_CONFIG: ...
...CLOUD_CONFIG: ...
... ...
... ...
... ...
... ...
... ...
... Dir: ...
... Dir: “/config/app” How ...
... Dir: “/config/app” How to ...
...class User { public final String ...
...final String username; public final String ...
...final String firstname; public User(String username, ...
...String firstname) { this.username ...
...firstname) { this.username = ...
...{ this.username = username; ...
...this.username = username; this.firstname ...
...= username; this.firstname = ...
...username; this.firstname = firstname; ...
...this.firstname = firstname; } } // Converts a ...
...implements Converter<User> { @Override public ...
...{ @Override public User convert(String ...
...convert(String value) { final ...
...value) { final String[] ...
...{ final String[] properties ...
...properties = value.split(";"); final ...
...= value.split(";"); final String ...
...value.split(";"); final String username ...
...final String username = properties; ...
... = properties; final ...
...= properties; final String ...
...properties; final String firstname ...
...final String firstname = properties; ...
... = properties; return ...
...= properties; return new ...
...properties; return new User(username, ...
...new User(username, firstname); } } How to provide ...
...class Configuration { @Inject @ConfigProperty(name ...
...{ @Inject @ConfigProperty(name = "info.text", ...
...= "info.text", defaultValue=“...”) private String infoText; ...
...private String infoText; @Inject @ConfigProperty(name ...
...infoText; @Inject @ConfigProperty(name = "google.apiKey") ...
...@ConfigProperty(name = "google.apiKey") private String apiKey; ...
...private String apiKey; // Getters for ...

Anzeigen

JEE Microservices with MicroProfile – Overview Architektur in der Cloud S2I Build

Blog

Vom Sourcecode zu einer fertigen Anwendung in einem Container. Das ist der “source to image” (S2I) Build.

...new-project s2i-builder-maven \ ...
...s2i-builder-maven \ --display-name="S2I ...
...\ --display-name="S2I Maven ...
... --display-name="S2I Maven Builder" ...
...Maven Builder" \ ...
...Builder" \ --description="This ...
...\ --description="This project ...
... --description="This project contains ...
...and use ...
...use ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... the ...
... the builder ...
... the builder to ...
...The hello world ...
...hello world ...
...world ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... application ...
... application used ...
... application used here ...
...new-build s2i-builder-maven~https://github.com/wildfly/quickstart#18.0.0.Final \ ...
...s2i-builder-maven~https://github.com/wildfly/quickstart#18.0.0.Final \ --name=binary-artefact ...
...\ --name=binary-artefact ...
... --name=binary-artefact \ ...
... --name=binary-artefact \ ...
...--name=binary-artefact \ ...
... \ --env=BUILDER_CONTEXT_DIR=helloworld ...
...\ --env=BUILDER_CONTEXT_DIR=helloworld \ ...
... --env=BUILDER_CONTEXT_DIR=helloworld \ ...
... --env=BUILDER_CONTEXT_DIR=helloworld \ ...
...--env=BUILDER_CONTEXT_DIR=helloworld \ --env=BUILDER_MVN_OPTIONS="-P ...
...\ --env=BUILDER_MVN_OPTIONS="-P openshift"   Sie ...
... --env=BUILDER_MVN_OPTIONS="-P openshift"   Sie haben ...
...--name=runtime --docker-image=jboss/wildfly \ ...
...--docker-image=jboss/wildfly \ --source-image=binary-artefact ...
...\ --source-image=binary-artefact \ ...
... --source-image=binary-artefact \ ...
... --source-image=binary-artefact \ ...
...--source-image=binary-artefact \ --source-image-path=/deployments/target/ROOT.war:. ...
...\ --source-image-path=/deployments/target/ROOT.war:. \ ...
... --source-image-path=/deployments/target/ROOT.war:. \ ...
... --source-image-path=/deployments/target/ROOT.war:. \ ...
...--source-image-path=/deployments/target/ROOT.war:. \ --dockerfile=$'FROM ...
...\ --dockerfile=$'FROM jboss/wildfly ...
... --dockerfile=$'FROM jboss/wildfly \nCOPY ...
...new-build s2i-builder-maven~https://github.com/wildfly/quickstart#18.0.0.Final \ ...
...s2i-builder-maven~https://github.com/wildfly/quickstart#18.0.0.Final \ --name=binary-artefact ...
...\ --name=binary-artefact \ ...
... --name=binary-artefact \ ...
... --name=binary-artefact \ ...
...--name=binary-artefact \ --env=BUILDER_MVN_MIRROR="* ...
...\ --env=BUILDER_MVN_MIRROR="* | https://my-maven-mirror/path/to/maven-public/" ...
... --env=BUILDER_MVN_MIRROR="* | https://my-maven-mirror/path/to/maven-public/" \ ...
...--env=BUILDER_MVN_MIRROR="* | https://my-maven-mirror/path/to/maven-public/" \ ...
...| https://my-maven-mirror/path/to/maven-public/" \ --env=BUILDER_MVN_MIRROR_ALLOW_FALLBACK=true   Hinweis: ...
...\ --env=BUILDER_MVN_MIRROR_ALLOW_FALLBACK=true   Hinweis: Sie ...
... --env=BUILDER_MVN_MIRROR_ALLOW_FALLBACK=true   Hinweis: Sie können ...

Anzeigen

OpenShift auf AWS How to – not – DevOps on Openshift Professionelle Softwareentwicklung – Basics Monitoring mit Prometheus