Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active May 13, 2019 16:47
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/001c1bad3f868a8508783569e192ea3d to your computer and use it in GitHub Desktop.
Save AdamBien/001c1bad3f868a8508783569e192ea3d to your computer and use it in GitHub Desktop.
62ndAirhacksQ&A.md

Ask questions and see you at May, 13th (this time one week later), 6.PM. CET: http://www.ustream.tv/channel/adambien

Also checkout recent episode:

61 airhacks.tv

Please keep the questions Java EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.

Dates for (cloudy) winter 2019 airhacks.com are available.

@orlovskyjavaprofi
Copy link

Hi Adam, as freelancer myself currently i am very concern about state of commercial support for different versions of JDKs from different vendors.
JUG Dortmund Lead, Java Champion, JavaOne Rockstar Hendrik Ebbers has given a talk at local meetup group in Nuremberg about changes in Oracle JDK license subscription program.
So he explained that if three major JDK Vendors find a bug in their commercial JDK version they fixed and commit the patch to own private version source control and then if they suppose to commit to openJdk this probably can cause an issue, because different JDK Vendors have different release cycles.
Lets just imagine following situation:
Vendor A find a bug in own commercial JDK 17th and fix it and commit it for version 18 of openJDK and at the same time Vendor B find the bug in version 18 and released the commit to openJDK 19 and at the same time Vendor C find a bug and fix it and released it in openJDK20 and lets suppose that the bug which was fixed by all the vendors is one and the same, then it's obvious question who will decide which of the patches is a right and appropriate one for the openJDK?
Sure for commercial clients which use the commercial version of Java JDK of one or another Vendor its ok, but what about middle size enterprises and start up company's, i know for the fact ,that this can probably caused a financial damage (switching to commercial version of jdk) to such company's, i decided to recommend to my client's to slowly switch and use https://adoptopenjdk.net/ because its really free and include all fixes which will be found by RedHat i mean by IBM. This is not ideal situation for JDK as platform, because adoptopenjdk does not have a TCK approval of standard.
So what is you opinion about such fragile Java Platform state, what kind of advise we should give our clients late in the future? I sincerely hope that big company's realize , that they created a mess and without any common sense "write once , run everywhere" will definetly become a thing of past.

@dsurendran
Copy link

Hello Adam,

  1. I am writing an OAuth client, what is the best practice to get a refresh token in Java. We need to fetch after get 401 unauthorized or to cache the OAuth token and request for refresh token before timeout period? Is there is an out of box library support?
    Thank you.

@g-mccarthy
Copy link

Hi Adam,
I am just wondering if you were setting up an enterprise system, what kind of architecture you would use i.e. API Gateway, Docker, Kubernetes, Openshift, MQ, etc. Could you describe at a high level how calls would flow through the system. I am planning to move from an older monolithic application that communicates with many external systems to a more flexible service based system. I have some ideas of what I would like to do but would be very interested in hearing your thoughts.
Thanks in advance for any advice,
Glen.

@ghassen-chetioui
Copy link

ghassen-chetioui commented May 6, 2019

Hello Adam,
Can you tell us your thoughts concerning the update of JakartaEE Rights to Java Trademarks
Thank you.

@dineshbhagat
Copy link

Hi Adam,
It would be great if you share tips to understand existing codebase(both open and closed source - with less or no documentation).
Most of the time, it feels information overload and loses interest in reading code. This is holding me back in contributing to open source code.

@tmsanchez
Copy link

Hi Adam.

Now that Jakarta EE Rights from Java Trademarks are finally defined, in your opinion, What will be the future or Jakarta EE? (I notice that Ghassen already ask same question)

Regards,

Tito Sanchez

@mreppe
Copy link

mreppe commented May 7, 2019

Hello Adam

How do you handle garbage collection of ViewScoped beans in JSF in your project? In the current JSF version ViewScoped beans remain in the memory, if you leave the page with a GET request (h:link, h:outputLink, ...) instead of JSF navigation [1]. Due to this behavior we need a lot of heap space in our application, even if there are only a few users logged in. Do you use ViewScoped from Omnifaces to prevent this problem?

[1] https://stackoverflow.com/questions/30410601/how-detect-and-remove-during-a-session-unused-viewscoped-beans-that-cant-be

Regards from Austria

@jmlclosa
Copy link

jmlclosa commented May 7, 2019

Hi Adam,
Question about JavaFX :) which seems a forgotten think in "Java world" because majority of applications are web.

  1. What are your thoughts of using JavaFX/OpenJFX for standalone application on an embedded device? We are developing software for devices for a new public transport system: a driver console (x86), a smart card check device with screen (arm), unattended ticketing machine (x86), ...
    It has high interaction with hardware (card reader, credit card reader, qr reader, printer, gps, ...). It has a local database (using Hibernate) where all data is saved and is sent periodically to central system via REST (using Jax-RS)
    I miss the producitivity that I used to with Java EE: CDI, JTA, JSF, ... but I discard the use of Java EE application with application loaded by a Browser because I didn't rely on Browser interaction and there is no multi-user access.

  2. Do you recommend some framework like ControlsFX?
    We are using Afterburner.fx, which allows us using CDI and remove some boilerplate code for loading resources. We also added FontawesomeFX project.

  3. How do you think is the best way to communicate with that devices? I.E: force a reboot or getting trip info remotely.
    Maybe having a Java EE application inside the device with Jax-RS endpoints which communicate to JavaFX app via RMI?
    Central system --REST--> Java EE application in devices --RMI--> Java FX Application

Thanks for all your work, I've made first 4 online training and I don't miss any airhacks and podcast :)
Regards from Mallorca,
Juanma.

@dempile
Copy link

dempile commented May 8, 2019

Hi Adam,
When I try to inject a microprofile metric like @counted in a cdi bean with @nAmed I got this error : cannot produce unserializable instances for injection into an injection point that requires a passivation capable dependency.
the cdi bean implements Serializable
thanks

@ivanzorcic
Copy link

ivanzorcic commented May 9, 2019

Hi Adam,

I tried out some quarkus.io with JavaScript frontend (no framework no migration). If you want to take a look at it: https://github.com/zorcic/kicker (With this Application and a football table you can have an endless competition)
Would be great if you have time to review it and a question is:

How do I get @javax.ejb.Startup behavior without ejb but with cdi, so some method can be eagerly executed on startup?

  • using "@observes @initialized(ApplicationScoped.class)" throws when injecting EntityManager an exception "Unable to identify the default PU:"
  • quarkus provides an cdi event, which seems to work "io.quarkus.runtime.StartupEvent", but that is not part of a spec...

Regards from Darmstadt, Ivan

@altuga
Copy link

altuga commented May 13, 2019

Hello Adam,

Should we write jars in war files or no jar(s) in a war file? I see some projects there are 5 war files and every 5 wars there are at least 3 or 4 jars file. In which use cases should we use jar files in war? Thanks.

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