此内容没有您所选择的语言版本。
21.5. Configuring Message-Driven Beans
JBoss Administrators can specify the default resource adapter used by message-driven beans. The default resource adapter can be specified using the Management Console and the CLI. The default resource adapter supplied with JBoss EAP 6 is
hornetq-ra
.
Procedure 21.19. Set the Default Resource Adapter for Message-Driven Beans using the Management Console
- Login to the Management Console. Section 3.3.2, “Log in to the Management Console”
- Click on thetab at the top of the screen. Expand the menu and select . Select the tab.
- Click Details area can now be edited.. The fields in the
- Enter the name of the resource adapter to be used in the Default Resource Adapter text box.
- Clickto finish.
Procedure 21.20. 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.4.4, “Connect to a Managed Server Instance Using the Management CLI”.
- Use the
write-attribute
operation with the following syntax./subsystem=ejb3:write-attribute(name="default-resource-adapter-name", value="RESOURCE-ADAPTER")
/subsystem=ejb3:write-attribute(name="default-resource-adapter-name", value="RESOURCE-ADAPTER")
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace RESOURCE-ADAPTER with name of the resource adapter to be used. - Use the
read-resource
operation to confirm the changes./subsystem=ejb3:read-resource
/subsystem=ejb3:read-resource
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Example 21.15. 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]
[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 21.16. XML Configuration Sample