Overview: Changing the development database
The initial configuration of WebSphere Commerce development uses Apache Derby as the development database. You can switch to using DB2 or Oracle for your development database.
Guidelines
Consider the following statements
before switching database types:
- If you are developing session beans or custom entity bean finders
that have database-specific SQL statements, you should consider moving
to one of the other supported databases. The alternative is to code
your session beans and custom finders to examine the
useCloudscape
,useDB2
, anduseOracle
methods of the BaseJDBCHelper class and then generate the database specific SQL statements. - The effort of maintaining code that will work with Apache Derby and your target database, must be weighed against the additional setup and configuration effort required in setting up development environments that works directly against the target database.
- As you create a new database or switch your database using the setdbtype command, keep in mind that the Stores Web project assets can be impacted by this change. The Stores Web project contains a Struts configuration file which ties the store_id in the database to the JSP pages of your store. If your existing database does not have the same stores with the same store_id, it is recommended that you make a copy of the WCDE_installdir/workspace/Stores directory and save it with a reminder of which database it is assigned to.
- If required, restore the Stores directory anytime that you switch the databases. If you are starting from a clean database and would like a clean Stores Web project, you can run the resetstores command. If this step is omitted, it might result in a incorrect Struts configuration file, causing routing errors while you navigate the store pages.