Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
98thAirhacksQ&A.md

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

Also checkout recent episode:

97 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

@imge-net
Copy link

imge-net commented Apr 24, 2022

Hii Adam, There are serious performance problems with recursive structures in JSF composite component, do you have any alternative suggestions?

@dempile
Copy link

dempile commented Apr 24, 2022

Hi Adam,
My application uses a Postgres database. I want to cluster the database, but Postgres handle only active-passive configuration. How can I configure my application to make INSERT and UPDATE go to the master node, and SELECT queries redirected to other replica nodes in order to reduce load to the master.
Thanks

@HoschiAndre
Copy link

HoschiAndre commented Apr 26, 2022

Hi Adam,

would you mind to implement a quick Quarkus JAX-RS resource with multipart to upload and download an image, i.e. a jpg file?

I followed the Quarkus introduction and didn't get it to work and humbling now for serval days.

Thank you very much.

Cheers,
Andre

@jefrog1844
Copy link

jefrog1844 commented Apr 26, 2022

Hi Adam, I currently use JWT to secure JAX-RS endpoints, but I have seen some examples demonstrating Jakarta EE Security API (JSR 375) with JAX-RS? This sis an interesting mix as Jakarta EE seems to better fit with servlets. Does Jakarta EE have any place in securing JAX-RS end points. (See link below for reference).

https://blog.payara.fish/java-ee-security-api-jsr-375/soteria-with-jwt-tokens

Thanks

Jeff

@wodarski
Copy link

wodarski commented Apr 29, 2022

Hi Adam,

Do you know why javaee-api 8.0 does not contain JAX-WS classes anymore?

Recently we migrated some applications to JBoss EAP 7.4 which is compatible to JavaEE/JakartaEE 8 and Java 11, but we had to put this additional dependency to pom.xml:

	<dependency>
		<groupId>javax</groupId>
		<artifactId>javaee-api</artifactId>
		<version>8.0</version>
		<scope>provided</scope>
	</dependency>
	<dependency> <!-- This was not needed with javaee-api 7.0 --> 
		<groupId>jakarta.xml.ws</groupId>
		<artifactId>jakarta.xml.ws-api</artifactId>
		<version>2.3.3</version>
		<scope>provided</scope>
	</dependency>

I know soap is old technology but we still have many soap services and clients running in our applications.

Thanks.

@wanderer2097
Copy link

wanderer2097 commented May 2, 2022

Greetings, Adam!

Hard to believe we are 2 shows away from an anniversary edition! In the meantime - quick question re: JPA & L2 cache in the clouds.

  1. Do you see L2 JPA cache enabled & used in cloud-native (e.g. AWS Lambda) applications often?
  2. How to deal with an application which has a lot of master data (that rarely changes) and lot of writes depending on it?
  3. What do you typically do with quarkus (which only has a barebones L2 cache implementation) in a lambda environment? Do you end up using it (and only rely on optimistic locking to guard against the risk of stale data) or disable it and setup a standalone (or application level) cache in the cloud?

@haglo
Copy link

haglo commented May 2, 2022

Hi Adam, how can i optimize nested ArrayList of Objects?
I have 3 Classes

  • Class: People
  • Class: Drug
  • Class: Substance

From every Class i create an ArrayList

  • PeopleList
  • DrugList
  • SubstanveList

Every ArrayList has 200.000 Elements

I want know which Substances takes a people?
therefore i need iterate over all 3 ArrayLists

Code-Example:
Substance detectSubstance(People people) {
// Must iterate over 200.000
for (Drug drug : drugList){
if (people.getDrugID == drug.getDrugId) {
// Must again iterate over 200.000
for (Substance substance : substanceList){
if (drug.getSubstanceID = substance.getSubstanceId) {
....

How can i optimize it?

@arjantijms
Copy link

arjantijms commented May 12, 2022

@jefrog1844

Does Jakarta EE have any place in securing JAX-RS end points. (See link below for reference).

Yes, absolutely. See this for a test which you can use as an example as well:

https://github.com/jakartaee/security/tree/master/tck/app-jaxrs

Quite a number of MP JWT implementations are based on Jakarta Security, for instance:

https://github.com/omnifaces/jwt

@mkwapisz
Copy link

mkwapisz commented Jul 6, 2022

Hi Adam,
can you explain/comment lack of consistent API/tools for testing Jakarta EE based applications? I do not know why specifications are prepared without testing in mind. You have to prepare your own project configurations (maven) like for example for rest endpoints: jetty+jersey+mockito. Or you have to use proprietary maven plugins for application servers to control their lifecycle during maven build. The only good solution I know is Weld Junit which nicely allows you to test cdi components. But this is not a standard and covers only one technology and implementation out of hundred. I hate arquillian which always generates many problems for me and I have to fight with project configurtation instead of a project itself.

Regards.

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