This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 94728

Summary: Can't rename JNDI data source name
Product: obsolete Reporter: bugbridge <bugbridge>
Component: visualwebAssignee: John Baker <jbaker>
Severity: blocker CC: jbaker, sakthivelg
Priority: P2 Keywords: RELNOTE
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description bugbridge 2007-02-06 19:42:04 UTC
Original status: 1-Dispatched; Suggested Status: NEW

These items should be added to the Keywords: RELNOTE

Original submitter: jbaker

Due to design limitation in the plugin, it's not possible to choose or rename
the data source in the IDE.  No feature can be implemented using  NB 5.5 .
Try for fix in NB 6

See workaround

To rename a JNDI name:

1) Switch to the Runtime tab, expand the Servers and delete the JDBC Resources
and Connection pools.  For Sun Java System Application Server, expand
the Resources|JDBC node and remove the appropriate node.

(Steps 2-5 below apply to a single project and must be done for each project
that is to use a new JNDI name)

2) In the project's directory, edit and rename the data source
name in the _init() method

   e.g. edit tripRowSet.setDataSourceName("java:comp/env/jdbc/cpsDataSource");

3) Open the setup/jdbc_dataSource.sun-resource file and change the JNDI setting

4) Edit the web/WEB-INF/web.xml file and change the <res-ref-name> setting

5) Edit web/WEB-INF/sun-web.xml and change the <res-ref-name> and  <jndi-name>

6) Choose Help->About - Detail to find the User Dir setting

7) In a text editor, open context.xml (located in the User Dir) and change the
<object name ...> setting

8) In a text editor, open var/attributes.xml (located in the User Dir) and
change the
<attr name="datasource-names" stringvalue= ...> setting 

9) Start IDE, then for the project (set as the Main project) choose Build->Clean
and Build Main Project

10) Redeploy the application
Comment 1 John Baker 2007-03-27 03:23:30 UTC

*** This issue has been marked as a duplicate of 88871 ***