@Typed(AttachmentRepository.class)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class AttachmentRepository implements Repository<Attachment> {
This is a little bit overkill, no? CDI cares about the typed annotation, EJB doesn't. Because it's an EJB it's injectable as the type as well as the business interface (granted, you're still exposing the issue that the EJB business interface can't handle generics).
We also don't need the transaction attribute annotation.
In the datagrid/nosql chapter, you have an EJB:
This is a little bit overkill, no? CDI cares about the typed annotation, EJB doesn't. Because it's an EJB it's injectable as the type as well as the business interface (granted, you're still exposing the issue that the EJB business interface can't handle generics).
We also don't need the transaction attribute annotation.