Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active April 3, 2017 15:35
Show Gist options
  • Save AdamBien/beae7dd8966a6d57b7225ba310b18abe to your computer and use it in GitHub Desktop.
Save AdamBien/beae7dd8966a6d57b7225ba310b18abe to your computer and use it in GitHub Desktop.
37thAirhacksQ&A.md
@davidsoles
Copy link

Hi Adam,
Microservices theory says that each service needs its own database. This statement refers to:

  • One microservice must have one DBMS instance and database.
    screen shot 2017-04-02 at 2 55 00 pm
  • Multiple microservices can share one DBMS instance and every one of then has their own database.
    screen shot 2017-04-02 at 2 54 49 pm
    Thanks.

@AdamBien
Copy link
Author

AdamBien commented Apr 2, 2017

Plain Java SE without Java EE -- is it viable in real world?

(a question from a conference attendee)

@sebargarcia
Copy link

Hi Adam, we are starting a new project with the following stack: JPA + CDI + JAX-RS (for the backend), Angular 2 (maybe with prime-ng) for the client side.
My question is if we have to have all in a single war project (backend + client side) or have two projects one for backend (single war) + other project with all angular stufff.

I see there are some maven plugins to automate all the build process of the angular stuff, but I am not sure if it is good to have all in a single war.

Thanks in advance.

@jcrochavera
Copy link

Hi Audam, could you talk us about your experience with java EE and high performance IOT applications?? (Tips, tricks, most used NoSql databases in your projects,etc)

@walnikster
Copy link

Hi Adam,
Thanks for your blog containing very interesting JEE stuff.
I want to secure my REST API in my JEE application with keycloak. Can you please give a short example of how to integrate keycloak client adapter into payara. I was looking for a client adapter as for wildfly but I was unable to find one for payara.
Thank you
Niki

@kg6zvp
Copy link

kg6zvp commented Apr 3, 2017

Thanks so much for fitting in my student project. I'm building an SDK for Jax-RS microservices.

I've got several entities, corresponding EJBs to work with the entitymanagers and a request filter that needs to be put into an SDK for other students to use to create wars with microservices in them. I'm trying to create a war with a Time microservice that tells time to develop and test the SDK with, but I can't seem to get the SDK inclusion steps down to just declaring a maven dependency. (currently it requires declaring lib/ssauthclient-1.0.5-SNAPSHOT.jar in the Time service in order to avoid an 'org.hibernate.UnknownEntityTypeException', but this results in two persistence modules) What am I doing wrong?

SDK Source: http://gitlab.wmapp.mccollum.enterprises/wmapp/ssauthclient.git

Further detail if you need it:
The request filter and custom Principal classes work just fine, but the JPA entities persisted aren't discovered without using the directive in the persistence.xml of the Timeservice project. I've tried building the beans.xml and persistence.xml files into the SDK jar in Maven, then including them in Timeservice via the pom.xml, which results in two persistence units, but this throws the error 'org.hibernate.UnknownEntityTypeException: Unable to locate persister: edu.westmont.UserToken' when a call is made to a Jax-RS endpoint. The only way I get it to work is by requiring the person creating a microservice to add a directive, but this seems like the wrong solution. Ideally, the included jar would be able to expose it's custom Principal class and Jax-RS filter to the microservice without exposing its entities.

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