Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created December 9, 2018 09:36
Show Gist options
  • Save AdamBien/d8b70f881d893c16a4a192a4efaa5913 to your computer and use it in GitHub Desktop.
Save AdamBien/d8b70f881d893c16a4a192a4efaa5913 to your computer and use it in GitHub Desktop.
58thAirhacksQ&A.md

Ask questions and see you at January, 7th, 6.PM. CET: http://www.ustream.tv/channel/adambien

Also checkout recent episode:

57th airhacks.tv

Please keep the questions Java EE-stic. Means: as short and as concise as only possible.

@os10000
Copy link

os10000 commented Dec 9, 2018

Hello Adam,

my current problem is writing a stream from JMS into a database monster. The thing takes ages to add a record. However, if I do add 1000 records, it does not take any longer. So my approach was to take your resource adapter tutorial and build a transactional resource adapter with "add" and "drain" methods. Now I can very quickly accept messages and use a timer to transactionally write whole batches into the database.

Do you have a better or more elegant way?

Thanks!

Oliver

@os10000
Copy link

os10000 commented Dec 9, 2018

Hello Adam,

I want to do expensive computations on my JMS messages in parallel; Setting a high count on the "messages per transaction" holds locks on the database that I need to do the computation. I was hoping to relax the message order by taking them from the queue and putting them into a persistent tuple space -- but the nearest thing I could find was Inifispan (which is not persistent).

Do you have a recommendation on how to relax the processing order on my JMS stream and allow more parallel work?

Thanks,

Oliver

@Chilis92
Copy link

Hi Adam,

Why do large companies prefer Spring over Java EE/Jakarta EE?, I always have created applications using Java EE and whenever I see a company that I want to get into they ask for Spring boot, Spring security, Spring batch, etc. Nowadays Spring is better than Java EE/Jakarta EE?

@t-shaguy
Copy link

Hi Adam,

Thank you very much for the interactive session at Munich, it was wonderful learning from you and all of the other attendees. #GreatStuff

  1. Please in making our wars as thin as possible, particularly in the event of external libraries ( but local to my processes).

Do you suggest these libraries be packages as external jars and situated in some directory on the image?

  1. In the case of adopting JPA and lambda on a typical crude application.

Assuming we have an doAll() {..}. that loads the entire entity in memory. What will be an ideal

reload strategy assuming, after creation the user wants to see what was just created. Whereas I

have loaded the Entity to memory earlier?

  1. Please do you know any library that passes accurate GPS information for Java desktop/JavaFX apps

@cristhiank
Copy link

Hello Adam,

I have seen your approach to build a vanilla javascript router using the "hash" change event. What would be the best approach to implement lazy loading for that lean router ? I am trying to migrate from Angular to #usetheplatform and one common optimization is to separate the web app in "chunks" that are lazy loaded on demand according to the route.

Thanks!

@robert-niestroj
Copy link

Hi,
is it possible to debug Java 8 Stream's in NetBeans 8.2, 9 or 10? I have tried, but no success. When i hover over a variable or add it as a watch it say's: "variable n is not known in the current context".

obraz
obraz

@gurukulkarni
Copy link

gurukulkarni commented Jan 1, 2019

Happy New Year! and Thanks for all the content, I have seen all 3 of your web series, WebStandards-Igniter, Web Components and Effective Webstandards and very much enjoyed them. 👍 :
I have some questions now that I am trying to use them -- more could follow :) :

  1. I am trying to use web components for a pet project, where backend is Java EE 8 + microprofile in a (payara docker image) exposing rest endpoints.
    I know I can just drop / copy the css and Js and index.html in the webapp folder and they get served, however how to do this automatically e.g. when maven clean package is run? It would be best if rollup also could be run before copying.
    It would be great if you can record a screencast if possible on how to do this if the answer if not too short :)

  2. in the course you use lit-html by installing and then using rollup to just get html and render related code in the bundle, however lit-html has an even better way to do this and possibly opening up a wider way to include minimal libraries, called unpkg lit-html > unpkg.com
    e.g. in my module I can say
    import { html, render } from 'https://unpkg.com/lit-html?module';
    this could also be used for d3 I think? what is your opinion on this? or installing and bundling is still better?

  3. when you include a script in html you can define it as
    <script async src="app.js" type="module"></script>
    do you know what effect if any this has on the loading, I have not experimented yet but will soon do that.

  4. If you want to keep UI and backend code seperate (from question 1) could you record a screencast where we could make use of e.g. payara virtual server to serve static content?

@AdamBien
Copy link
Author

AdamBien commented Jan 3, 2019

Adam, you typically create a boundary and JAX-RS resource for microservices. What clues suggest NOT create facade and have JAX-RS resource only?

question by Michal

@AdamBien
Copy link
Author

AdamBien commented Jan 3, 2019

@rajeshduggal
Copy link

rajeshduggal commented Jan 5, 2019

Adam, In your presentation "How to Structure Jakarta EE Applications for Productivity Without Bloat", ( https://www.youtube.com/watch?v=DzaDhAx12gc#t=7m00s ) 7 minutes into the video, you jokingly suggest that there should be an investigation to find the root place on the internet where this idea of creating a java package structure for "com.airhacks.flight42.rest", "model", "exceptions", etc, etc.

My question is...
Do you think a good prize for finding the answer would be free access to one of the awesome Adam Bien training video tutorial series. ;)

A colleague checked in some code with this structure, I asked him where he learned this... and he said from "Red Hat"!
He showed me the way...

  1. Visit the JBoss EAP website
  2. Click "Hello World!"
  3. Click "Build your first JBoss EAP application"
  4. See the suggestion to learn how to build JBoss apps by studying the TicketMonster app.
  5. When you get to the "Exploring the newly generated project" section and scroll down a little. You will a screenshot of the package structure.

People new to Red Hat JBoss have been learning from this Red Hat TicketMonster tutorial for years! Wow!

@dempile
Copy link

dempile commented Jan 6, 2019

Hi Adam,

Can you explain with an example how you would do a JWT authentication with Microprofile and ES6.

Thanks

Copy link

ghost commented Jan 6, 2019

@rajeshduggal
If you interesting in advanced explanation look at a great conference talk
https://www.youtube.com/watch?v=ma15iBQpmHU
but only in polish language

@ulfRossang
Copy link

Hi Adam! I like your Shell script (setup....) to save time. Just shortly describe or show me the setupWebstandardProject? Thanks in advance

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