Browse Prior Art Database

A Technique for Virtually Expanding Queryable EJB CMP Entity Bean Fields

IP.com Disclosure Number: IPCOM000015562D
Original Publication Date: 2002-Feb-20
Included in the Prior Art Database: 2003-Jun-20
Document File: 2 page(s) / 49K

Publishing Venue

IBM

Abstract

Disclosed is a technique for virtually expanding queryable EJB CMP entity bean fields. Introduction: An entity bean does not necessarily contain all attributes required by all conceivable business applications that use that entity bean, and users are likely to demand the ability to add user-defined attributes to an entity definition. For example, an EJB provider may provide an entity bean that represents a Person, and it has several attributes identified by general requirements, such as "name" and "age". However, a user may require an extra attribute called "nationality" to an entity definition representing a person, and another user may require another attribute called "height". Another user may require something you would never imagine. When a new attribute is added to a CMP entity bean, it involves the modification of the corresponding database table. When that field is a subject of a search on the persisted data, the addition also requires the modification of the implementation to add a new finder method. One of the approaches that have been taken to resolve this need for the modification by the entity bean users is to handle all attributes in one field with separators in between. This method does remove the need for the modification of the database table, but it puts a restriction on the search in that it requires all persisted data to be instantiated in order to search for a particular data.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

A Technique for Virtually Expanding Queryable EJB CMP Entity Bean Fields

Disclosed is a technique for virtually expanding queryable EJB CMP entity bean fields.

Introduction:

An entity bean does not necessarily contain all attributes required by all conceivable business applications that use that entity bean, and users are likely to demand the ability to add user-defined attributes to an entity definition. For example, an EJB provider may provide an entity bean that represents a Person, and it has several attributes identified by general requirements, such as "name" and "age". However, a user may require an extra attribute called "nationality" to an entity definition representing a person, and another user may require another attribute called "height". Another user may require something you would never imagine.

When a new attribute is added to a CMP entity bean, it involves the modification of the corresponding database table. When that field is a subject of a search on the persisted data, the addition also requires the modification of the implementation to add a new finder method. One of the approaches that have been taken to resolve this need for the modification by the entity bean users is to handle all attributes in one field with separators in between. This method does remove the need for the modification of the database table, but it puts a restriction on the search in that it requires all persisted data to be instantiated in order to search for a particular data.

Disclosed idea:

This technique uses the XML technology to handle dynamically extended attributes, and provides a set of classes to allow dynamic searching of the entities.

The procedure to define and use the dynamic extended attribu...