Hi Pawel,

Creating them as EJBs shouldn't be required.  They're still CDI beans.  In
the JAR that you expose, make sure the various deltaspike extensions are
activated in your javax.enterprise.inject.spi.Extension file.  Make sure
you have a valid beans.xml to discover all beans.

At a minimum you need the repository extension and bean provider.  You
should then be able to inject them.  Please do post back if this gives you
some trouble, happy to help.

John

On Wed, Aug 3, 2016 at 6:50 AM <[email protected]> wrote:

> Need to move my JPA and DeltaSpike repositories to EJB EAR module to allow
> access from two different WARs in the same EAR
>
> What is recommnded approach to access DeltaSpike repository as EJB ?
>
> For adhoc I created PersonService class annotated with @Stateless
>
> @Stateless
> public class PersonService {
>
>         @Inject PersonRepository personRepository;
>
>         public PersonRepository getRepository(){
>                 return personRepository;
>         }
> }
>
> Do you have some other ideas ?
>
> Paweł

Reply via email to