Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active June 7, 2021 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/38e1754782c901f5d63e45968f3df610 to your computer and use it in GitHub Desktop.
Save AdamBien/38e1754782c901f5d63e45968f3df610 to your computer and use it in GitHub Desktop.
87thAirhacksQ&A.md

Ask questions and see you at June, 7th, 8.PM. CEST: https://youtu.be/Uz1nLi5APVw

Also checkout recent episode:

86th airhacks.tv

Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks

@wanderer2097
Copy link

Lastly - really looking forward to the Java on AWS Cloud workshop!

Would it be at all possible to include the following topics:

  1. Long running processes (how-to do it on AWS specifically). Example - we have a batch job which reads all customer invoices from the database, does something with them and writes something back to the database. Covering aspects like monitoring, controlling resource utilization, etc.
  2. Singleton in the cloud - how would one go about having a guaranteed single instance of a specific bean/microservice in the cloud environment?

The agenda looks pretty packed - if we can't cover it in the workshop I will try asking them here (refactored to the best of my abilities).

@shqiptaros
Copy link

Hi Adam

(1)
I've implemented an api gateway using quarkus that interacts with some other microservices (also on quarkus).

for each microservice i use an microprofile @restclient in api gateway,

How to make the microprofile @Retry to work only if there is a connection error (maybe the microservice is down)
I've tried @Retry(retryOn = java.net.ConnectException.class) but it does not work. Maybe didn't work cause the first exception that is thrown is (org.jboss.resteasy.spi.UnhandledException), but I think that this exception is thrown each time any kind of exception is thrown, so I don't want to @Retry(retryOn = UnhandledException) because I only want to Retry only if connection refused.

So, I want to do this: api gateway rest client to some service, if service is down I want to printStackTrace in log, to @Retry once more to connect and if two times not connected I want to return a JsonObject with a specific information to the client.

(2)
Can you explain shortly what is Flyway db, should it be used and if yes how should be used with Java, Jakarta EE or Quarkus or any java technology...

Thanks a lot in advance

@dev87sal
Copy link

Should we use Lombok project? Why? Why not? Thanks

@dev87sal
Copy link

What are the differences between integration test, smoke test, system test and unit test from your point of view? Thanks.

@dkrtic
Copy link

dkrtic commented Jun 4, 2021

Hi Adam,

can you please make your podcasts louder as it is quieter than all the other podcasts that I listen to.
There are some "standards" how loud the podcast should be so they are all on the approximately same level.

Thanks

@christian-frei
Copy link

Hi Adam,
Many old applications use the command chain pattern: Often there was a xml file describing the order of the commands, a parser and some boiler plate reflection code to execute the commands.
How would you encounter/refactor such a problem nowadays? CDI (async) events?

Thanks and looking forward to the aws workshop in July.

@HiMyNameIsIlNano
Copy link

HiMyNameIsIlNano commented Jun 7, 2021

Hi Adam,

what would be the preferred way to handle exceptions in a JakartaEE application?

Regards,
HiMyNameIsIlNano

@HiMyNameIsIlNano
Copy link

HiMyNameIsIlNano commented Jun 7, 2021

Hi Adam,

I would like to experiment a bit with "events" in my JakartaEE backend. My goal is to generate an event (e.g. OrderPlacedEvent) and have another service (e.g. ShippingServiceListener) in the backend that listens to that event and perform some taks (e.g. create a shipment and update the state of it in the DB). If I were to use Spring I would inject the:

@Autowired private ApplicationEventPublisher applicationEventPublisher;

in my service and define my ShippingServiceListener this way:

@Component public class ShippingServiceListener implements ApplicationListener<OrderPlacedEvent>

How can I achieve the same in a JakartaEE application?

Regards,
HiMyNameIsIlNano

@dev87sal
Copy link

dev87sal commented Jun 7, 2021

Should we use DTO objects? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment