Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active October 3, 2016 09:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/e6e20c129e673ad558be495dd4f3afc4 to your computer and use it in GitHub Desktop.
Save AdamBien/e6e20c129e673ad558be495dd4f3afc4 to your computer and use it in GitHub Desktop.
31stAirhacksQ&A.md
@AdamBien
Copy link
Author

AdamBien commented Sep 5, 2016

@AdamBien what about proxy or API gateway in docker? is there in dockland any image? or is not necessary if I have multiple image running?

— martin al. dominguez (@martdominguez) September 1, 2016
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

@kovica
Copy link

kovica commented Sep 6, 2016

1.) I want to do load balancing for my application running on Glassfish. I came up with two possible solutions:

  1. create a Docker container for each individual Glassfish server. This would include installation and setup (connection pools, JNDI, ...) of Glassfish, deploying my application, ...
  2. create a shell script using asadmin that creates a Glassfish domain, does the setup (connection pools, JNDI, ...), deploys my application, ...
    Then I'd have a haproxy running somewhere doing load balancing. Which approach do you think is better/simpler, 1. or 2.?

2.) Do you use Linux server for Docker? Do you use OpenJDK JRE/JDK or from Oracle in production and why?
3.) Does Docker work if you have a Swing based application? Have you even had a database running in Docker?
4.) In 30th Airhacks alameen said that he uses JasperReports and that Glassfish crashes for large PDFs. My company also uses JasperReports for all reporting and works great. If we have large PDFs we use a Virtualizer (http://community.jaspersoft.com/wiki/virtualizers-jasperreports).

@tnsasse
Copy link

tnsasse commented Sep 7, 2016

Hi Adam,

how important is the role of the JVM (Oracle vs OpenJDK vs IBM) in your projects. Do you even bother? Any recommendations for JVM tuning for server side applications?

Thanks,
Tobi

@caromeva
Copy link

caromeva commented Sep 9, 2016

Hi Adam,

I have a question related to CDI on Clusters environment, I deploy applications on Weblogic 12.1.3 or 12.2.1 and the CDI @Inject not suitable to work with Ejb Beans. The proyect Structure is in two differents artifacts, Web and EAR package with Ejb Module, and also Api Module with commons things to the proyect. I try to Inyect the Ejb interface Remote to get the reference to EJB and I get the Ambiguous Dependency Error, to fix this error I put a Qualifier Annotations, passing this error, I deploy again y all nodes on the Cluster, but multiples errors display on console for each node of WLS Cluster. The finally Question is CDI is Supported to work on Clusters Environments ? You can give please a explanation about .

Thanks.
Best Regards.

Carlos Romero V.

@cwansart
Copy link

Hi Adam,

how do you combine JAX-RS and JSF? The tutorials I found, as well as your JAX-RS video only covers JAS-RX returning XML, JSON or plain text, but not complex templates you can create with JSF.

I am not sure how to start/structure. My idea is like this:

  • create an application that uses JAX-RS for creating, deleting and showing entities.
  • create the JSF side (with BCE, of course) that calls the JAX-RS routes with the JAX-RS client.

Is this a good approach or are there better ways to achieve that? How do you do that?

Regards
Christian

@mart-dominguez
Copy link

mart-dominguez commented Sep 12, 2016

Hi Adam, I've asked you via twitter and you add here the first question. I am experimenting with docker and microservices in one of my news projects and I have others question related to docker and microservices:

  1. The role between Docker and projects like Kumuluz or WildFly Swarm. ¿It's necessary or convenient to dockerize an Kumuluz jar for example? ¿What is the advantage of run the same Jee7 application in Kumuluz or for example in payara micro with docker? It's almost the same or am I so confused?

  2. what's the best way to configure a driver jdcb, jdbc pool and datasource in a JEE7 server running in docker?

  3. Reading Kumuluz tutorial (https://ee.kumuluz.com/tutorial/2015/06/04/microservices-with-java-ee-and-kumuluzee.html ) they define the persistence.xml file with a persistence-unit using transaction-type "RESOURCE_LOCAL" and on servers is not recommended (I remember your article http://www.adam-bien.com/roller/abien/entry/don_t_use_jpa_s ). It's a difference in that kind of projects using RESOURCE_LOCAL vs JTA.

Thanks
Martín Domínguez.
@martdominguez

Copy link

ghost commented Sep 15, 2016

Hi Adam,

do you know a JASPIC Server Authentication Module for SAML Authentication? Is there already a SAM implemented anywhere, that uses SAML? (well, I know, there is PicketLink for Wildfly but this is not an exchangeable JASPIC SAM for other Java EE AppServers)

Thx + Regards,
Robert

@roamingthings
Copy link

In the last time I had the feeling that JavaFX is loosing traction and may become obsolete. Is this impression correct or are there new impulses? Is it worth to invest time in learning JavaFX nowadays?

Thanks,
Alex
@fischbauch

@wesleyegberto
Copy link

Hi Adam, firstly thank you for all this content you are providing for the community!

I have two questions about communication between applications using REST.

  1. Which are the best practices out there to design API returns, for instance, a service to verify if a customer has credit.
    Should I return status 200 to show that some customer has credit and a 404 to show that he hasn't? Or should I return an object with the result of verification, like { "status": 0, "return": true, "message": "Has credit"} ?

  2. In the consumer service, where I consume that service should I threat the response json or just the status?

Thank you!

Copy link

ghost commented Sep 25, 2016

  1. Which are the best practices out there to design API returns, for instance, a service to verify if a customer has credit.
    Should I return status 200 to show that some customer has credit and a 404 to show that he hasn't? Or should I return an object with the result of verification, like { "status": 0, "return": true, "message": "Has credit"} ?

Hi @wesleyegberto

How about Status-Code 204 (No Content)?

@arturkowalczyk
Copy link

Hi Adam,

I just wanted to ask you about a small advice how to resolve a problem that we found in one of our projects.

There is a JEE application deployed as .EAR file in WildFly 9.0.2. Sometime after the application server restart it starts to consuming 100% CPU and unfortunately we were not able to find what is the source of the problem. At the moment we are planning to introduce two mechanisms in order to find what is wrong with our app:

  1. logging in GC - to check if there is any problem with the memory consumption,
  2. we are also planning to monitor the system status using MXBeans.

Any ideas what else should we check? Any help will be very appreciated.

Best regards,
Artur

@dwamara
Copy link

dwamara commented Sep 28, 2016

Hi Adam,

I am passing here the question that I asked on youtube after watching the video regarding communication between microservices.
It's not always evident to be able to use Docker on some projects (the company hosting my VPS for example told me that I won't be able to install Docker and use it on the VPS as the virtual machine uses Virtuozzo), what will then be the best (or appropriate) way to make services communicating with one another? As far as I could see on the internet, everybody tends to recommend the use of service registries like Zookeper or Netflix's Eureka.
I tend to not considering them at the moment as using them will IMO "pollute" code (http://blog.arungupta.me/zookeeper-microservice-registration-discovery/), is there a more elegant way to solve that problem?

Beste Grüße,
Daniel

@enji7
Copy link

enji7 commented Sep 28, 2016

Hi Adam,

which JavaOne 2016 sessions would you recommend for viewing?

Thanks,
Nenad

@wesleyegberto
Copy link

Hi @rherschke
Thank you for the answser =) I forgot about that one!

But would be nice to know some common HTTP status for operations like CRUD, verify something, validation errors, business errors or requirements and so on.

Thank you!

@dsurendran
Copy link

Hello Adam,

Saw your talk on infoshare on 'A Code-Driven Microservices Session', you explained about monitoring in Payara using url localhost:4848/monitoring/domain1/server.
How to do same kind of monitoring in Wildfly?

Thank You.

@nebrass
Copy link

nebrass commented Sep 30, 2016

Hello Adam,

I watched recently your great training course about Microservices, which is the most complete one about Java EE & Docker.
I just hope to see "Service Discovery" video, to complete the series ;)

PS: The video about load balancing & docker was wonderful !

Thank you !

@joshgontijo
Copy link

Hi Adam
I would like to hear you opinion on event sourcing. Have you worked in a project that uses this pattern ?

Thanks and keep the good work !
Josh

@anoopk84
Copy link

anoopk84 commented Oct 2, 2016

Hi Adam,

What tool do you recommend to generate Rest API docs?

Thanks,
Anoop

@thomasdarimont
Copy link

Hello Adam,

do you already use the HEALTHCHECK CMD support introduced in docker release 1.12?
https://blog.newrelic.com/2016/08/24/docker-health-check-instruction/

Cheers,
Thomas

@ivanzorcic
Copy link

ivanzorcic commented Oct 2, 2016

Hi Adam, do you have a favorite zero downtime deployment strategy with JEE and docker? Thanks, Ivan

@matlach
Copy link

matlach commented Oct 3, 2016

Hi Adam,

How would you wire programmatically the EntityManager without using persistence.xml file.
Does the only way would be to rely on vendor specific feature? ex, hibernate: http://docs.jboss.org/hibernate/orm/5.1/userguide/html_single/Hibernate_User_Guide.html#bootstrap-jpa-hibernate

Thanks,

@mtrefzer
Copy link

mtrefzer commented Oct 3, 2016

Hi Adam,

I watched your latest screencasts accessing javaee backend with angular2, reactiveJS and native javascript as frontend implementation.
First off all thanks for that, great job as always ;)

  • What's your setup vor ES6 development ? ( webpack, babel, ...)
  • Which javascript libs do you use for unit- and integrationtests ?

Thanks Michael
(and sunny greetings from the Costa Blanca)

@rac021
Copy link

rac021 commented Oct 3, 2016

Hi Adam,

What is your point of view about RAML ( restful api modeling language ) for documenting REST APIs ?

Thank's

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