ProjectMigrationDatasourcesSpec
VisualWeb Project Migration in 6.0
linked from DatabaseNB6Planning
Contents |
Owner: John Baker
Tracked by 94804
Features
To support importing or migrating projects that were developed in Creator 2 or VisualWeb Pack 5.5 the features listed below are required of Databases.
Once the settings are migrated, Creator 2/NB 5.5.x projects' pages should bind to rowsets successfully.
At IDE startup, NetBeans will
- copy $userdir/context.xml to $6.0userdir/config/{release}/*
- {release} = 2_1 | 5_5 | 5_5_1
- copy drivers jdbc-drivers/* to $6.0userdir/jdbc-drivers/*
- exclude datasourceconfig.xml
- if the same driver file name exists in multiple releases then use the one from the latest release, e.g.
- Dataconnectivity will register drivers and connections
Dataconnectivity implementation
- Register JDBC drivers from the $userdir/jdbc-drivers folder
- Parse $userdir/config/{release}/context.xml then register connections
- Remove folder and files - $userdir/config/{release}
- Support restoring project's datasources via the Data Source References node or by opening a visualweb page that contains components bound to rowsets
Dependencies
- Feature - Copy JDBC drivers and context.xml to the userdir [99740|
http://www.netbeans.org/issues/show_bug.cgi?id=99740]
Limitations
- Sample database (from Creator 2) connections are migrated but not the databases themselves.
SQL scripts are provided
- Only 1 Travel connection is added, so legacy samples using Travel need to be migrated by hand
by fixing the resource settings in the setup folder (see the Files tab)
- Sun Java System drivers are not migrated (from Creator 2 and they may be out of date anyways)
Use Cases
- If you have NetBeans 5.5/5.5.1 and Creator 2 installed then rename the userdir for NetBeans 5.5/5.5.1
- Creator 2 add datasource for MySQL
- download driver http://dev.mysql.com/downloads/connector/j/5.0.html
- database=travel
- user=travel
- password=travel
- url is jdbc:mysql://jbrave-pc1.sfbay.sun.com:3306/travel
- In Creator 2, create a new project dnd a Table component then dnd the TRIP table from the MySQL connection
- Start NetBeans 6.0 clean and migrate settings - click Yes in the dialog provided
- Check in the Runtime tab for the MySQL connection
- Open the Creator 2 project created in step 1
- Expand the project node, select the Data Source References node, right-click then choose the Resolve Data Source(s) context menuitem
- or open a page in the Designer that has components bound to rowsets
- Also note the $userdir/config/2_1 folder should be deleted afterwards
To test NetBeans 5.5.x restore the userdir name and repeat the steps 1-5
- Other databases can be tried using NetBeans 5.5.x

