getSingletons() { return singletons; } would do what i described (so you
init the singletons set in the constructor for instance).

Then I don't guarantee it works but the interceptor is setup as a provider.
You can also use openejb-jar.xml to setup it if it makes it smoother for
you.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2016-03-14 15:35 GMT+01:00 jllado <[email protected]>:

> Mmmm, I'm not sure if I understand what you mean. How can I ensure that I'm
> always returning the same instance of that resource?
>
> If I debug the call in ValidationUtils, I see that the resource is
> OpenEJBPerRequestPojoResourceProvider which extends CdiResourceProvider.
> And
> the method isSingleton (of CdiResourceProvider) is always returning
> false...
>
> On the other hand, I've seen is something related with swagger. Because It
> only happens when I call to the swagger end point:
> http://localhost:7070/resources/swagger.json
>
> Thanks,
> Juan Lladó
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Service-object-is-not-a-singleton-use-a-custom-invoker-to-validate-tp4677891p4677897.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to