Enterprise Beans Tutorial

Home| Forums | Join Google Group | Join Yahoo Group | Jobs
Get custom programming done at GetAFreelancer.com!
Earn Money
  Trading Forex Online
  Paramount Airways
  Free Data Recovery
 Cargo
 Job Portal
  HSBC Investment
 Management
 Cheap Web Hosting
  Make Trip
  Cheap Air Travel
 Leisure Hotel
  Free Air Travel
  Mutual Fund Informations
   Cheapest Cellular Plan
 Free Sexy Indians
  Call Center Software
  Hot Indian
Programming Help | Homework Help | Counseling
Astrology Advice | Tarot Advice | Parenting
Dating Advice | Love Advice | Divorce Advice
Legal Advice | Debt Advice | Career Advice

Enterprise Beans Tutorial


4 From the client's perspective, the business methods appear to run locally, but they actually run remotely in the session bean. The signature of a business method must conform to these rules: · The method name must not conflict with one defined by the EJB architecture. For
example, you cannot call a business method ejbCreate or ejbActivate.
· The access control modifier must be public. · The arguments and return types must be legal types for Java RMI. · The modifier must not be static or final. · The throws clause may include exceptions that you define for your application. The
removeBook method, for example, throws the BookException if the book is not in the
cart.
· To indicate a system-level problem, such as the inability to connect to a database, a
business method should throw the javax.ejb.EJBException. When a business method
throws an EJBException, the container wraps it in a RemoteException, which is
caught by the client.
· The container will not wrap application exceptions. · Because EJBException is a subclass of RuntimeException, you do not need to
include it in the throws clause of the business method.
Home Interface A home interface extends the EJBHome interface.
The purpose of the home interface is to define the create methods that a client may invoke.
Every create method in the home interface corresponds to an ejbCreate method in the bean class.
The signatures of the ejbCreate and create methods are similar, but differ in important ways. The rules for
defining the signatures of the create methods of a home interface follow: The number and types of argments in a create method must match those of its corresponding ejbCreate method. The arguments and return type of the create method must be valid RMI types.
A create method returns the remote interface type of the enterprise bean. (But an ejbCreate method
returns void.) The throws clause of the create method must include the java.rmi.RemoteException and the javax.ejb.CreateException. Remote Interface The remote interface, which extends javax.ejb.EJBObject, defines the business methods that a client may invoke. The method definitions in a remote interface must follow these rules: Each method in the remote interface must match a method implemented in the enterprise bean class.
The signatures of the methods in the remote interface must be identical to the signatures of the
corresponding methods in the enterprise bean class. The arguments and return values must be valid RMI types.
The throws clause must include the java.rmi.RemoteException.
State Management Modes When you specify the deployment descriptor of a session bean, you must choose between two state management
modes: stateful or stateless.


Earn Money
  Trading Forex Online
  Paramount Airways
  Free Data Recovery
 Cargo
 Job Portal
  HSBC Investment
 Management
 Cheap Web Hosting
  Make Trip
  Cheap Air Travel
 Leisure Hotel
  Free Air Travel
  Mutual Fund Informations
   Cheapest Cellular Plan
 Free Sexy Indians
  Call Center Software
  Hot Indian