Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
93rdAirhacksQ&A.md

Ask questions and see you at December, 2nd, 8.PM. CET: youtube.com/c/bienadam/live

Also checkout recent episode:

92nd 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

@AdamBien

This comment has been minimized.

Copy link
Owner Author

@AdamBien AdamBien commented Nov 3, 2021

Are any limitations to use the Java CDK vs using the Cloud Formation directly? (by Aleksandr, after a DevTalks session)

@jefrog1844

This comment has been minimized.

Copy link

@jefrog1844 jefrog1844 commented Nov 19, 2021

I've been following your talks (most recently devoxx and microstream) on running "serverless" with AWS Lambda and Java. You mentioned in a recent talk that a monolith with 25-50 classes or so could be deployed as a Lambda. How would a jax-rs application with multiple resource classes (boundaries) be configured/deployed as a single Lambda?

@HiMyNameIsIlNano

This comment has been minimized.

Copy link

@HiMyNameIsIlNano HiMyNameIsIlNano commented Nov 21, 2021

Hi @AdamBien,

could you please explain me the differences between the following three annotations:

If @singleton means that every client that uses that bean receives the same (and only) instance defined in the DI container why was it necessary to define the annotation @ApplicationScoped? In what are @singleton and @ApplicationScoped different? Also, I find it very hard sometimes to decide if my beans should be singletons or stateless because to me they sound the same. I read the documentation several times but somehow the explanation did not resonate to me very much. Could you please tell me how these annotations differ from each other?

Thanks in advance!

@HiMyNameIsIlNano

This comment has been minimized.

Copy link

@HiMyNameIsIlNano HiMyNameIsIlNano commented Nov 21, 2021

Hi @AdamBien,

I very often make use of an EntityManagerProducer class and annotate the method that returns the EntityManager with @produces so that I can inject the produced bean in other beans. This way I can use constructor injection and simplify my life when writing unit and integration tests because I am free to define whatever persistence unit I want.

I have read several times, however, that the EntityManager is not thread safe and I was wondering two things:

  • what are the implications of the entity manager not being thread safe? What kind of issues can I incurr into if I inject it into several other beans and not paying attention to thread safety?
  • how can I correctly produce the entity manager in a way that it is thread safe?

Thanks again.

@jefrog1844

This comment has been minimized.

Copy link

@jefrog1844 jefrog1844 commented Nov 23, 2021

When trying to use your template aws-quarkus-lambda-cdk-plain, it took several hours to get it to deploy due to a bootstrap issue.

I finally found the following worked to properly bootstrap the app:

export CDK_NEW_BOOTSTRAP=1
cdk bootstrap aws://ACCOUNT-NUMBER/REGION

Evidently the "modern" template is required for bootstrap and the above command configures it correctly.

Can you explain how to properly setup aws cdk/lambda via bootstrap and config and if an IAM user is required?

Thanks much

@alibttb

This comment has been minimized.

Copy link

@alibttb alibttb commented Nov 24, 2021

Hello sir,

What is your approach to development, test, production stages when it comes to persistence.xml file, how do you use the schema creation feature, and how to protect production from deploying some artifact with a wrongly attributed persistence.xml where javax.persistence.schema-generation.database.action is set to drop-and-create option?

Thank you very much.

@dabkhazi

This comment has been minimized.

Copy link

@dabkhazi dabkhazi commented Nov 26, 2021

Hey! What do you think of the one container one process approach? And multithreading is taken over by the orchestration system through the creation of the required number of containers. Is this approach good for Java applications?

@dabkhazi

This comment has been minimized.

Copy link

@dabkhazi dabkhazi commented Nov 26, 2021

The microprofile fault tolerance api will allow us to limit the number of concurrent calls to our business method with Bulkhead annotation. Is it possible to use the same annotation for the microprofile rest client method in interface definition?

@dabkhazi

This comment has been minimized.

Copy link

@dabkhazi dabkhazi commented Nov 30, 2021

Graviton and Ampere will reduce the cost of cloud services?

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