Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created April 12, 2016 07:48
Show Gist options
  • Save AdamBien/3c1efcbf296ce35fdeedfe5790bba893 to your computer and use it in GitHub Desktop.
Save AdamBien/3c1efcbf296ce35fdeedfe5790bba893 to your computer and use it in GitHub Desktop.
26thAirhacksQ&A.md
@VeitWeber
Copy link

Hi Adam,
How would you structure application wide used classes in ECB? In your examples you are going to structure your applications like:
com.comp.app.business.posts.entitiy.Post
How would a class 'BaseEntity' ,which is the base class of all entities, fit in ECB?
Thanks!

@kro-git-hub
Copy link

Hi Adam,

i'm using your wildfly-ping example to deploy the ping.war into wildfly in a docker container. Everythings works fine, but how can i redeploy the changed ping.war into wildfly without restarting the container. Stopping the container takes a long time, so no fast redeployment is possible in this way.

Thanks.

@anmiralles
Copy link

Hi Adam,

how to handle distributed systems concerns with microservices such as:

  • Service discovery, have you use any platform like snoopEE? Which is the best in your opinion?
  • Distributed transaction services, maybe with rest endpoints modeled as staless EJBs?
  • Logging and debugging for the whole project.

Thanks in advanced ;)

@paolizq
Copy link

paolizq commented May 9, 2016

Hi Adam,

I'm trying to configure security with a jdbc realm on an application bundled up as a fat jar with payara micro, but I just can't seem to get it to work. I've tried to run the jar with the --domainConfig option and a domain.xml with the configuration for the jdbc realm and when I try to log in to the application I get the error that "No LoginModules configured for fileRealm". However if I set the alternate domain.xml within the application using PayaraMicro.setAlternateDomainXML() I get "No LoginModules configured for jdbcRealm". (At least the correct realm).

I already deployed my application using the full payara server and it works. So I don't know what I could be doing wrong or what steps I might be missing to get this to work on payara micro. Do you have any ideas?

@AlbozDroid
Copy link

AlbozDroid commented May 9, 2016

Hi Adam,

How would you tackle from the performance perspective the traversing of JPA relationships.
Here is an example:

Class RiskAssessment{
        ...
        List<Step> steps; // one-to-many
}

Class Step{
        ...
        List<HazardType > hazardTypes; // one-to-many
}

Class HazardType{
        ...
        List<Hazard> hazards; // one-to-many
}

Class Hazard{
        ...
        List<Control> controls; // one-to-many
}

Given a RiskAssessment id, I'd like to load all the Hazard and Control objects associated with it.

List<Hazard> loadAllHazardsAndControls(Integer riskAssessmentId){
......
}

I'd like to access the DB as few times as possible.I know that using nested to loops is not efficient as I would fall into the N+1 query issue.

How would you tackle this problem? Using JPQL queries and chaching query_results? If a second call to the method loadAllHazardsAndControls() occurs with the same Id parameter I would like my query(or my way to load the relationships) to remain completely In Memory.

Thanks in advance!

@abdelmuniem
Copy link

abdelmuniem commented May 9, 2016

Hi Adam Bien,

I want to Develop Java EE Website, with multi-language(Arabic and English) with JSF.

Arabic is read right to left, layout, fonts are different.
Do i have to maintain two different websites, one for Arabic and the second for English ?
http://www.mydomain.com/ar
http://www.mydomain.com/en

Thanks in advance

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