24 Kasım 2022 Perşembe

Jakarta EE Concurrency @Lock

Örnek
Şöyle yaparız
//Provides locking semantics for CDI Beans – especially useful for ApplicationScoped
//Semantics would be similar to EJB Locks
@ApplicationScoped
public class CDIBean {

  @Lock(LockType.READ) 
  public void doReadMany(){}

  @Lock(LockType.WRITE) 
  public void doOneWriter() {}

}

Hiç yorum yok:

Yorum Gönder

Bean Validation @GroupSequence Anotasyonu

Örnek Elimizde şöyle bir kod olsun public class SampleRequest {   @NotNull   LocalDate startDate;   @NotNull   LocalDate endDate;   @AssertT...