ResourceInUseException occurs when attempting to delete a datasource
 Technote (FAQ)
 
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:
  1. Open the administrative console.
  2. Click on your node or server or Installed EJB Modules.
  3. Click on the Increment bean.
  4. Click on the beans CMPBean Data source.
  5. Click on the reference or JNDI name for jdbc/SampleDataSource,
  6. To the right of this panel, click Select Datasource.
  7. Change the datasource to something other than SampleDataSource.
  8. 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.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1117171
IBM Group: Software Group
Modified date: Aug 9, 2004