Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active September 14, 2015 13:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AdamBien/fc5ef11d8863935187fd to your computer and use it in GitHub Desktop.
18thAirhacksQ&A.md
@viktorcitaku
Copy link

Hi Adam,

  1. What do you think about http://dukescript.com/ ?
  2. Can I mix somehow MVC and ECB ?
  3. When using ECB pattern, where should i put the Data Model and View Model ?
  4. What is a Component at your perspective? example below =>
    componentOne ==> Entity/Control/Boundary
    componentTwo ==> Entity/Control/Boundary
    etc...

Thank you :-)

@rajeshduggal
Copy link

Hi Adam, Raj from Toronto, Canada here!
I'm ready for a fresh computer setup at home. I generally like to dev in my home office, and then in the evening I like to dev at the dining table. So I'm not sure if I should go with a complete high-end desktop setup for the home office and also a basic laptop to connect by "remote desktop" to the desktop in the evenings. Or perhaps I should just buy a high-powered gaming / desktop-replacement laptop. (e.g. The MSI Ghost Pro laptop looks fun) with an additional monitor/keyboard/mouse for my home office. Or perhaps a LTSP (Linux Terminal Server Project) setup is right for me. I don't know.

You've mentioned that you build a high powered computer system every few years. I'm really interested to learn more details how you use it in your dev setup and about which computer systems or parts you will likely be buying next, and if you have some specific websites you look to buy these systems/parts.
Thanks!
Raj.

@marcincembrzynski
Copy link

Hi Adam,
How can I use CDI in @FacesConverter?
Thanks
Marcin

@lars1974
Copy link

Hi Adam,

We are currently evaluating an ESB (Mule) . We would like to use it as a message broker between our services. We are also talking about using it to develop services that contains a lot of mapping, orchestration or flows. Maybe even plain business services instead of using our primary platform java EE. There is a lot of arguments flying around like: "Faster to develop-", "Easier to understand for developers-", "Easier to maintain-" and "more lightweight-" than core Java EE. Do You have any pros and contras about ESB's for these purposes?

We also think about using the Mule API Gateway, for analytics, logging, dynamic url-mapping etc. Any thoughts about that?

Thanks,
Lars

@jayadipjadhav
Copy link

Hi Adam,

Does JavaFX follows Passive View MVP design pattern as identified by Martin Fowler?

Thanks,
Jayadip

@deetewari
Copy link

Hi Adam,
We use TomEE with APR (using compiled libtcnative) on a lot of production boxes and often there are problems when TomEE just doesn't seem to accept connections. JPS and TOP show the main java process as active and doing curl to the appserver locally seems to get upto the connected state and then no response is sent back. A restart of the app server usually solves the problem. The problem seems to happen after every few hours of continuous usage.

I have tried using JMC to see if we can get some insights into whether our JavaEE7 web app gets stuck and figure out where and why. JMC seems pretty complex so I was wondering if you could throw some light on how to debug remote running app servers and webapps and what would be your tools of choice for such exercises and ideally what keys points to look for.

Another area on which I would love your comments is what is the best way to do ProcessBuilder delegations from within a webapp. I know this is typically not recommended but we need to do this from within the webapp as the webapp needs to call a few OS specific programs to do some low level stuff.

Our web app uses many SLSBs along with a few Singleton beans.
Thanks & looking forward to your answers and comments.

@haisi
Copy link

haisi commented Sep 3, 2015

@szlachet

You properly mean something like:

public class LoggerConfigurator {
    @Produces
    public Logger produceLogger(InjectionPoint ip){
        Class<?> requestingClass = ip.getMember().getDeclaringClass();
        return Logger.getLogger(requestingClass.getName());
    }
}

The @Produces tells CDI that this method will return a bean of instance Logger that should be in you DI-Context (meaning making it injtectable in other parts of your code).

InjectionPoint ip makes the caller availabe in the method i.e. you know in your producer-method information about the injector. This is handy, because now you can create a logger by simply injecting it. The producer will automaticly create the correct Logger with the right class name.

class MyClass {
    @Inject
    Logger log;

    //Same as
    Logger log = Logger.getLogger(MyClass.class.getName());
}

@masumcse1
Copy link

I have confusion that why use EJB over cdi .
From clustering , production specific is there any advantage of Using EJB ?
please give me some points : why Use EJB over cdi ?

i have good theoretical knowledge (EJB and CDI) but i can not make decision , which use case cdi /ejb perfect.
From my study .. i have found that
EJB model is perfect for = When need clustering , highly concurrent / transaction , security , timer , asynchronous process,
service integration , mission critical complex financial application , different application server pool.

CDI is perfect for = maximum case cdi is same as EJB . recent slogan is CDI is perfect for any
requirement of application . it fulfill all mission critical complex requirements.
recently, several consultant / forum /j2ee expert says that for all type of requirement CDI is enough , No need EJB .
For for this reason, i can not select which one is perfect CDI/EJB . Because from internet , i have
found ambiguous information about ejb/cdi. i develop a demo with two technology
(CDI 1.0/ EJB3.2) for wildfy , i have found same result . i think , technically cdi / ejb has some
difference(scope) but usage point of view , it has no difference .
Please give brief idea , from real life scenario.-----maintain or production environment(for large
financial environment - always works at a time 5000 user ).

1 .which case cdi is perfect ?
2. which case ejb is perfect ?

@gbourant
Copy link

gbourant commented Sep 6, 2015

Hey Adam ,
How to expose with JAXRS more than one Restful APIs which the one will be used internally and the other one publicly ?
Thanks in advance!

@andrejb-dev
Copy link

Hi Adam, I am using afterburner in multipage application and I am curious what is the best approach to switch pages. Not sure if it was already asked - I discovered these gists just recently.

My idea was to have one root page with menu (this way menu is reused for all pages) and with content pane. The content pane instance will be passed at app start to some PageController.setContentRef(Parent root);
For example in this way I have dashboard as first content pane children with some icons/buttons. After clicking on icon, the PageController.showDetailA(); method is called from dashboardPresenter. The method clears children from content pane and add one specific children.
This children can have one Back button (that calls PageController.showDashboard(); and some controls to go even deeper in views chain (PageController.showDeeperDetailOfDetailA();) etc.

The PageController can have instancies of all pages, or recreate them every time (for now not sure what will be better).

Do you think there is better way to do this? For example using multiple Stage instances somehow? If so, could you please create some simple demo.

@haisi
Copy link

haisi commented Sep 10, 2015

Whats the best way to handle errors/exceptions in JavaFX?
Lets say I call my service from the presenter and an error occurs. What is the best way to show an exception dialog to the user? Should I just wrap all my service calls in try catch blocks? What if I not not only want to show a dialog but also make further UI changes (e.g. mark textfields red etc.)?

Would you recommend using the Thread.setDefaultUncaughtExceptionHandler like in this stackoverflow answer?

@loocifer
Copy link

Hello Adam,

what do you think about the "reactive programming" thing ? There are a lot of people who think that JavaEE does not fit to RP. How do you see the future of JavaEE ?

Thanks,
Markus

@dsurendran
Copy link

  1. What is the best way to integrate microservices?
  2. Whats your thought on using Service Bus for integration?

Copy link

ghost commented Sep 14, 2015

Hi Adam,

in several talks you mention to host your blog on your own hardware.

  1. Could you please provide some more information about the concrete setup?
  2. How is this hardware connected to the internet? Which tarrif, which provider, which bandwidth? Can you recommend anything?

Thanks,
Peter

@atrifyllis
Copy link

Hi Adam!
When using an application server is there a way to "route" logs from the server components to my own log files? For example using wildfly when I want to log hibernate query parameters or cxf messages I need to configure a logger inside the application servero logging configuration and check the server's logs. How can I make the server log in my logs (preferably in a per-application manner). Thank you in advance!

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