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 - Can't rename JNDI data source name
Summary: Can't rename JNDI data source name
Status: RESOLVED DUPLICATE of bug 88871
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: John Baker
URL:
Keywords: RELNOTE
Depends on:
Blocks:
 
Reported: 2007-02-06 19:42 UTC by bugbridge
Modified: 2007-03-27 03:23 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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

Description:
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

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 SessionBean1.java 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>
settings

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 ***