Chapter 8 Creating J2EE Applications for BEA WebLogic


Specifying Support for Sybase & Microsoft SQL Server

Generated primary key support for Sybase & Microsoft SQL Server databases use SQL Server's IDENTITY column. This means that when the bean is created and a new row is inserted in the database table, SQL Server will automatically insert the next primary key value into the column that was specified as an IDENTITY column.

Once the IDENTITY column is created in the database table, you specify automatic key generation in the XML deployment descriptors. In the weblogic-cmp-rdbms-jar.xml file, you specify automatic key generation as follows:

<automatic-key-generation>
	<generator-type>SQL_SERVER</generator-type>
</automatic-key-generator>

The generator-type element lets you specify the primary key generation method that you want to use.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.