Create a gist now

Instantly share code, notes, and snippets.


Hi Adam.
Imagine you are in a Team that maintains Master data, let's say purchase articles. The attributes of this articles change from time to time.
Other teams need this data and they want to receive deltas in an asynchronous way (in german I would call it "Datenschleuder"), to store it in their own database.
Which way do you prefer for this approach? Is Websockets technology suitable? Maybe JMS? Or other technology like apache kafka?

I know you like the synchronous way, but in this case, they force you (me also ;) ) to do it asynchronously.

thank you for your suggestions.

jarryDk commented Mar 21, 2017


We have a JAX-RS with

Create : return 201 and id in the header field x-id
Read : return 200 and id in the header field x-id
Update : return 204 and id in the header field x-id
Delete : ... Not importen

I use the project CORS Support For JAX-RS 2.0 / JavaEE 7 to add Cors to my headers, but then I wanted to read the header field "x-id" from javascript (jquery) on a Create og Update it is not available.

I found a nice article Using CORS - HTML5 Rocks and found out that I needed to add the header "Access-Control-Expose-Headers".

How do you handle this situation in your projects?


First of all, thanks for your great blog!

We have a Java EE web application that uses basic authentication (configured in web.xml). Now we are planning to expose some of the business logic through REST web service (to access via a mobile client). How can we implement Token based authentication (JWT / OAuth 2) for the REST webservice without affecting the current basic authentication mechanism for the web application?

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