java - Deltaspike and @Stateless Bean -
java - Deltaspike and @Stateless Bean -
i want secure "stateless" ejb deltaspike-api.
@stateless @remote(userserviceremote.class) public class userservice implements userserviceremote
at method level have custom annotation "support"
@support public void dosomething() {}
therefore wrote custom annotation "@support":
@retention(value = retentionpolicy.runtime) @target({elementtype.type, elementtype.method }) @documented @securitybindingtype public @interface back upwards {
my custom authorizer looks like:
@secures @support public boolean doadmincheck(identity identity, identitymanager identitymanager, relationshipmanager relationshipmanager) throws exception { homecoming hasrole(relationshipmanager, identity.getaccount(), getrole(identitymanager, "support")); }
in "beans.xml" file included:
<interceptors> <class>org.apache.deltaspike.security.impl.extension.securityinterceptor</class> </interceptors>
but after log in application , phone call "dosomething" method per remote phone call "support" annotation ignored, no matter if have role or not.
what i'm doing wrong? thanx suggestions!!!
ejb , cdi 2 different concepts. stateless session bean , managed cdi bean managed different containers. cannot utilize deltaspike on stateless session bean. if want utilize deltaspike security, utilize named bean instead , utilize different remoting strategy.
java security ejb-3.1 deltaspike
Comments
Post a Comment