I'm glad that it worked :)

Abraços

Em 8/14/14, 9:04, Juliano Marques escreveu:
With Wildfly 8, the alternative in beans.xml do not work, but the global
alternative in apache-deltaspike.properties works.
I had a problem with Deltaspike repositories and JTA datasources, and this
resolves the problem.
Thanks.

Atenciosamente,

*Juliano M.*



On Thu, Aug 14, 2014 at 8:15 AM, Rafael Benevides <[email protected]>
wrote:

Yes. It's possible.

Depending on your implementation, You may need to register the
`org.apache.deltaspike.jpa.impl.transaction.ContainerManagedTransactionStrategy`
as an alternative on your beans.xml

or registered as globalAlternatives.org.apache.deltaspike.jpa.spi.
transaction.TransactionStrategy=org.apache.deltaspike.jpa.impl.
transaction.ContainerManagedTransactionStrategy on your
apache-deltaspike.properties if it doesn't work out of the box.

Em 8/14/14, 4:24, Juliano Marques escreveu:

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.*



Reply via email to