Home Ejb EJB deployment descriptor



EJB deployment descriptor
Posted on: January 12, 2009 at 12:00 AM
Deployment descriptor is the file which tells the EJB server that which classes make up the bean implementation, the home interface and the remote interface.

EJB deployment descriptor

     

Deployment descriptor is the file which tells the EJB server that which classes make up the bean implementation, the home interface and the remote interface. it also indicates the behavior of one EJB with other. The deployment descriptor is generally called as ejb-jar.xml and is in the directory META-INF of the client application. In the  example given below our application consists of single EJB .

Here the node

<?xml version="1.0" encoding="UTF-8"?>
<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
<description>Accessing Database Application</description>
<display-name>Secure-app-client</display-name><enterprise-beans>
<session>
<ejb-name>secure</ejb-name>
<home>org.glassfish.docs.secure.secureHome</home>
<remote>org.glassfish.docs.secure.secure</remote>
<ejb-class>org.glassfish.docs.secure.secureBean</ejb-class>
<session-type>Stateless</session-type>
</session>
</enterprise-beans>
</application-client>

<ejb-name>secure</ejb-name>:-This is the node that assigns the name to the EJB.

<description>Accessing Database Application</description>:-This node gives the brief description about the Ejb module created.

<session-type>Stateless</session-type>:-This node assigns the Session bean as stateless or stateful. Here stateless means to say accessing Remote interface.

Related Tags for EJB deployment descriptor:
cdeploymentfileclassserverinterfacescriptioclassesremotemakeimplementationejbipviintdeploywithtobehavioravissebeaneilitdeshomelsimceinasdescriptormntbeacajaceclesemmecattorwhichssoatkishallmpleplepleaandrvscrssriripthavatihatfacelsoindicicaicapleplndonomo


More Tutorials from this section

Ask Questions?    Discuss: EJB deployment descriptor  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.