forked from arun-gupta/microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated snoop discovery/registration in everest sample app.
See arun-gupta#21 To run examples: run snoop-service in docker: docker run -it -p 8081:8080 ivargrimstad/snoop-service Make sure application.yml files in services, user, order and catalog points to correct ip for snoop
- Loading branch information
1 parent
91c519b
commit 4508fee
Showing
19 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
.../catalog/src/main/java/org/javaee7/wildfly/samples/everest/catalog/ApplicationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.javaee7.wildfly.samples.everest.catalog; | ||
|
||
import eu.agilejava.snoop.annotation.EnableSnoopClient; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
import javax.ws.rs.core.Application; | ||
|
||
/** | ||
* @author arungupta | ||
*/ | ||
@EnableSnoopClient | ||
This comment has been minimized.
Sorry, something went wrong. |
||
@javax.ws.rs.ApplicationPath("resources") | ||
public class ApplicationConfig extends Application { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
microservice/catalog/src/main/resources/META-INF/persistence.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> | ||
<persistence-unit name="catalogPU" transaction-type="JTA"> | ||
<jta-data-source>java:/jboss/datasources/ExampleDS</jta-data-source> | ||
This comment has been minimized.
Sorry, something went wrong.
arun-gupta
|
||
<properties> | ||
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/> | ||
<property name="javax.persistence.schema-generation.create-source" value="metadata"/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
snoop: | ||
applicationName: catalog | ||
applicationHome: http://localhost:8080/catalog/resources | ||
applicationServiceRoot: catalog | ||
serviceHost: 192.168.59.103:8081/snoop-service/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...vice/order/src/main/java/org/javaee7/wildfly/samples/everest/order/ApplicationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.javaee7.wildfly.samples.everest.order; | ||
|
||
import eu.agilejava.snoop.annotation.EnableSnoopClient; | ||
import javax.ws.rs.core.Application; | ||
|
||
/** | ||
* @author arungupta | ||
*/ | ||
@EnableSnoopClient | ||
@javax.ws.rs.ApplicationPath("resources") | ||
public class ApplicationConfig extends Application { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
snoop: | ||
applicationName: order | ||
applicationHome: http://localhost:8080/order/resources | ||
applicationServiceRoot: order | ||
serviceHost: 192.168.59.103:8081/snoop-service/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ervice/user/src/main/java/org/javaee7/wildfly/samples/everest/uzer/ApplicationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.javaee7.wildfly.samples.everest.uzer; | ||
|
||
import eu.agilejava.snoop.annotation.EnableSnoopClient; | ||
import javax.ws.rs.core.Application; | ||
|
||
/** | ||
* @author arungupta | ||
*/ | ||
@EnableSnoopClient | ||
@javax.ws.rs.ApplicationPath("resources") | ||
public class ApplicationConfig extends Application { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
snoop: | ||
applicationName: user | ||
applicationHome: http://localhost:8080/user/resources | ||
applicationServiceRoot: user | ||
serviceHost: 192.168.59.103:8081/snoop-service/ | ||
|
||
|
Can this annotation stay even if Snoop server is not running?