You can register a custom resource with the instance by following this task.
Select the configuration.
Select the configuration from the configuration list. Click Configurations tab to get the list.
Click on Java > Resources tab.
Click New button under Custom Resource section.
The following table describes the properties available for creating a custom resource.
Table 11–3 Custom Resources Properties
Property |
Description |
---|---|
JNDI Name |
Provide a unique JNDI name for the custom resource. |
Enabled |
Determines if this custom resource is enabled at runtime. |
Resource Type |
Fully qualified type of this resource. |
Factory Class |
Class that instantiates resources of this type. The fully qualified name of the user-written factory class that implements javax.naming.spi.ObjectFactory. |
Description |
Provide a short description for the custom resource. |
Properties |
Optionally provide CLI properties by clicking Add Property button. |
Using CLI
For creating a custom resource through CLI, execute the following command:
wadm> create-custom-resource --user=admin --password-file=admin.pwd --host=serverhost --port=8989 --config=config1 --res-type=samples.jndi.customResource.MyBean --factory-class=samples.jndi.customResource.MyCustomConnectionFactory custom |
See CLI Reference, create-custom-resource(1).