19.5. Configuring Message-Driven Beans
19.5.1. Set Default Resource Adapter for Message-Driven Beans
hornetq-ra.
Procedure 19.17. Set the Default Resource Adapter for Message-Driven Beans using the Management Console
- Login to the Management Console. Section 3.4.2, “Log in to the Management Console”
- Click on in the top right, expand the item in the Profile panel on the left and select . Then select the tab from the main panel.

Figure 19.10. EJB3 Container Configuration panel in the Management Console (Standalone Server)
- Click the button. The fields in the Details area are now editable.
- Enter the name of the resource adapter to be used in the Default Resource Adapter text box.
- Click the button to keep the changes, or click the Cancel link to discard them.
- The Details area will now be non-editable and display the correct resource adapter name.
Procedure 19.18. Set the Default Resource Adapter for Message-Driven Beans using the CLI
- Launch the CLI tool and connect to your server. Refer to Section 3.5.4, “Connect to a Managed Server Instance Using the Management CLI”.
- Use the
write-attributeoperation with the following syntax./subsystem=ejb3:write-attribute(name="default-resource-adapter-name", value="RESOURCE-ADAPTER")
Replace RESOURCE-ADAPTER with name of the resource adapter to be used. - Use the
read-resourceoperation to confirm the changes./subsystem=ejb3:read-resource
Example 19.14. Set the Default Resource Adapter for Message-Driven Beans using the CLI
[standalone@localhost:9999 subsystem=ejb3] /subsystem=ejb3:write-attribute(name="default-resource-adapter-name", value="EDIS-RA")
{"outcome" => "success"}
[standalone@localhost:9999 subsystem=ejb3]Example 19.15. XML Configuration Sample
<subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
</subsystem>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.