Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

This comment has been minimized.

Copy link

m1k0-registered commented Feb 5, 2016

  1. Your opinion about webjars
  2. Sample code and your opinion about versioning in REST based on content negotiation (e.g. application/json; version=2.3 )

This comment has been minimized.

Copy link

vkalayda commented Feb 6, 2016

Hello Adam,

I want to ask you about concurrency and stateless session beans.

As you mentioned earlier (in 2010 year :) ) in post -

With pools you can throttle the concurrency, because most (all I know) application servers allow you the configuration of max number of instances. You can control the concurrency of every bean type (Boundary) in a fine grained way. This is important for the avoidance of DoS attacks and dealing with legacy resources.

But few days ago i found that glassfish / payara can't provide this behavior, issue was created payara/Payara#646

Lets consider following case - let's assume that application communicate with billing platform, but billing have some limitations - number of concurrent requests (5 for instance).
So, how we can control the number of concurrently executed threads on Billing Business Delegate Bean?
Is there another one way to solve this issue in Java EE way?

In my opinion will be great if payara will be able to provide this behavior.

Thank you.


This comment has been minimized.

Copy link

McFoggy commented Feb 9, 2016

Hi Adam,

I'd like your advice for building a webapp (using jee of course ;-) ) that must support a plugin mechanism.
The plugin system should be able to hook into both the application business code (via well defined API of course) but also it should participate & integrate the rendered frontend (HTML5 using MVC JSR-371).

Do you think:

  • it is feasible using jee to implement a "runtime" plugin system where plugin addition/activation/deactivation/removal could be done on the fly?
  • due to CDI that is bootstrapped on deployment, only possibility is to repackage/rebuild/redeploy on each plugin change (addition/removal) ; CDI events & injection using Instance are then good candidates for hooks.
  • OSGI or small web framework (restx, ...) with better control on class loading is better suited

Thank you for your hints.



This comment has been minimized.

Copy link

pms1 commented Feb 12, 2016

Hi Adam,

I hope it's not to greedy if I ask two questions:

  1. We want to use a groovy based DSL in our JEE project for making small parts of the business logic configurable at runtime. But if I look at what groovy does to parse groovy files at runtime, a lot of that stuff is on the list of JEE restrictions. Given that this seems to work in practice, how unportable will the application become and is there real danger that this will break with future versions of JEE and application servers?
  2. Our JEE application run's in a network environment where multi- and broadcast are forbidden since there devices not handling these kind of communication. We have a clustered environment and want do use a cluster cache, but most of these use either broad- or multicast. Can you recommend any cache implementation that can be used in such an environment? Support for XA transactions are preferred, but not required. Application server is Websphere if that matters.

Many thanks in advance,


This comment has been minimized.

Copy link

thatsIch commented Feb 22, 2016

  1. In latest talk about removing bloat with Java EE in Brazil it was mentioned

    By not using DAOs and having Fat Entities, the code was more lean, concise, understandible, and the objects had more accountability. We were able to use inheritance and interceptors to give entities the CRUD usability they required

    Could you explain that? Would this just duplicate all of your entities? And how are interceptors used to give the entities the CRUD operability?

  2. What is the best approach to generate demo scenarios?

    Demos are there to showcase the product to clients. Would you just use something like Java EE 7 Batch processing for that? Most of the time our current operation involves creating a scenario by hand with several thousands of entities being created with context and temporal sensitive generation.


This comment has been minimized.

Copy link

viktorcitaku commented Feb 23, 2016

Hi Adam,

1.I wan to know in an EAR (WAR + JAR) can I use in that JAR the CDI features? currently I could not achieve this even if I add the beans.xml in META-INF
2.Now in 2016 developing portlets is considered "in" or should we go with JavaScript Frameworks + WebServices (JavaEE)?


This comment has been minimized.

Copy link

theanuradha commented Feb 25, 2016

HI Adam
I have gone through nice article about Wildfly Datasource .
Any idea on setting up with
oracle.ucp.jdbc.PoolDataSource ?

on tomcat we setup context.xml with















        sqlForValidateConnection="select 2 from DUAL"



This comment has been minimized.

Copy link

jliakos commented Feb 25, 2016

Hello Adam,

Let's say we have a custom annotation @Myannotation(10) and we want in a JavaEE project to be able to change the value "10" in runtime. Is there a lean way to do this?

For example we have the following
@Myannotation(10) public void doSomethingNice() { }, and the value 10 is stored in a database. A rest resource is responsible to take this value and apply it to the annotation.


This comment has been minimized.

Copy link

soteloleon commented Feb 28, 2016

Hello Adam,
A SOA goal is service composition for reusability. In real world SOA practice what is the best strategy to manage
common data that is sharing by many modules in a big enterprise application using service composition?

We have many modules (planning, accounting, etc) that use common data like Country, Region, Product, Division, etc. in a shared database and we developed a component (named Master Data Module) that expose (REST Webservices) that common master data in order to other modules use it to access common data.

SOA recommend service composition, I understand that if a service in the Accounting Module (ex. PaymentService) need common data,
this service has to do a request to the Master Data Module component to read this data, but that strategy has a increment in the response time if PaymentService need to request many common data.

What is the best strategy in a SOA implementation to apply service composition without bad response time or bad performance using service composition?


This comment has been minimized.

Copy link

areyouready commented Mar 1, 2016

Hello Adam,

what is your opinion about when to use streams vs the old collections? Are there already some best practices on when to use which option?

Thanks for your opinion in advance,


This comment has been minimized.

Copy link

litts commented Mar 3, 2016

Hi Adam,

The question about abstract classes and interfaces is never adequately answered in view of the BCE . If you have business components that have dependency how do you handle that ?. Can you please elaborate this in more detail .



This comment has been minimized.

Copy link

acll19 commented Mar 7, 2016

Hi Adam,
Can I inject an EJB into a JAX-RS Interceptor and Filter? If so, how can I achieve this?
Thanks in advance,


This comment has been minimized.

Copy link

gbourant commented Mar 7, 2016

Hey Adam,
I'm using payara , i try to make a SOAP Call(What a shame...) and i'm getting the following error

Severe: SAAJ0009: Message send failed
Severe: com.sun.xml.messaging.saaj.SOAPExceptionImpl: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed

I read few solutions but they didn't work.How to solve this ?


EDIT : I used this and it worked but i don't want to use this in production , which is the proper way to fix it?


This comment has been minimized.

Copy link

steinsag commented Mar 7, 2016

Hi Adam,

JEE7 has a lot of features supporting container-based security, but there isn't much if you want to manage security directly in your application. Even such simple things as HTTP BASIC Auth must be implemented from scratch. Why is that? Am I missing something?


This comment has been minimized.

Copy link

SeriousSem commented Mar 7, 2016

Hello Adam,
would be glad to here your anwsers and your opinion of following architectural questions:

  1. Component based UI (JSF, tapestry etc) vs thymeleaf, plain html, js libraries. How to decide which one front-end building strategy to use in the new project?
  2. How do you structure uploaded files in your projects? Dedicated File management systems, simple folder structure, storing blob in db?
  3. Cache frameworks like ignite provide you a posibility to use both ram and dedicated databases to store cached objects in distributed systems. What are pros and cons of holding cached objects in the heap or in key-value database?
  4. Have you ever used NoSQL databases in your projects? What would be an example of “oh, in that project we will defenetly use NoSQL database”.
  5. User real-time notifications. If you need to notify user about something in real-time, what would you stick with: redis + ajax (pull), rabbitmq(cowboy) + websockets (push), dedicated java server with atmsophere framework or something else?
  6. I know you don’t work with spring, but could you tell smth about spring vs java ee stacks? When you are starting a new project, how to decide go with plain java ee stack or with spring?

Thanks in advance!


This comment has been minimized.

Copy link

moussah commented Mar 7, 2016

Hi Adam;
I would like to know how to handle session expiration in jsf application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.