deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juliano Marques <juliano...@gmail.com>
Subject Deltaspike Data Module
Date Thu, 14 Aug 2014 07:24:53 GMT
Hi,

I want to use Deltaspike Data Module repositories, but I want to control
transactions with EJBs, not within the repository, something like this:

@Dependent
@Repository
public interface UnidadeRepository2 extends EntityRepository<Unidade, Long>
{
}

@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class UnidadeEJB {

    @Inject
    private UnidadeRepository2 repository;

    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public Unidade save(Unidade unidade) {
        return repository.saveAndFlush(unidade);
    }
}

Is this possible?


Regards,

*Juliano M.*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message