Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created July 4, 2019 14:46
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/87815259f16ea1080df7b34a394958f1 to your computer and use it in GitHub Desktop.
Save AdamBien/87815259f16ea1080df7b34a394958f1 to your computer and use it in GitHub Desktop.
65thAirhacksQ&A.md

Ask questions and see you at August, 5th, 6.PM. CET: http://www.ustream.tv/channel/adambien

Also checkout recent episode:

64th airhacks.tv

Please keep the questions Java EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.

@dempile
Copy link

dempile commented Jul 27, 2019

Hi Adam,
1- Have you did a cluster of payara application server in the openshift plateforme with hazelcast cache enabled, I know its a bit long to demonstrate but could you make a separate video demonstrating how data is shared in the cache between the different nodes of the cluster
2- Hazelcast is integrated with payara both full and micro, but can we still use hazelcast with openliberty, tomee or wildfly or there is another alternative to manage JPA L2 cache in a cluster ?
3- In a microservice architecture, in certain cases we have an entity that exists in both microservices for example in a Client management microservice and Billing microservice , in this case the Client Entity must be in both domains.
How could we manage such situation ?.

thanks

@Berger1994
Copy link

Hi Adam,
In our project, we are using EJB's for service actions (access to the database, access to other systems and so on) and we are using CDI beans for our GUI actions (ViewScoped, SessionScoped and so on).

If someone wants to customize CDI Beans they are using the annotation @specializes, which works pretty fine. But I did not find a solution for EJB's.

My Questions:

  • Is there any solution to customize EJB beans (like specializes for CDI)
  • Is it a good practice to use CDI (ApplicationScoped instead of Stateless) - We would replace all EJB's with CDI beans.

thanks

@Tunjidir
Copy link

Tunjidir commented Aug 3, 2019

Hi adam, can i trust payara + java mail api for sending emails in a production like environment ?
if for any reason, i need a DTO what package would i stuff it using the bce structure?

@Tunjidir
Copy link

Tunjidir commented Aug 4, 2019

Hi adam. please how to exclude resource classes from being authenticated by the JavaEE 8 HttpAuthenticationMechanism. once implemented it secures every resource per default. i tried to define some security constraints in my web.xml but it doesn't seem to work. here's a copy of what my web.xml looks like. i get this WARNING: JASPIC: http msg authentication fail
java.lang.NullPointerException: Password value may not be null from payara 5.191 and a 401 unauthorized response.
Ideally i'd want every resource uri secured but the ones for registerations open since my identity store validates from Database

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Protected Area</web-resource-name>
            <url-pattern>/smart/resources/business/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
          <role-name>ADMIN</role-name>
        </auth-constraint>
    </security-constraint>
   <security-constraint>
    <web-resource-collection>
      <web-resource-name>un restricted access</web-resource-name>
      <url-pattern>/smartdealsng/resources/registrations/*</url-pattern>
    </web-resource-collection>
  </security-constraint>

    <security-role>
      <role-name>ADMIN</role-name>
    </security-role>
    
    <security-role>
      <role-name>USER</role-name>
    </security-role>

@altuga
Copy link

altuga commented Aug 5, 2019

Hello Adam

We are trying to migrate one small Spring project to Jakarta EE and we couldn't figure out exactly a shortcut about how to replace org.springframework.data.repository.CrudRepository utility.

I mean

import org.springframework.data.repository.CrudRepository;
public interface PostRepository extends CrudRepository<Post, Long> {

    Iterable<Post> findByUserId(Long userId);
}

Thanks.

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