Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created August 15, 2017 07:04
Show Gist options
  • Save AdamBien/cc4d538e22bbf1f1ac70e55b8517a340 to your computer and use it in GitHub Desktop.
Save AdamBien/cc4d538e22bbf1f1ac70e55b8517a340 to your computer and use it in GitHub Desktop.
42ndAirhacksQ&A.md
@nickscha
Copy link

Hi Adam,

  1. Is it planned to support ForkJoin in EE 8 ? I haven't found any JSR's. Beside of Managed Executor it would be a great enhancement.

  2. Your thoughts on JPro https://www.jpro.io

Thanks, even the answer is already known ;)

@alacambra
Copy link

Hi Adam,
do you know some way to get code coverage from a system test?

Vielen Dank!

@wesleyegberto
Copy link

Hi Adam!

what do you think about moving Java EE to an open-source foundation.

http://sdtimes.com/oracle-opens-java-ee/
https://blogs.oracle.com/theaquarium/opening-up-java-ee

Thank you

@iamdvr
Copy link

iamdvr commented Aug 27, 2017

Hi Adam!
Just curious to know how Java EE auto discovering jax rs resources without overriding getClasses method in Jax Rs Application class.
Is Application implementation class manipulation done by JEE server in such a way to inject them ? If yes wildfly Undertow should have also done similar thing.
Want to get similar thing work using Undertow standalone implementation by aligning similar logic.

Please explain.

UPDATE: Understood that there is rest auto scan behavior(Fails if more than on Application exist) which looks up classpath for resources. Need to know how to do the same with resteasy+undertow+jaxrs standalone

@mauricioac
Copy link

Hi Adam!

I sent you an email, but just to summarize again... I was once a PHP dev for almost 5 years, now I'm a frontend developer who is considering a career change to server side java. Watched a couple of your videos due to an assignment, and got super interested in Java web development. It's much different than the java I saw at university

Here are a couple questions I'd like to ask you:

  • Do you think it's feasible for someone to change careers from frontend to server side java? I'm worried my current job can damage how companies see my profile
  • How is the job market? I'm thinking of switching to java mainly for the longer term, where I see JS and Ruby on Rails to be more unstable (in terms of future). Java seems like it's going to survive for a long time
  • What are the steps I could take to train and get experience in Java EE?
  • How frequent are updates in the Java APIs and innovation frequency?
    • Are changes to APIs carefully planned beforehand?
    • When innovations come out, how do people and companies approach adopting them?
    • I ask this before in the JS world, people seem to push major versions of frameworks each 3 months, which is kinda crazy to keep up

Thanks a lot in advance!

@deratzmann
Copy link

deratzmann commented Aug 29, 2017

Hi Adam.

Due to my question last week (error when using entitymanager in interceptors) I made an simple project. The error in latest payara Server is:
CDI definition failure:WELD-000080: Enterprise beans cannot be interceptors: class com.airhacks.InterceptBean
org.jboss.weld.exceptions.DefinitionException: WELD-000080: Enterprise beans cannot be interceptors: class com.airhacks.InterceptBean

What I did: I intercepted an EJB with another EJB:
InterceptedEjb.java:

`import javax.ejb.Stateless;
import javax.interceptor.Interceptors;

@stateless
@interceptors({InterceptBean.class})
public class InterceptedEjb {

public void doFoo() {
    System.out.println("doFoo");
}

}`

InterceptBean.java:

`import javax.ejb.Stateless;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;

@interceptor
@stateless
public class InterceptBean {

@AroundInvoke
public Object doSthBefore(InvocationContext ic) {

    System.out.println("intercepted");

    try {
        return ic.proceed();
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}

}`
So it seems, that an Interceptor cannot be an EJB...
Thank you for your help.

@wesleyegberto
Copy link

Hi Again!

Another two questions:

  1. CDI events and EJB: Is there any way to make the event async? Using @asynchronous at @observer method will work or I'll have to call a @asynchronous method from the @observer method?

  2. JAX-RS: Is there any way to make a POST or PUT request with an empty body?

Thank yout =)

@danilopiazza
Copy link

Hi Adam,

are @​Stateful EJBs (and the Gateway pattern) useful only for some tricky corner cases, like in https://www.ibm.com/developerworks/websphere/techjournal/0612_ejba/0612_ejba.html?

Can you give us a compelling use case, a pragmatic reason of when to use them?

Thank you!

@FreifeldRoyi
Copy link

Hey Adam,
I see in your projects that you are not always using bulkhead with REST.
When should I use it? Why not always use it?

@vanuatoo
Copy link

vanuatoo commented Sep 2, 2017

  1. Will CDI replace EJB in the future?
  2. Which free Java EE 7 server (Full Profile) would you recommend for production?
  3. Could you please record a workshop how to create a cluster of Glassfish/Payara with cache coordination enabled?

@rmpestano
Copy link

rmpestano commented Sep 3, 2017

Hi Adam,

I have 3 questions:

1 - Can you explain why do you think JSF doesn't fit for "pixel perfect" applications? I remember you mentioning that UI components are hard to customize and I agree but in such cases don't you think pass-though elements/attributes or even a js library can surface?

2 - Don't you think that adding a frontend framework such as react or angular makes the release cycle (a.k.a delivery pipeline) much more complex compared to JSF? ex: managing dependencies on both backend and frontend, building/compiling assets on both sides, depending on tools like nodejs, grunt, bower etc...

3 - How do you deal with the build of such (frontend) applications, a single war or separated artifacts for backend and frontend?

Thank you very much!

@eyalyatir
Copy link

Hi Adam,
Regarding my question from last month about JAX-RS 2.0 client in a multi-threaded Java SE 7.0 project.
You suggested that I'll use EJBs but It's not part of the Java SE, so I can't use it. Is there any other way to do it?

Thanks,
Eyal

@huxendupsel
Copy link

Hi Adam,

i currently work in a project where i am developing/maintaining a monolitic application. It is planed to break out some functionalities into microservices, slowly step by step. By all means we decided to develop future services as own microservice projects, to faciliate the development and maintainance.

  • Let's say we have two jee applications deployed on the same jee application server what would be your recommended way to set up a communictation between them (REST, RMI, SOAP, ...)?
  • Regarding REST and B2B communictation:
    • what is the best opportunity to restrict calls from outside the "application context" (we'd like to ensure the chain: client app authenticates to the monolith, monolith calls service).
      On stackoverflow I found a entry that summarizes issue a bit more https://stackoverflow.com/a/20168610 regarding the M2M part

Thank your for your help

@dempile
Copy link

dempile commented Sep 4, 2017

Hi Adam,
1- Do you think an ERP should be developped, or customized from excisting ones like Odoo for example.
2- In case of choosing development what architecture we should choose , monolithic or microservices.
Thanks

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