Java Reference
In-Depth Information
public BoardKey() {
super();
}
public BoardKey(java.lang.String argName) {
name = argName;
}
public boolean equals(Object o) {
if (o instanceof BoardKey) {
BoardKey otherKey = (BoardKey) o;
return ((this.name.equals(otherKey.name)));
} else {
return false;
}
}
public int hashCode() {
return (name.hashCode());
}
}
Of course, session beans do not need a primary key class.
We've looked at all of the Java interface and implementations for our
model. We now need a deployment descriptor, which will be used to define
the runtime behaviors and properties that the application server will need to
deploy our object model.
8.2.6
Creating a deployment descriptor
Most environments create deployment descriptors automatically. Though
VisualAge for Java can also create XML deployment descriptors, it's much eas-
ier to use the user interface to handle deployment details. Even so, we'll pro-
vide a portion of an example of a deployment descriptor for the refactored
project shown in the upcoming section “Antipattern: Round-tripping.” We
chose this deployment descriptor because it also has a session bean, with a
slightly different syntax:
<?xml version="1.0">
<ejb-jar id="ejb-jar_ID">
<description>Generated by Export Tool for
Enterprise Java Beans 1.1 version 1.0
from IBM VisualAge for Java version 4.0.
</description>
<display-name>BitterJavaEJBs</display-name>
This header information contains the XML version, a description of the bean,
and the pretty name, suitable for display, for the EJB s in the archive file. The
meat of the Java Archive ( JAR ) will follow.
Search WWH ::




Custom Search