Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
EJB Interfaces 
 

Interface in java means a group of related methods with empty bodies. EJB have generally 4 interfaces.

 

EJB Interfaces

                         

Interface in java means a group of related methods with empty bodies. EJB have generally 4 interfaces. These are as follows

1)Remote interface:- Remote interface are the interface that has the methods that relate to a particular bean instance. In the Remote interface we have all get methods as given below in the program. This is the interface where all of the business method go.javax.ejb.Remote package is used for creating Remote interface.

package ejb;

import javax.ejb.Remote;

@Remote
public interface Bean30Remote {

String getMessage();

String getAddress();

String getCompanyname();
}


2)Local Interface:-Local interface are the type of interface that are used for making local connections to EJB.@Local annotation is used for declaring interface as Local. javax.ejb.Local package is used for creating Local interface.

package ejb;

import javax.ejb.Local;

@Local
public interface NewSessionLocal {

}


3)Home Interface:-
Home interface is the interface that has methods that relate to all EJB of a certain class as a whole. The methods which are defined in this Interface are create() methods and find() methods . The create() method allows us to create beans. find() method is used in Entity beans.

import javax.ejb.EJBHome;
import javax.ejb.CreateException;
import java.rmi.RemoteException;

public interface Bean30RemoteHome extends EJBHome{
public Bean30Remote create() throws CreateException, RemoteException;
}


4)Localhome Interface:-The local interfaces extend the following interfaces. These interfaces are generally for use by clients
 javax.ejb.EJBLocalObject - for the Object interface
 javax.ejb.EJBLocalHome - for the Home interface 

package ejb;

import javax.ejb.EJBLocalHome;
import javax.ejb.CreateException;

public interface NewSessionLocalHome extends EJBLocalHome {
public NewSessionLocal create() throws CreateException;
}

                         
» View all related tutorials
Related Tags: c database data application io find ejb this app simple tab example to base exam ssi e eps li im

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.