JamesBranam's Blog
Deleting a Data Source in NetBeans

Hi all,
You can find all kinds of information out there on how to create a data source in NetBeans. It's easy enough to do. Today I was faced with the opposite: how to delete a data source.
First, some background information: I've been working on a tutorial featuring Ajax functionality, and while trying to re-create the steps, I got the annoying message that the data source I wanted to create already existed. So, I had to delete the existing data source. I finally figured out how to do it.
The first thing you need to do is locate the GlassFish folder on your machine. I have a Mac, and I found mine at NetBeans Install/glassfish-V2ur2. Once there, find the domain.xml file. It's located in the domains/domain1/config directory. In the domain.xml file, find the data source and delete it. (In my case it was jndi/states.) Save and close the file and you're on your way. I've included a screenshot of the file at the top of this blog entry that shows the data sources.
See you tomorrow!
--James
Posted at 03:23PM Jul 30, 2008 by branajam in NetBeans | Comments[1]
Instead of directly modifying the server's domain.xml, you can delete the deployed datasource from GlassFish server in the Services tab of the IDE.
You can also delete the registered resource using GlassFish's admin console.
Posted by Nitya Doraisamy on August 27, 2008 at 12:33 AM CEST #