You can scope partial beans just like any other bean (@Gerhard, correct me
if I'm wrong) - e.g. like this example here in the JDF [1].

For the serialization issue I'd have to check. The partial bean
InvocationHandler is a Serializable [2]. Can you paste a stacktrace
somewhere?

[1]
https://github.com/jboss-developer/jboss-wfk-quickstarts/blob/7eed438476290e5a9db2e82cb3032d5479402b6d/deltaspike-partialbean-advanced/src/main/java/org/jboss/as/quickstart/deltaspike/partialbeanadvanced/queryservice/PersonQueryService.java
[2]
https://github.com/apache/deltaspike/blob/master/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java


On Wed, Jun 18, 2014 at 1:13 PM, Karl Kildén <[email protected]> wrote:

> Feels like it should default to @ApplicationScoped? I see no reason why not
> at least
>
>
> On 18 June 2014 13:12, Thomas Andraschko <[email protected]>
> wrote:
>
> > or: @Repository(scope = ApplicationScoped.class)
> >
> >
> > 2014-06-18 12:25 GMT+02:00 Thomas Andraschko <
> [email protected]
> > >:
> >
> > > Hi Thomas,
> > >
> > > my problem is that when i inject it in a ViewScoped bean, it tries to
> > > serialize it but it isn't serializable.
> > > Could we make it configurable? Maybe we could declerate the scope on
> the
> > > repo:
> > >
> > > @Repository
> > > @ApplicationScoped
> > > public abstract class MyRepository extends
> > > AbstractEntityRepository<Mitarbeiter, Long>
> > >
> > > Regards,
> > > Thomas
> > >
> > >
> > > 2014-06-18 12:20 GMT+02:00 Thomas Hug <[email protected]>:
> > >
> > > Hi Thomas
> > >> We made some efforts to get rid of scope-related parts in the impl,
> but
> > I
> > >> don't think there's anything speakin' against a @NormalScoped repo -
> > >> PartialBeans do support that.
> > >> Cheers,
> > >> Thomas
> > >>
> > >>
> > >> On Wed, Jun 18, 2014 at 11:37 AM, Thomas Andraschko <
> > >> [email protected]> wrote:
> > >>
> > >> > Hi,
> > >> >
> > >> > AFAICS repositories are non-scoped, right?
> > >> > Isn't it possible to make them appscoped?
> > >> >
> > >> > Regards,
> > >> > Thomas
> > >> >
> > >>
> > >
> > >
> >
>

Reply via email to