Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Deltaspike data
Is it possible to use deltaspike data module without having a CDIUI application?
I just want to use the power of deltaspike repositories without changing my entire app.
Thx
yes, but you will have to manually fetch the repositories through CDI as @inject won't work. Obviously, using @CDIUI is much preferred.
Do you have an example? Do you mean using the implementation from deltaspike?
You create the repositories as normal:
@Repository
public abstract class BookingRepository extends
AbstractEntityRepository<Booking, Long> {
but instead of doing this in the UI code:
@Inject
private BookingRepository bookingRepo;
you have to use something like CDI.getCurrent().get(), see here: http://stackoverflow.com/questions/24798529/how-to-programmatically-inject-a-java-cdi-managed-bean-into-a-local-variable-in
just a word of warning, using that particular method will keep the entities in memory until you destroy them through CDI (they will not be garbage collected automatically).