Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
22ndAirhacksQ&A.md
@csabee

This comment has been minimized.

Copy link

csabee commented Dec 16, 2015

Dear Adam,

I am reasking my question, with added comments, to clarify my topic of curiosity.

The summary of my problem is:

  1. What are the maven best practices, when handling a multi module (7+) project, that contains an EAR, and additional library / api / batch projects?
    -- Addition 1. The maven project contains some ejb modules (they are used for background processes, like singleton ejbs running scheduled jobs), that need to be independently deployed of other applications, and an EAR module with an EJB + WAR module
    -- Addition 2. The separate EJB modules are business requirements. So we can deploy them as background jobs, as per the clients request it, and pays for it.

Details
We are making a product as an agile team (started with JEE6, later moved to JEE7 with glassfish). As most of the agile products, ours also started as a small one, and from time to time developed to something much more.
(So for starting point, we had an EAR, with one EJB + WAR project.)
-- Addition: the EAR is still EJB+WAR, the other modules are outside of it, so only parts of the parent project

Over time, our application was expanded by different, additional modules, like

  • background jobs, packaged as EJBs, working with singleton EJBs
  • additional interfaces

Currently we are facing the following problems, and I am searching for better options, on how to handle them:

  • some interfaces for EJBs are multiplicated over projects
    (Most of them we could move to an API project, as a dependency for all the other modules.)

-- Addition 1. We use interfaces for JAX-WS and unit testability
-- Addition 2. As I mentioned, we have EJB modules, independent from the EAR, that are using some of the EJBs, like to get metadata from the database

  • we have a very detailed JPA layer, that is also duplicated over the modules
    (I still haven't found how could we move this to a standalone module, and share between the other modules?)

-- Addition: The independent EJB modules use the same JPA classes to access, modify, work with meta data from the database, so it would be a good point to share the JPA layer between the different JPA modules

  • some EJBs of the service layered are accessed from different modules
    (Is it a good practice to use these EJB-s as @Local and @Remote beans at once, and use only their interfaces on the projects?)

-- Addition: all our EJBs are exposed as JAX-WS services, should we go with them, instead of the @Remote beans?

@masumcse1

This comment has been minimized.

Copy link

masumcse1 commented Dec 25, 2015

How to define capacity planning for java ee application ?

I have completed development a Enterprise application Using JAVAEE7 on wildfy 10 with 3 tier architecture . i am using
JSF,primefaces CDI EJB JPA Bean validation , SOAP-ws.
Currently we starting system testing (functionality ) test with 10 tester .
After finishing system test ,i have to deployment this application into product environment.

it is financial application , Branch less banking application : agent module, customer module, Account -loan/deposit, cash in/out related
critical transaction operation .

I have 500 different branch user . i can not define capacity planning for this application .
I have to run this application on Wildfly 10 community edition, i can not use enterprise version jboss eap for some limitation.

Please give me idea , How to define a capacity planning following attribute?

  1. Which linux os version 32/64 bit

  2. which JVM version , 32/64 bit

  3. Hardware size : which server, ram size, cpu core

  4. Network attribute : bandwidth

    ------------------------------JVM parameter related attribute-----------

    1. how to measure appropriate : heap size, Meta space, gc collection strategy.
    2. how to monitor different level critical things , that occur maximum enterprise application

I have no clear idea how to define this attribute for above requirements.

@Chilis92

This comment has been minimized.

Copy link

Chilis92 commented Jan 10, 2016

Hi Adam,

My question is related to JMS and WebSockets.
I know that using these two technologies I can send and receive messages but i don't know exactly what is the difference.
If I need to build an application that needs to comunicante its transactions in real time which should I use.

@nebrass

This comment has been minimized.

Copy link

nebrass commented Jan 10, 2016

Hello Adam !
First of all, thank you and congratulations for the 2 latest Vimeo courses !
My questions for this month are:

  • How do you make a migration from PL/SQL to Java EE (JPA/EJB) ?
  • If we want to compare Spring vs JavaEE, who will be the winner especially in the performance part?
  • For Java EE 8: we will have a support for NoSQL DBs in JPA 2.2?
  • Do you recommand using search engines like Elasticsearch ? If yes, which engine you recommand?

Thank you so much for this monthly opportunity. We hope to see you in some events in France (Devoxx France, NetBeans Day Paris..)
Thank you again and happy new year!

@gbourant

This comment has been minimized.

Copy link

gbourant commented Jan 10, 2016

Hey Adam !
Is JavaEE capable or the right choice for a Voip Service ?
Thank you Adam and have a great year !

@mmonge

This comment has been minimized.

Copy link

mmonge commented Jan 11, 2016

Hi Adam!

my question is about AngularJS + Java EE 7 REST API + 3rd Party REST APIs.

In Munich Airhacks you mentioned Keycloak for securing AngularJS + Java EE 7 REST API applications, I already read about it and works great. AngularJS sends the Auth Token for the REST API, if the REST API is configured with the same Keycloak Realm all works like a charm.

But what happens when I create an AngularJS App that authenticates with his own Keycloak Realm and the app consumes a couple of 3rd Party REST APIs using Keycloak too, but a diferent Keycloak Server (see Image1).

Image1

So in the AngularJS app I have users john and roger on the angularRealm, the app tries to consume the resources in REST API1 and REST API2 but needs a diferent authentication. How can I make this work? I'm already thinking about this not been a good practice because I probably will need to burn the 3rd Party credencials somewhere in the JavaScript code.

I'm evaluating the need of an intermediate REST API for the AngularJS app, so this new REST API will be the one who connects to the 3rd Party REST APIs (see Image2).

Image2

But in this second scenario, how will the APP REST API create a REST Client for the 3rd Party REST APIs? How the REST Client perform authentication without the redirection to the Keycloak Login URL? (I'm already reading the Keycloak documentation.)

My question is your opinion about these two scenarios, what do you think is the best way of doing this communication with the 3rd Party REST APIs? And if you know how to perform the authentication to the 3rd Party REST API's from the Java EE, probably from an EJB as REST Client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.