1 2 Previous Next 17 Replies Latest reply on Apr 25, 2007 1:38 AM by Anil Saldanha

    JACC Policy Bean not getting injected into EJBModule

    Anil Saldanha Master

      When I have a ejb jar, the security deployer creates a JaccPolicy Bean for the top level deployment and adds it to the deployment as follows:

      //Create a Service Bean for the JACC Policy
       ServiceMetaData jaccPolicy = new ServiceMetaData();
       jaccPolicy.setObjectName(new ObjectName(JaccPolicy.BASE_OBJECT_NAME + contextId));
       catch (Exception e)
      //Now add this service bean to the unit
       ServiceDeployment sd = new ServiceDeployment();
       unit.addAttachment("jboss.jaccpolicy", sd, ServiceDeployment.class);

      I then expect an injection of JaccPolicyMBean into EJBModule. This is not happening. Scott, I think your last cycle of changes may have had an effect on this?

      Simplest way to test this:
      Create a jacc server configuration by running the target "ant tests-jacc-security" and then run the following.
      ant -Dtest=org.jboss.test.jacc.test.CallerInRoleUnitTestCase one-test

      This is the primary reason for the jacc failures in the test suite.

      I think the call "unit.addAttachment" needs to be looked at.

      The same phenomenon is probably applicable to web deployments also.

        1 2 Previous Next