Java Reference
In-Depth Information
Figure 14.4
Directory structure under the
build directory for deployment
of the entity bean.
You need to create the following two XML files in a META-INF directory at the
same level as the jmxbook directory containing the class files from the example:
ejb-jar.xml— A standard deployment descriptor that defines the specifics of
the bean. Because it is independent of the container that is deploying the
EJB , it can be used with any container.
jboss.xml— A JBoss-specific deployment descriptor that tells JBoss which
entity to deploy and how to deploy it
Your directory structure should look like that in figure 14.4.
Writing Ejb-jar.xml
Listing 14.7 shows the ejb-jar.xml file required to describe this entity bean.
Listing 14.7
The ejb-jar.xml entity bean description
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<display-name>JMXBook</display-name>
<enterprise-beans>
<entity>
<description>Example MBean</description>
<ejb-name>UserInfoBean</ejb-name>
<home>jmxbook.ch14.UserInfoHome</home>
<remote>jmxbook.ch14.UserInfo</remote>
<ejb-class>jmxbook.ch14.UserInfoBean</ejb-class>
Search WWH ::




Custom Search