How do I get the roles allowed to invoke a method from within a session bean?
It seems that I can query the container:
Set methodRoles = container.getMethodPermissions(mi.getMethod(), iface);
And then call doesUserHaveRole, but how do I get a reference to the container from within a session bean?
In essence, all I want to do is find out if the currently logged in person has permission to read (get methods), write (set methods), create (ejbCreate) and delete (ejbRemove) a particular entity so I can use this information to enable/disable certain features in a swing based fat client.
What is the best way of getting this information?
Its not supported from beans. You would have to write a custom interceptor.