Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.

@AlexeyMalkovskiy

This comment has been minimized.

Copy link

AlexeyMalkovskiy commented Jul 21, 2019

Hi Adam,
I have a reuirement to use both LDAP and Database authentication in the same application. For both of them there are built in IdentityStores. In my custom HttpAuthenticationMechanism I got a list of identity stores useing CDI but I didn't find a way how to define what each IdentutySotere relates to (LDAP or DB). I had to use Prioryty property from IdentityStore configurations like Id in order to do that, but I'm not sure this a correct approach.

@dempile

This comment has been minimized.

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

This comment has been minimized.

Copy link

Berger1994 commented Aug 2, 2019

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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
You can’t perform that action at this time.