0 Replies Latest reply on Jul 3, 2007 5:25 PM by mjl1

    Assigning Roles to Scheduler MBean

    mjl1

      I've a scheduler MBean service that does a lookup for a session EJB. The create on the localhome fails with

      Insufficient method permissions, principal=null, ejbName=ReportingPeriodManager, method=create, interface=LOCALHOME, requiredRoles=[servlet, ejbsession], principalRoles=[]
      

      Here is the descriptor for the MBean service:
      <mbean code="org.jboss.varia.scheduler.Scheduler"
       name="com.metatime.jboss.schedulable.ReportingPeriod:service=Scheduler">
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.metatime.jboss.schedule.ReportingPeriod</attribute>
       <attribute name="SchedulableArguments">ReportingPeriodSchedule,123456789</attribute>
       <attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="SchedulePeriod">60000</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <depends>jboss.j2ee:service=EJB,jndiName=ReportingPeriodManager</depends>
       </mbean>
      

      I haven't been able to figure out how to associate a Principal or Role to the MBean service. Is there something like a "run-as" on mbeans?