Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-776

Inject POJO to MBean by using <inject bean="XXX"> in jboss-service.xml does not work in SAR

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Won't Do
    • Major
    • None
    • None
    • JMX, POJO
    • None

    Description

      When injecting POJO to MBean by using <inject bean="myTask"/> in jboss-service.xml of SAR like the following:

      • META-INF/jboss-service.xml:
      <server>
        <mbean code="com.redhat.jboss.support.HelloService"
               name="example:type=HelloService,service=Hello">
           <attribute name="Message">Hello!!</attribute>
           <attribute name="Task"><inject bean="myTask"/></attribute>
        </mbean>
      </server>
      
      • META-INF/jboss-beans.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <deployment ... >
        <bean name="myTask" class="com.redhat.jboss.support.SimpleTask">
        </bean>
      </deployment>
      

      Then the following ERROR is happened at deployment of SAR:

      7.1.4.Final
      ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.mbean.service.example:type=HelloService,service=Hello.start Missing[jboss.mbean.service.myTask.start]","jboss.mbean.registration.example:type=HelloService,service=Hello Missing[JBAS014861: <one or more transitive dependencies>]","jboss.mbean.service.example:type=HelloService,service=Hello.create Missing[jboss.mbean.service.myTask.create]"]}}}
      
      7.2.0.Alpha1
      ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "HelloService.sar" was rolled back with the following failure message: 
      {"JBAS014771: Services with missing/unavailable dependencies" => [
          "jboss.mbean.service.example:type=HelloService,service=Hello.start is missing [jboss.mbean.service.myTask.start]",
          "jboss.mbean.service.example:type=HelloService,service=Hello.create is missing [jboss.mbean.service.myTask.create]"
      ]}
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-mmiura Masafumi Miura
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: