Skip to main content

Posts

Showing posts from 2009

JBoss in Action

This book is divided into four parts, containing 15 chapters and two appendices. Chapter 1: The JBoss Application Server If you are using JBoss than you can simply skip Chapter 1. This chapter gets you up and running with JBoss by describing the directories and files that are part of JBoss AS, how to start and stop the server, and finally show how to deploy and undeploy a simple web application. Chapter 2(Managing the JBoss Application Server) starts with a description of how JBoss application server is architected;the JBoss Microcontainer and JMX. Next, you will learn how each of these components are configured using its own configuration file, and how you can change these as well. Next, we get a closer look at a few of the management tools provided by JBoss like the JMX Console and twiddle. And finally, a look at some MBeans that provide helpful information,the MBeans that give the list of names in the JNDI namespace or a list of system properties. Chapter 3(Deploying appl

How to create an auto-incrementing column in MS SQL Server 2000

Unlike Microsoft SQL Server 2005 and 2008, MS SQL Server 2000 does not have a ROW_NUMBER() function which applies only to the results of a SELECT query as it doesn't store any permanent value in the DB. The way it works is in keeping with the principles of relational databases. There is no implict ordering of records in an RDBMS. Only by using ORDER BY, a particular ordering (and not sorting) can be enforced only when doing a SELECT. Since Microsoft SQL Server 2000 doesn't have ROW_NUMBER(), the need for creating a primary key column of format int with the auto-increment functionality can be achieved using the keyword IDENTITY(1,1). IDENTITY means "a unique IDENTITY for the record so long as this table exists". Usage example: CREATE TABLE jobs ( job_id smallint IDENTITY(1,1)PRIMARY KEY CLUSTERED, job_desc varchar(50) NOT NULL DEFAULT min_lvl tinyint NOT NULL CHECK (min_lvl >= 10), max_lvl tinyint NOT NULL CHECK (max_lvl <= 250) )