-
Notifications
You must be signed in to change notification settings - Fork 263
Add MongoDB example that works with prestarted MongoDB #196
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
3 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
https://ci.wildfly-swarm.io/job/thorntail-examples-pull-request-linux might need some changes, will see what happens with this pr testing first! For local testing, I used Docker to start MongoDB. |
b4217ce
to
11b77bf
Compare
<artifactId>example-microprofile-nosql</artifactId> | ||
|
||
<name>Thorntail Examples: Microprofile NoSQL</name> | ||
<description>Thorntail Examples: Microprofile NoSQL</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Microprofile -> MicroProfile
</services> | ||
</resources> | ||
</configuration> | ||
</execution> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand why this entire <execution>
is needed. Seems to me your usage of FMP is unnecessarily complicated.
from: | ||
kind: ImageStreamTag | ||
name: example-microprofile:latest | ||
type: ImageChange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the only thing you do here is specifying -Dswarm.project.stage
. You don't need to add the full YAML, just what you need to add, FMP will generate the rest.
targetPort: 8080 | ||
to: | ||
kind: Service | ||
name: example-microprofile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think FMP would generate the same thing.
targetPort: 8080 | ||
selector: | ||
deploymentconfig: example-microprofile | ||
type: LoadBalancer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think FMP would generate the same thing.
public class MyResource { | ||
|
||
@Inject @Named("mongodbtestprofile") | ||
MongoDatabase database; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation.
@Override | ||
public Response toResponse(NotFoundException e) { | ||
return Response | ||
.status(Response.Status.OK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it really be 200?
Thanks for the review, I hope to spend more time on this soon, I also want to see if I can improve the password handling a bit also, to use a generated password instead of hard coding it. |
add to whitelist |
No description provided.