Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created June 4, 2020 09:25
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/ed9b266efa084a74864b0e9f5512f29c to your computer and use it in GitHub Desktop.
Save AdamBien/ed9b266efa084a74864b0e9f5512f29c to your computer and use it in GitHub Desktop.
76thAirhacksQ&A.md

Ask questions and see you at July, 6th, 8.PM. CET: https://vimeo.com/415639656

Also checkout recent episode:

75th 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.

@robert-niestroj
Copy link

robert-niestroj commented Jun 26, 2020

Whats the best way to share constants between Java Backend and a JavaScript frontend? I have a few Java enums in my Backend, which i would like that my JS Frontend would use to avoid duplication or mismatches.

Copy link

ghost commented Jun 26, 2020

Very important in productivity is testing, but JakartaEE has no support by platform. In SpringBoot we can create test (Integrating Testing) by simple adding @springboot and everything important for test are launching.
Simply entermvn clean varify. We can focus only on business logic.

I know, that you resolve this task by creating another project for System Testing, but this is very inconvenient.
Some very big framework is Arquillian, but it has no support for Junit 5. Seems to be not alive.
I failed with trying simple test :(

Main questions: How to test rest endpoints? JPA with database in memory? CDI? Jms?

@vanuatoo
Copy link

In Java EE 8 Applications we typically use JAX-RS with Stateless EJBs.
In Quarkus what would be the correct scope for @stateless? @RequestScoped or ApplicationScoped?

@dempile
Copy link

dempile commented Jun 29, 2020

Hi Adam,

  • I hava manage to make the hazelcast cache on Payara Micro work properly in okd with your docklands image S2I Payara Micro updated from 5.192 to 5.201. All the @RequestScoped and @ViewScoped work but when using the @ApplicationScoped I have a problem with the serialization of the class. How can i avoid this kind of problem. I know tha hazelcast is a proprietary solution and you like the standard but I didnt found another way to make a distributed cache and I need for the scalling.

  • How to make an application without @singleton and @ApplicationScoped or if necessary how to replace them.

Thanks

@WassimAkachi
Copy link

WassimAkachi commented Jun 30, 2020

Hi Adam,

  1. Is it possible to build a multi-tenant Jakarta EE 8 / MicroProfile app, so that each Tenant has its own database/database-schema?

  2. How to switch dynamically at runtime between different databases/schemas for each http-request (via WebFilter / ThreadLocal)?

  3. Is it possible to switch dynamically at runtime the entity-manager and transaction-manager per request? Can you show us a PoC?

Thanks
Wassim

@brunogptavares
Copy link

Hi Adam,

How can I reuse JPA entities across multiple projects?
Can I put entities in a maven module, what dependencies and configurations are needed?

Thanks
Bruno

Copy link

ghost commented Jul 3, 2020

Hi Adam,

What is the basic difference between a Jakarta EE and a microprofile server (e.g. micronaut, e.g. payara micro)? Yes, the micro is small and the full is big; but, what's missing from the micro?

Kind regards,
John

@szymonk92
Copy link

Hi Adam,

In my project, we use pretty complicated Access Policy which for every entity has a user and group rights. Groups might be predefined as well as created by the administrator user. So for every entity user or group (or both) can have READ/WRITE/OWNER rights. This approach requires 2 additional tables for every entity (+additional 2 for Envers) and has multiple joins. Do you know any better way to manage rights for entities? I was wondering if we could use KeyCloak to help us with that, however not sure if we can use User and Groups policies together. What's your opinion on that?

Thanks
Szymon

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