Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/fca3f717586f2ac4291c to your computer and use it in GitHub Desktop.
Save AdamBien/fca3f717586f2ac4291c to your computer and use it in GitHub Desktop.
12thAirhacks&A

Ask questions and see you at 2nd March at 6.PM. CET: http://www.ustream.tv/channel/adambien

See also the airhacks archives airhacks.tv and subscribe to the airhacksnews.com

  1. HTTP Session Replication and Clustering discussion Piotrek
  2. I have a question for you :) You may even queue it up for an upcoming stream, but I'm really curious! You stated that SOAP (support?) could even be removed from the API.I just got into the SOAP world a few months ago, came from a REST background, and I am really confident that it still has it's place. The type safety, and the tools that Java gives us are really great. Why do people hate it so much nowadays? Plus in the finance sector they are relying on it really heavily still, so it's a good thing to be familiar with either way IMHO. noherczeg
  3. Can two ejb modules communicate with each other through local interfaces in the same appserver or JVM? (...) Viktor Citaku
  4. What's the most effective/elegant way of implementing single-table multi-tenancy (with discriminator column) in JPA2/2.1 without using provider specific (like that of EclipseLink 2.5) [Mátyás B.]
  5. Example scenario: a J2EE app utilizing single-table multi-tenancy that would allow users to sign-in using either Facebook, Google, Paypal, etc. as well as using native accounts (username/pw in the application's DB itself) while using the HTML UI of the App. Its REST Resources would need a 'token' to authenticate. Appserver: GF 4.1
  6. Do we need to propagate the security context (Subject/Principals) to EJBs if using a form-based authentication? Isn't it better (and almost easier) to use custom annotations and interceptors to implement a "permission" based security (as opposed to the container's role based security)? Octopus (https://bitbucket.org/contribute-bitbucket/javaeesecurityfirst) comes to my mind.
  7. Would a JASPIC ServerAuthenticationModule (SAM) fit this scenario? How to tell SAM which authentication method to start based on the user's choice? Similarly, how to tell JASPIC that the REST resources need a completely different 'SAM'? ratcashdev
  8. Single timer event of a EJB timers in a distributed application [Tibor D.]
  9. What do you think about gradle? What about use gradle instead of maven? Can you talk a little bit about this subject? @Brunos_Santos
  10. With Java 8 and streams I do not really get how the exception handling should work when composing several functions? (Michael G.)
  11. Gradle vs Maven for Java EE projects
  12. "I've added beans.xml, but I read somewhere we don't need it in JavaEE 7? The error is gone even if the file is empty!!" PoslovniAdresar
  13. "Can we set scheduler time from some property file so that we don't need to
    recompile for changing time? Also, while executing scheduler, can I set next execution time at runtime?" Valsaraj
  14. I'm curious about your feelings on the wisdom of microservices vs a more monolithic approach to application development. In one of your past presentations, I believe I remember you saying that being monolithic is your friend, vs nowadays there's a lot of discussion around microservices. Can the ideas of "monolithic is your friend" and microservices still peacefully co-exist in your mind? John Hogan
  15. Can we get @scheduler configurations details from properties file? like sec,min... Ravi
@jhoryna
Copy link

jhoryna commented Feb 22, 2015

Database view as Entity in JPA 2.0 / EclipseLink 2.5.x environment
Hi Adam,
We read data from a database view. This view has no database-side notion of primary key, but the columns (MyView.a, MyView.b, MyView.c) uniquelly identify a record. The columns MyView.a and MyView.b can contain NULL values.

My Java entity class looks like this:

@entity
@PrimaryKey(validation=IdValidation.NONE, columns={@column(name="a"), @column(name="b", @column(name="c")})
public class MyView implements Serializable ......

If I run the query (as JUnit test) then I will receive the following error message:

Exception [EclipseLink-6044] (Eclipse Persistence Services - 2.5.1. .....
org.eclipse.persistence.exceptions.QueryException Exception Description: The primary key read from the row [row omitted here] during the execution of the query was detected to be null. Primary keys must not contain null.

Questions:

  • What do I make wrong?
  • Is it a problem that I define EclipseLink as JPA provider in persistence.xml file BUT using EclipseLink extensions, e.g. @PrimaryKey. Is this ignored?
  • How persistence.xml should look like in generall?

Thanks for the answers.
Jan

@haisi
Copy link

haisi commented Feb 25, 2015

How would you structure your web application to keep one code base for several customers each with their own customizations?

@bommelmuetz
Copy link

We are currently in search for the best way to collect and visualize metrics. Searching the web dropwizard (http://dropwizard.github.io/metrics) seems to be a valid solution. Do you have any recommendations which tool to use? Are there any Java standards which are related to this topic?

Copy link

ghost commented Mar 1, 2015

What exactly is the difference between javax.ejb.Singleton, javax.inject.Singleton and @ApplicationScoped beans?

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