Ask questions and see you at July, 6th, 8.PM. CET: https://vimeo.com/415639656
Also checkout recent episode:
Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.
Ask questions and see you at July, 6th, 8.PM. CET: https://vimeo.com/415639656
Also checkout recent episode:
Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.
How to create a bean without xml in MicroProfile?
Is something like this possible?
@ApplicationPath("/jobrunr")
public class JobRunrExampleApplication extends Application {
@ApplicationScoped
public JobScheduler jobScheduler(StorageProvider storageProvider) {
final JobScheduler jobScheduler = new JobScheduler(storageProvider);
BackgroundJob.setJobScheduler(jobScheduler);
return jobScheduler;
}
...
}
Found it:
public class JobRunrProvider {
@Produces
@Singleton
public JobScheduler jobScheduler(StorageProvider storageProvider) {
final JobScheduler jobScheduler = new JobScheduler(storageProvider);
BackgroundJob.setJobScheduler(jobScheduler);
return jobScheduler;
}
...
}
Hi Adam,
Could you make some summaries about testing BCE-based applications. I remember you mentioned about testing classes in the Boundary. But what about Control? Also I saw even separate projects for tests.
One more question about testing. If you have to test some private method in some service class, is it Ok to make it package visible or move it to some control class and write test to this control?
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.
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?
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?
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
Hi Adam,
Is it possible to build a multi-tenant Jakarta EE 8 / MicroProfile app, so that each Tenant has its own database/database-schema?
How to switch dynamically at runtime between different databases/schemas for each http-request (via WebFilter / ThreadLocal)?
Is it possible to switch dynamically at runtime the entity-manager and transaction-manager per request? Can you show us a PoC?
Thanks
Wassim
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
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
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
I would love a review of JobRunr, a distributed job scheduling library which utilizes plain lambdas for fire-and-forget, delayed and recurring jobs.
You can find it at https://github.com/jobrunr/jobrunr.