To remove a Data Source:
1) Edit SessionBean.java, go to the _init() method and delete the code corresponding to the data source to delete.
e.g. I want to delete a rowset named VIR. Delete these lines from SessionBean1.java
passwordRowSet.setDataSourceName("java:comp/env/jdbc/VIR"); passwordRowSet.setCommand("SELECT * FROM VIR.PASSWORD"); passwordRowSet.setTableName("PASSWORD");
(do not delete the _init() method)
2) Switch to the Files tab (from the main menu, select Window->Files)
Expand the web and WEB-INF folder then double-click on the web.xml file. Click on the References section at the top.
Then expand Resource References, select the resource entry to delete then click Remove
3) Expand the setup folder then if there are entries , one for the connection pool and the other for the for the jdbc resource, you can just remove these 2 nodes
4) It's good to also remove the resource references from your Application Server