That is wrong as the JBossPolicyConfigurationFactory implementation of javax.security.jacc.PolicyConfigurationFactory is not responsible for setting the jvm Policy. It should be irrelevant that the check fails to find a DelegatingPolicy installed as the jvm Policy instance. Each JBossPolicyConfigurationFactory should be associated with the jvm singleton DelegatingPolicy via the DelegatingPolicy.getInstance() call. If this is returning different instances then there is a class loader problem causing the DelegatingPolicy class to be loaded multiple times.
> -----Original Message----- > From: Kabir Khan > Sent: Friday, March 24, 2006 5:02 AM > To: Bill Burke; Scott M Stark > Cc: QA; jboss-development@lists.sourceforge.net; Kabir Khan > Subject: JACC (ejb 3) - WAS RE: jboss-4.0-testsuite Build > Completed With Testsuite Errors > > I've taken a look at the EJB 3 JACC tests and the problem for > ejb 3 seems to > be: > > The JBossPolicyConfigurationFactory constructor calls > Policy.getPolicy() and throws away the Policy instance if it > is not an instance of DelegatingPolicy. For EJB 3 the > returned Policy.getPolicy() is an instance of > DelegatingPolicy$PolicyProxy, and so it gets thrown away and > replaced with something else > > // Get the DelegatingPolicy > Policy p = Policy.getPolicy(); > if( (p instanceof DelegatingPolicy) == false) > { > // Assume that the installed policy delegates to the > DelegatingPolicy > p = DelegatingPolicy.getInstance(); > } > policy = (DelegatingPolicy) p; > This new DelegatingPolicy is the one the EJB 3 containers > work on via the PolicyConfiguration during setup. > > > Later on the interceptors call Policy.getPolicy() and get the > same empty DelegatingPolicy$ProxyPolicy instance that was > thrown away during setup/ > > Changing the JBossPolicyConfigurationFactory constructor to > Policy p = Policy.getPolicy(); > if( (p instanceof DelegatingPolicy) == false) > { > // Assume that the installed policy delegates to the > DelegatingPolicy > p = DelegatingPolicy.getInstance(); > Policy.setPolicy(p); > } > > fixes this for EJB, but I am hesitant to make this change > since I don't know what the wider implications of this are > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development