C M P 2 . 0
org.jboss.docs.cmp2.crimeportal.Gangster
org.jboss.docs.cmp2.crimeportal.GangsterBean
Container
java.lang.Integer
False
2.x
gangster
gangsterId
name
nickName
gangsterId
Listing 9 4, The ejb jar.xml Entity Declaration
The most important part of the ejb jar.xml file is the DOCTYPE declaration. When JBoss
deploys an EJB jar file, the DOCTYPE of the ejb jar.xml deployment descriptor is used to
determine the version of the EJB jar. If the public identifier of the DOCTYPE is " //Sun
Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN", JBoss will use the JBossCMP
persistence engine, otherwise the old JAWS CMP 1.1 persistence engine will be used. The
new local home and local elements are equivalent to the home and remote elements. The
cmp version element is new and can be either 1.x or the default 2.x. This element was added
so 1.x and 2.x entities could be mixed in the same application. The abstract schema name
element is also new and is used to identify this entity type in EJB QL queries.
Entity Mapping
The optional JBossCMP configuration is declared in the jbosscmp jdbc.xml file, which is
located in the META INF directory of the ejb jar file. This file has the same overall structure
as the ejb jar.xml file, except the root element is jbosscmp jdbc instead of ejb jar. The
optional configuration of the GangsterEJB follows:
" //JBoss//DTD JBOSSCMP JDBC 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp jdbc_3_0.dtd">
GangsterEJB
gangsterId
84
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved