0% found this document useful (0 votes)
42 views

DEPLOYMENT DESCRIPTOR EJB1.1 (Listing 12-3)

This document contains two deployment descriptors for EJB 1.1 and EJB 2.0 that define an entity bean called "myEJB". It specifies the home, remote, local home and local interfaces for "myEJB" as well as its class, persistence type and primary key. It also provides examples of simple home and remote interfaces for the "myEJB" bean.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

DEPLOYMENT DESCRIPTOR EJB1.1 (Listing 12-3)

This document contains two deployment descriptors for EJB 1.1 and EJB 2.0 that define an entity bean called "myEJB". It specifies the home, remote, local home and local interfaces for "myEJB" as well as its class, persistence type and primary key. It also provides examples of simple home and remote interfaces for the "myEJB" bean.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DEPLOYMENT DESCRIPTOR EJB1.

1(listing 12-3)
<!Doctype EJB-JAR public //Sun Microsystems, Ind. // DTD EnterpriseJavabeans
1.1//EN http://java/sun/com/dtd/ejb-jar_1_1/dtd>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>myEJB</ejb-name>
<home>com.jimkeogh.ejb.MyEJBHome</home>
<remote>com.jimkeogh.ejb.MyEJBRemote</remote>
<ejb-class>com.jimkeogh.ejb.MyEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
</ejb-jar>
Listing 12.4 :: Deployment descriptor for
EJB2.0
<!Doctype EJB-JAR public //Sun Microsystems, Ind. // DTD EnterpriseJavabeans
1.1//EN http://java/sun/com/dtd/ejb-jar_1_1/dtd>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>myEJB</ejb-name>
<home>com.jimkeogh.ejb.MyEJBHome</home>
<remote>com.jimkeogh.ejb.MyEJBRemote</remote>
<local-home>com.jimkeogh.ejb.MyEJBHomeLocal</local-home>
<local>com.jimkeogh.ejb.MyEJBLocal</local>
<ejb-class>com.jimkeogh.ejb.MyEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
</ejb-jar>

EXAMPLE: A simple home interface for the myEJB EJB
Import javax.ejb.*;
Import java.rmi.RemoteException;
Public interface MyEJBHome extends EJBHome
{
Public MyEJB create() throws CreateException, RemoteException ;
}
EXAMPLE: A simple Remote interface for the myEJB EJB
Import javax.ejb.*;
Import java.rmi.RemoteException;
Public interface MyEJB extends n EJBObject
{
Public String myMethod() throws RemoteException ;
}

You might also like