Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created September 8, 2020 12:01
Show Gist options
  • Save AdamBien/50822397755deac85c9f5bd39b334b57 to your computer and use it in GitHub Desktop.
Save AdamBien/50822397755deac85c9f5bd39b334b57 to your computer and use it in GitHub Desktop.
79thAirhacksQ&A.md

Ask questions and see you at October, 5th, 8.PM. CET: https://vimeo.com/event/154379

Also checkout recent episode:

78th 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

@alibttb
Copy link

alibttb commented Sep 28, 2020

Hi Adam

_btw my name is Ali then comes b.t.t.b ;-) _

My Question is:

How to make the thin war as portable as possible regarding database access:

  1. data sources definition is done in different ways in Payara/Glassfish vs Wildfly!!
  2. JDBC connector is deployable to Wildfly but needs some other config in Payara/Glassfish!!

Many thanks

@AlexeyMalkovskiy
Copy link

Hi Adam,

What do you do in cases when you have to include some build related information (build number, build date etc.) into an application?

Thank you.

@vaibhavkulkarni
Copy link

vaibhavkulkarni commented Oct 1, 2020

Hello Adam,

How do I implement custom bulma css styles in every web component in my app? I basically want the themed css created using bulma to be applied to all lit-element web components in my app.

Thanks,
Vaibhav

@varijkapil13
Copy link

Hi Adam,

We recently switched to JWT authentication using Microprofile and Payara. It works great with JAX-RS endpoints. But we also have some Websockets in our apps and so far there is nothing in MP that would authenticate Websocket connections, we had to create a webfilter for the this and use another library to verify the JWT. Is there a better approach until/if the support for Websockets comes to MP?

Thanks!

@FlorinAlexandru
Copy link

Hi Adam,

How to update an injection point? Assume that we have a producer method that returns a type. Based on some business logic, I want to change the value of the injection sometimes at runtime.

I know that I can use Instance<MyBusinessClass> injected and injcted.get() but is there a visible penalty for creating each time a new instance? Are there any other solutions?

Thank you,
Florin

@aldolushkja
Copy link

Hello Adam, it's the first time I write in your Gist I hope to be as concise as possible and thank you very much for your tutorials and courses, you are a guru to me.

Question 1: Often/always in our projects happen to have configurations (url for database connections, properties of connections to queues, simple application FLAGs, etc. ) in a table of "configuration" within databases, configurations that are typically encapsulated within Bean Singleton and loaded when the application starts with a call to database and column mapping -> class attributes. Often the need arises also to do a hot refresh of such configurations in case one of those flags changes, so the idea was to expose a dedicated service only for the refresh of the Singleton bean. Do you consider that a good approach? Would you have a valid security option to encapsulate this information without having to resort to databases?

Question 2: Considering that the scenario at question 1 , is mainly due to the deploy environment with Tomcat, migrating such applications to WildFly I was thinking of using the Microprofile specifications in full, specifically MicroprofileConfig for injecting values ( url db , url queue, application flags etc...) directly from properties files. But I think the customer won't be happy about it, considering that some of that data is still within the source code. Do you have any idea how to use this specification in cases like the one mentioned above?

Thank you again, great job

@thehpi
Copy link

thehpi commented Oct 5, 2020

How can I unittest a JNDI lookup that I do in payara?

@xwoker
Copy link

xwoker commented Oct 5, 2020

Hi Adam,

in your latest web dev video course your putting the whole redux state into local storage. What would be your approach if I want to put parts of the redux store in local storage and other parts into session storage? Two different top level objects and filtering?

Thanks for the great video courses.

Christian

@franden
Copy link

franden commented Oct 5, 2020

Hello Adam,

  • which annotation do you usually use in your quarkus projects to ensure that a bean is discovered by CDI container? @dependent, @RequestScoped ...? Or do you even use more manual bean instantiation where no other resources must be injected via CDI?

  • which JVM do you use in your projects to run your application/application server, or which is more stable according to your experience? OpenJDK? Build of a specific vendor? Hotspot/OpenJ9?

Greetings
Denis

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