Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
45thAirhacksQ&A.md
@Nurudeen
Copy link

Nurudeen commented Dec 5, 2017

Hi Adam ,
I am trying to encrypt form data "user name and password field " before sending to browser .
The form is in a jsp page posting the parameter to a servlet . I want to encrypt the form fields before calling the servlet class because these details always appear as plain text before reaching the application server .
I have https on my URL but these details still shows as plain text in the body of the request when users tries to login .

@tobciu
Copy link

tobciu commented Dec 5, 2017

Hi Adam,
in JavaEE8 how can i convert LocalDateTime to a json string so i can parse/use it in javascript?
Is there a posibility now to define a converter such as the AttributeConverter from JPA 2.1?
Thank you :-)

@dawuzi
Copy link

dawuzi commented Dec 5, 2017

Hi Adam,

I have noticed that a connection timeout exception when using JAX-WS on wildfly (10.1.0.Final in my case) has an javax.ejb.EJBTransactionRolledbackException as one of the underlying causing exception in the stacktrace. It then marks the current transaction as Rolled back even when the exception is caught and handled. The issue is that further actions executed afterwards which requires a valid transaction (especially database actions using JPA like create and update) would throw an exception saying that the current transaction has been rolled back.

I currently use a work around by invoking further actions using a method marked with the attribute @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) so it they can be executed with a valid new transaction. However, I believe there has to be a way to make the connection timeout exception from the JAX-WS not roll back the current transaction especially when the exception was properly handled with a try and catch block.

@GADNT
Copy link

GADNT commented Dec 6, 2017

Hi Adam

In java 9 we have https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/CompletableFuture.html#orTimeout-long-java.util.concurrent.TimeUnit method that permit to us to wait an amount of time and get the result in a non-blocking way beside the https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html#get-long-java.util.concurrent.TimeUnit- method in java 8 that block for result(if I understood it correctly).

If we want the behavior that java 9 method have , what might be the alternative for java8 ?

another subject:
How do you choose the type of the database in your projects? Relational database vs document database

Finally 👍 for you effort during this year and the knowledge's(cool stories) you spread to us.

Thank you
Gabriel

@DKLEEE
Copy link

DKLEEE commented Dec 6, 2017

Hi Adam,

what is your prefered way for connecting a Desktop Application (Eclipse RCP as "thin"client) with a JavaEE Server for back end?
Is Remote EJB still a thing, should we go with REST to maybe switch sometime to Web, WSDL?
Any best practices?

Thanks

@karschdn
Copy link

karschdn commented Dec 6, 2017

Hi Adam,

assuming we have several JEE microservices running in different containers. Could be 4 services or 8, depends on whatever. Each microservice would provide standard information like "current internal status of service running in container" through a REST service.

Now, i want to build an overall status application (may be a single JEE app) which shows the status of all running microservices or provides an "action call" e.g. refresh something in a "known" microservice.

How would you technically implement the "register myself (microservice) to status app" feature in JEE which enables the status app to provide information or action calls of/to each microservice without knowing them by configuration? How do i ensure that only microservices are listed which are online?

regards
Karsten

@newk5
Copy link

newk5 commented Dec 6, 2017

Hello Adam,

I've recently found out about your youtube channel and your blogs, and those have been very helpful, thank you for all the work you've put into it. I have 2 questions I'd like to make

1- In a JSF JavaEE7 application running on payara, is there a way to know through some sort of event/callback/listener when the user's session expires? I'm using JAAS-Based authentication on the payara server using a JDBCRealm. When the user logs in, the session object is stored in a CDI Session-scoped bean.

2- What's your opinion on using vert.x instead of javaee for a microservices based application? Do you think it's a worthy alternative compared to javaee? I'm trying to decide which one to use and the whole ecosystem around JavaEE and its maturity attracts me more than vert.x, however vert.x seems to be more scalable. I've tested scalability using JMeter for a vert.x and a JAX-RS based webapp and saw that vert.x was able to reach double the throughput of javaee and use less resources (I've also tested with @suspended asyncResponse). JAX-RS and JavaEE7 microservices are still a bit new to me so I'm not sure if there's a better way to configure my JAX-RS app to be more scalable and unfortunately I could not find many vertx vs javaee comparisons online.

Thank you and greetings from Portugal!

@Nurudeen
Copy link

Nurudeen commented Dec 6, 2017

Hello Adam ,
I often have below error message when my applications runs , what could possibly be the cause of the error ?

[#|2017-12-06T13:37:26.769+0100|WARNING|oracle-glassfish3.1.2|javax.enterprise.resource.corba.ORBUtil|_ThreadID=602223;_ThreadName=Thread-2;|IOP00410025: Write of message exceeded TCP timeout : max wait time = 6,000 ms, total time spent blocked, waiting to write = 7,280 ms.
org.omg.CORBA.COMM_FAILURE: WARNING: IOP00410025: Write of message exceeded TCP timeout : max wait time = 6,000 ms, total time spent blocked, waiting to write = 7,280 ms. vmcid: OMG minor code: 25 completed: No

Kindly advice for a possible solution .

@deratzmann
Copy link

deratzmann commented Dec 6, 2017

Hi Adam.
What would you prefer for a Server push implementation: websocket or SSE? Are These Protocols suitable for long living client to server Connections?

Thank you and Best regards from Hamburg.

Bastian

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