Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
66thAirhacksQ&A.md

Ask questions and see you at September, 2nd, 6.PM. CET: http://www.ustream.tv/channel/adambien

Also checkout recent episode:

65th airhacks.tv

Please keep the questions Java EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.

@matlach

This comment has been minimized.

Copy link

commented Aug 9, 2019

Hi Adam,

Micro-profile provides really nice API and features though, it's not always fully available in application server. For example, Wildly 17 which released very recently, doesn't yet support Micro-Profile OpenAPI.
To your knowledge, is there some common/standardized way across the various Micro-Profile (api or vendor) to do this?
Do you have any examples on "how to bootstrap" within an Application Server a missing micro-profile?

In my case, I'm especially interested about OpenAPI to remove my Swagger dependency. Do you think that replicating what Thorntail does, i.e. using a standard Servlet, could do the trick?
https://github.com/thorntail/thorntail/blob/master/fractions/microprofile/microprofile-openapi/src/main/java/org/wildfly/swarm/microprofile/openapi/deployment/OpenApiServletContextListener.java

Thanks a lot for your time, and as always, keep up the good work.

@thatsIch

This comment has been minimized.

Copy link

commented Aug 14, 2019

Hi Adam,

we have a business constraint that a value should not drop below 0. The value is calculated on the fly based on a set of entries. We offer a JAX-RS endpoint to allow adding entries but if the account drops below 0. Imagine just a basic bank account where you have 50€ and you can book as long you have enough funds on your account.

Some clients started to replay their POST requests and dropped below 0€ because of race conditions,
because when the request was posted they had enough funds. How can you prevent that? Obviously, we told the clients to stop that, but we want to protect the business constraints on our side, too.

Love from Essen, DE

@dempile

This comment has been minimized.

Copy link

commented Aug 20, 2019

Hi Adam,
In the comunication between two microservices , you said that we should copy paste the entity in the two, how would you implement the outbox transactional pattern in order to notify other microservices that data has changed.
I know that you dont like using third party libraries but what do you think of the combinaison of Debezium and Kafka. Is there any alternatives?
Thanks

@markus4zander

This comment has been minimized.

Copy link

commented Aug 21, 2019

Hi Adam,

in your screen cast here you get a browser warning about using "document.write" when using a web component with lit-html. How do you handle (or ignore) this warning in real projects?

Thanks
Markus

@Tunjidir

This comment has been minimized.

Copy link

commented Aug 21, 2019

Hi Adam,

we have a business constraint that a value should not drop below 0. The value is calculated on the fly based on a set of entries. We offer a JAX-RS endpoint to allow adding entries but if the account drops below 0. Imagine just a basic bank account where you have 50€ and you can book as long you have enough funds on your account.

Some clients started to replay their POST requests and dropped below 0€ because of race conditions,
because when the request was posted they had enough funds. How can you prevent that? Obviously, we told the clients to stop that, but we want to protect the business constraints on our side, too.

Love from Essen, DE

Hi thatslch, you should try using a constraintvalidator, with a single annotation and a class that implements that ContraintValidator. you can validate the request on the fly when it's been passed as a POST request body.

@sgulci

This comment has been minimized.

Copy link

commented Aug 21, 2019

Hi Adam,

Are you using minishift or okd origin for your local test? which are you recommend

thanks
Sahin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.