-
1. Re: problem with method-permission
rsolod Jan 24, 2002 8:23 AM (in response to annegret)I think you need to add
<security-role>
<role-name>Coder</role-name>
</security-role>
into <assembly-descriptor> too. -
2. Re: problem with method-permission
tcherel May 5, 2002 10:46 PM (in response to annegret)Did you find the way to solve this issue?
I am experiencing exactly the same one with JBoss 2.4.4
Thanks. -
3. Re: problem with method-permission
tcherel May 6, 2002 2:43 PM (in response to annegret)I should probably mention that there is no problem at all if the session bean is deployed as a stateless session bean. But if it is deployes as a stateful one, then the exception described in the initial email of this thread is occuring.
Anybody has any ideas why? Am I missing something in the EJB spec or JBoss documentation saying that after a security excpetion, the stateful bean are gone/discarded?
Any help will be appreciated.
Thomas -
4. Re: problem with method-permission
tcherel May 7, 2002 2:57 PM (in response to annegret)Thanks to Annegret (the intial post of this thread), I got the answer to my question. There it is for anybody else interested:
The behavior you see is correct based on our interpretation of the
EJB spec. The SecurityException is treated as RuntimeException
thrown by the business method and the session is discarded. If
other servers treat this differently file a bug.
You cannot achieve the behavior you are looking for using a single
stateful session bean accessed by a client. You would need to
partition the work being done so that the restricted operation can
be isolated from the session state you want to save on failure. You
would need to add another stateless or stateful session bean for the
restricted operation and catch and deal with the SecurityException
thrown.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx