Glad to hear :-) I'd be surprised if @Stateless has any effect?
On Tue, Dec 16, 2014 at 9:07 PM, Karl Kildén <[email protected]> wrote: > > For now I use just the interface and @Stateless not @AppScoped, should be > okay? I really need to try clustering soon... > > Thanks for the data module I really like it - hope the issue can be > resolved > > cheers > > On 16 December 2014 at 20:58, Thomas Hug <[email protected]> wrote: > > > > AFAIR it's not abstract repositories per se, it's the combination of an > > abstract class extending an abstract class implementing an interface > which > > is somehow broken (took me ages to find that case and bounce the issue > back > > to PartialBeans). Which is what you get extending > AbstractEntityRepository. > > > > => You can skip AbstractEntityRepository, implement EntityRepository > > directly and get the EM injected. Umm, haven't tried that actually but > > stating it boldly here ;-) > > > > For the drawback, AppScope should definitely work fine (only some people > > react allergic to proxies ;-). > > > > On Tue, Dec 16, 2014 at 3:45 PM, Thomas Andraschko < > > [email protected]> wrote: > > > > > > Nothing, works perfectly fine. > > > We have just a bug in our partial bean module if the repo is abstract. > > > Interfaces are working fine. > > > Nevertheless, most of my repositories are abstract... > > > > > > 2014-12-16 15:41 GMT+01:00 Karl Kildén <[email protected]>: > > > > > > > > Whats the drawback for @ApplicationScoped eg. > > > > > > > > @Repository > > > > @ApplicationScoped > > > > public interface UserRepository extends EntityRepository<User, Long> > { > > > > > > > > User findOptionalByUsernameEqual(String username); > > > > } > > > > > > > > On 16 December 2014 at 14:23, Thomas Andraschko < > > > > [email protected] > > > > > wrote: > > > > > > > > > > :D > > > > > > > > > > IMO it also doesn't make sense to serialize repositories! > > > > > > > > > > 2014-12-16 14:16 GMT+01:00 Thomas Hug <[email protected]>: > > > > > > > > > > > > Officially declaring this the "Thomas" thread ;-) > > > > > > > > > > > > Agree with Thomas that going for AppScope is probably the > simplest > > > > > > workaround for now. I remember some efforts for serialization (as > > OWB > > > > > > complained for some cases) but overall it does not work well when > > you > > > > > have > > > > > > to inject EMs or use Instance<>. Fixing this properly might > > require a > > > > > major > > > > > > refactoring. > > > > > > > > > > > > On Tue, Dec 16, 2014 at 8:17 AM, Thomas Andraschko < > > > > > > [email protected]> wrote: > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > i would make your repositories AppScoped. > > > > > > > Unfortunately AppScoped doesn't work for abstract repositories > > :/ I > > > > > still > > > > > > > have the same problem -> > > > > > > > https://issues.apache.org/jira/browse/DELTASPIKE-647 > > > > > > > > > > > > > > > > > > > > > 2014-12-15 23:47 GMT+01:00 Thomas Frühbeck <[email protected]>: > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > we are integrating Data module of DS as vital part of our > > > > persistence > > > > > > > > layer, but unfortunately Repositories are not Serializable, > so > > > that > > > > > > SFSB > > > > > > > or > > > > > > > > SessionScoped beans with Dependent scoped dependencies on > > > > > Repositories > > > > > > > will > > > > > > > > fail in cluster configurations. > > > > > > > > > > > > > > > > Due to some recent overuse of scoped dependencies we would > like > > > to > > > > > > > refrain > > > > > > > > from again starting to scope vital infrastructure. > > > > > > > > > > > > > > > > Can you give some advice, which way to solve this problem? > > > > > > > > > > > > > > > > Many thanks for your dedication to DeltaSpike and your help, > > > > > > > > Thomas > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
