java - Singleton injected in Interceptor multiple instantiations -
i using jboss eap 6.4.10 in project , have set @singleton
@startup
. singleton @inject
ed @interceptor
because use methods in interceptor.
so far good, works, noticed @postconstruct
method of @singleton
not called once, nay called 496 times. wonder why happening. cant inject singleton in interceptor?
i figured out problem. had imported import javax.ejb.singleton;
instead of import javax.inject.singleton;
Comments
Post a Comment