|
Problem |
A ResourceInUseException occurs in the administrative
console when attempting to delete a data source.
For example, if you have the samples installed, there is a data source
under the Sample DB Driver called SampleDataSource. If you try to remove
this data source, you get the exception:
com.ibm.ejs.sm.exception.ResourceInUseException. |
|
Cause |
You cannot remove any data source that has references
pointing to it, whether it is a reference in the configuration or
EJB™/application. |
|
Solution |
Using the sample DB Driver example:
- Open the administrative console.
- Click on your node or server or Installed EJB Modules.
- Click on the Increment bean.
- Click on the beans CMPBean Data source.
- Click on the reference or JNDI name for jdbc/SampleDataSource,
- To the right of this panel, click Select Datasource.
- Change the datasource to something other than SampleDataSource.
- Delete SampleDataSource.
This resolves the problem by clearing the reference to the resource.
If you have hard coded this resource into your bean or application, the
only solution is to uninstall the application before deleting the data
source. |
|
|
|
|
|
|