Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
33rdAirhacksQ&A.md

asafalima commented Nov 9, 2016 edited

Hi Adam,

We want to manage our logs in central location so it will be easier to see whats happening in our system.
We started to use ELK in house but it gets very hard to maintain the amount of data produced.
We decided to go with SAAS solution and there are 2 companies we're considering:
logz.io and Splunk

Have you worked with one of them ? Which solution you thinks fits best ?
We're using SLF4J to handle our logs and I saw logz.io has appender for this library.

Thank you very much

Hi Adam

I wanted to know if there was a promotion code or discount for buying the videos "Effective Java EE". the idea is adquiirir after the other two videos "Testing" and "Microservices".

leandroandrade commented Nov 17, 2016 edited

Hi Adam

I want to know when use @applicationscoped(CDI) and @stateless(EJB). For example: If I have two layers(resources, service) is correct to use:

  • resources(Rest): @applicationscoped
  • service: @stateless

Is correct to use @applicationscoped in beans that insert objects into mongodb?

Can you explain when use each other?

Thanks!!!

Owner

AdamBien commented Nov 17, 2016

Exception factories and exception pooling (tales from the field :-))

veselinmilanov commented Nov 20, 2016 edited

Hello Adam, first I want to congratulate You for the great videos and news which You are making in youtube. I'm watching them very often and enjoying the time during watching them. They are made very nice and explained very well. As You I enjoy java alot and I'm learning new things every day.
This is why I want to ask You something if it is not a problem for You and if You have time I will appreciate it a lot.

I have Desktop Java application and it is make on Spring boot framework and JAVAFX and FXML. It is multhitreading application.
The problem is the following: When I run the application with the "Search" button it should popup a modaw window immediately. The problem is that I have a process which is taking about 15-20 seconds. during this time is collectes a data which will be used after this.The method is located in TaskGetRetailersURL and is called searchUsers(). I hardcoded a "Thread.sleep(20000);" just to simulate the process. This data can not be skipped.
And the Popup modal window is shoowing affter this 15-20 seconds. I want after pressing the button to show the popup modal window.

P.S: I have hardcoded username and pass and also put to help you to understand the how is working now.

You can see the attached Java source code project in the mail.

Please can You geve me advice how to do this?

Here You can download the cource code: http://dox.bg/files/dw?a=bdcba0e7a1 it will expire on 20 Dec. You have to mark checkbox and press where is written "изтегли избраните" :) this menas download seected.
The link is with time if it expire please contact me to upload it again.
thank you in advance
Kind Regards

veselinmilanov commented Nov 22, 2016 edited

Hi Adam Thank you for the advice. We will Avoid this the Util in future :)

Hi Adam,
thank you for your great work. Your containers in docklands are very useful.
Can you give an example how to configure a JDBC datasource in the payara-configured docker container, please. E.g. a postgresql DB? How to add the library for the db driver to the container image?
Is it better to run the database in a docker container or on the host?
Do you recommend a shared database instance for several applications or a single database instance for each app?
Thank you, and keep up the great work.
Kind regards,
Niki

tonda100 commented Nov 28, 2016 edited

Hi Adam,

  1. Where do you save your docker images, which cannot be public?
  2. I am trying to follow the DRY principle and I use single object for saving into database and the save object return via REST endpoint, but some fileds I do not want send via REST (password or LocalDateTime which can be converted for JPA but does not look nice in JSON). I can create JsonObject but there can be a lot of work to re-map everything. I can create DTO but it is more or less the same (manual remapping). I can use @jsonignore annotation but that would restrict for using just with application server using Jackson.
  3. What mechanism do you use for queues? First choice JMS, but I would like support scaling so remote JMS server, but that involves configuration of application server JCA or remote JMS and JMS server have to run before start of application server. Second choice RabbitMQ but it is not JMS and external library necessary, using via docker seems like it does not support persistence of messages like activemq.

Thanks Antonin

sentyaev commented Nov 30, 2016 edited

Adam, thanks for answering my question in last video. I have another one.
It's about Docker and deployment.

  1. For now in my CI when I push changes to let's say 'master' branch it build, test, create docker image and upload this new image into container registry and each time I have new version of container. That's works great.
    In my production environment I have reversproxy and behind this I have two instances of application 'prod' and 'staging'.
  2. I go to production server, shutdown 'staging', and run new 'staging'.
  3. I run tests against staging and if it's fine I switch 'prod' and 'staging' in reversproxy config. Also it works fine.

My issue is this #2 and #3 steps I do manually. I have a scripts, so I 'ssh' to server and run this scripts.
Is there a simple/proper way of doing this? Probably some tools you can point to?

heppa commented Dec 1, 2016

Hi Adam, again many thanks for your valuable input to the community... I would like to know, what you think about Project lombok (https://projectlombok.org/) as I know, you are not a fan of bloat. For me, it turns out to be very useful (especially for the Builder pattern) once you master the idea of several potentially dependant annotation processors. Would you use lombok or prefer having the whole code needed for e.g. Builder written out manually or generated by IDE plugins?

yacota commented Dec 5, 2016

We are currently evaluating different container technologies ... at the begining Docker seemed to be the most appropiate choice but now(after learning a bit) Rkt seems to be better choice for us.
Could you please briefly describe why you've choosen Docker instead of Rkt(others?).

Thanks

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