Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created August 12, 2022 11:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AdamBien/49efb5c357b19ad2bdde82ea026db803 to your computer and use it in GitHub Desktop.
102ndAirhacksQ&A.md

Ask questions and see you at September, 5, 8.PM. CET: youtube.com/c/bienadam

Also checkout recent episode:

101 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

@abdelmuniem
Copy link

abdelmuniem commented Aug 30, 2022

Hi Adam,

I am developing an app using quarkus when I insert java.timeYearMonth using jpa and hibernate, I use to receive an error deserialize JSON value into type: class java.time.YearMonth.

@Entity(name = "Book")
@Table(name = "book")
public class Book {

    @Id
    @GeneratedValue
    private Long id;

    @NaturalId
    private String isbn;

    private String title;

    @Column(name = "published_on", columnDefinition = "date")
    @Convert(converter = YearMonthDateAttributeConverter.class)
    private YearMonth publishedOn;

    // Getters and setters omitted for brevity
}

I want to insert only year and month, local date is working fine.

Your help is much appreciated as usual.

All the best,
Abdelmuniem

@paloliska
Copy link

Hi Adam,
I am trying quarkus-smallrye-fault-tolerance. I have service annotated with @transactional and @Retry with some parameters. I would like to have custom annotation @RetryableTransaction as following:

@Transactional
@Retry
public @interface RetryableTransaction {
}

However with this annotation on service method retry mechanism does not work. Do you know why? Is it part of microprofile specification?

@paloliska
Copy link

Hi Adam, one more question:
Did you ever used http 2 server push?
Is there any easy way to use it without any low level code?

@Endilicam
Copy link

Hi Adam,

in the case of a GET call in a REST service with a parameter (query param) that contains multiple ids, if many ids are sent it can give a 414 error (Request-URI Too Large), searching the internet I have found 3 solutions, but none of them convinced me:

  1. Limit the number of ids sent.
  2. Make a POST and put the parameter in the BODY and return the information in this call.
  3. Make a POST, with an identifier of the call, put the parameter in the BODY and then make another GET call with the identifier where it returns the information.

What do you think, any other solution?

Thank you very much!

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