Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active August 29, 2015 14:16
Show Gist options
  • Save AdamBien/53e6d1124770ba3045e9 to your computer and use it in GitHub Desktop.
Save AdamBien/53e6d1124770ba3045e9 to your computer and use it in GitHub Desktop.
13thAirhacks&A.md
@matlach
Copy link

matlach commented Mar 10, 2015

Do you follow any java or software development related blogs? If so, would you share some with us.

@xavistp
Copy link

xavistp commented Mar 11, 2015

JPA 2.1 has properties to drop and create the database but not to update it. How do you usually handle database schema updates and rollbacks?

@surajchhetry
Copy link

Hi Adam,
For multi tenancy application I am using JAVA EE 7. I need to change schema dynamically based on customer.Since there will be a lot of customer so multiple EntityManager will be insufficient. So I am using Hibernate's EmptyInterceptor along with ThreadLocal and changing schema dynamically which is working fine.Since, my solution is tightly couple with Hibernate, could you suggest me some generic way so that it will be vendor independent .

Also Like to ask which application server( full java EE 7 support) will be best for production Glasfish(payara) or Wildfly or Liberty.

@riccardomerolla
Copy link

Hi Adam,
in a JAVA EE 7 web application with an highly and dynamic configuration settings for the persistence tier, what will be your way? NoSQL or an entity abstraction layer like Atlassian JIRA (Apache OfBiz)?

@haisi
Copy link

haisi commented Mar 14, 2015

  1. Your thoughts on java ee "extensions" like deltaspike and picketlink as you always advocate slim "war"-files. i.e. few external dependencies?
    I, for one, would miss for example "deltaspike data" or the powerful, though complicated, security features of picketlink (like build in JWT).
  2. I also noticed that you are a member of the JSR 375 (Java EE Security API) expert group. Do you have any infos/plans about that JSR?

@micgn
Copy link

micgn commented Mar 16, 2015

Hi Adam,
having read about the so called "onion architecture" as opposed to the traditional layered architecture I am wondering about how to realize that with Java EE. The onion promotes an application core, which is independent of libraries and infrastructure. With Java EE's POJOs I have a feeling that we are already close to that onion idea, right?
Regards, Michael

@pkucia
Copy link

pkucia commented Mar 20, 2015

Hi,

How would you implement "RPC like" API between microservices using your Java EE approach?
Do you think that JAX-RS can be used for that (especially with JAX-RS client API)? if not, what else could be used in Your opinion?
Regards, Piotrek

@antoniovl
Copy link

Adam,
It's been announced a new MVC framework with Java EE 8. What do you see in the future of JSF? Do you think JSF will become obsoleted by this MVC framework?
Thank you
Antonio Varela.

@antoniovl
Copy link

Question 2:
Do you use JSF for the presentation layer of your projects, or you use someting else?
Thank you again.
Antonio Varela.

@n4noman
Copy link

n4noman commented Mar 30, 2015

Why JNDI expose implementation bean name in global namespace? Why the caller must know name of bean for standardized JNDI java:global/appname/modulename/beanname!interfacename

@wesleyegberto
Copy link

Hi Adam!

About JSF, what's the best way to validate the data? I usually use Validator in the view, and in the business logic, sometimes, I have to validate again. How can I avoid the replication of validation logic without grow the coupling between the business classes and validation classes?
And about how to validate, how can I propagate/notify the invalid data to the user/client?
Should I use custom business validation exceptions? If yes, checked exceptions?
Sometime, my business logic declares a lot of business exception (some checked and others not), through this way my controller and my REST endpoit have to enclose the call with try/catch.
What's the best way to do that?

Can you show us?

Thank you!

@jieryn
Copy link

jieryn commented Mar 31, 2015

What are your recommended strategies for achieving zero downtime under continuous delivery principles? My team has a good pipeline in place for automated verification: from unit tests to functional tests to code coverage checks to corporate compliance checks to user acceptance tests. At the end of the pipe though, we still have to take a downtime while the application is redeployed. This can range from 1-5 minutes depending on the application, our current Java EE container is Apache TomEE. Thank you!

@jieryn
Copy link

jieryn commented Apr 1, 2015

Do you think there is value in having a JDBC driver wrapper which populates its configuration parameters (e.g. jdbc.url) from a distributed configuration management system like etcd (by CoreOS)? The idea being that a customer would stand up many instances of a JavaEE server, probably through Docker, and configure the database endpoint through etcd. Then the database could be dynamically migrated and update the etcd configuration. This might allow database migration without restarting all web layer microservices. Is this pathologically dangerous? Is there some alternative to this? Thank you!

@jieryn
Copy link

jieryn commented Apr 2, 2015

What is the best way to achieve a singleton JPA @entity? I find I often I want to create a singleton object which holds runtime configuration data, configurable within the application itself, and persistently stored within the JPA environment for that application. In order to maintain that only one ApplicationConfiguration will ever exist within the application, I have to jump through hoops for all CRUD operations within my DAO layer and play tricks with the @id (checking if @entity exists, then remapping the CxUD with the getId() of the originally persisted entity, yuck). Would you please recommend a strategy for a JPA @entity which follows @singleton semantics. Thank you!

@michaldo
Copy link

michaldo commented Apr 3, 2015

Are cross-view (cross-rectangle) Presenter something valuable? Did you ever miss that?

In JEE application I used to freedom in EJB assembly, for example:
I have 3 EJB A,B,C. I can freely assembly other EJBs:

@stateless class AddressBean {
@Inject A a;
@Inject B b;
}

@stateless class PaymentBean {
@Inject B b;
@Inject C c;
}

In JavaFx view is constructed in FXML with rectangles. For example one top rectangle is attendeeinput.fmxl and bottom rectangle is workshops.fxml. And bottom rectangle has inside other rectangle day.fxml. That is OK.

What is hard to accept to me is that Presenter is tied to rectangles. I would like to have freedom with Presenter assembly, i would like to inject by @FMXL gui components from many rectangles.
For example if checkbox from top rectangle is checked then textfield from bottom rectangle is disabled. It will be natural to me to have a dedicated Presenter, not tied to any rectangle, with injected by @FXML checkbox from top and textfield from bottom view.

Conclusion: I want Presenter freedom. I didn't found the freedom in JavaFX so checked afterburner.fx. but there isn't also.

My questions:

  1. Is Presenter freedom something valuable or it is a wrong thinking. Bad analogy with JEE.
  2. If valuable, is it possible to apply that concept to JavaFX, with or without afterburner.fx?

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