FileDocCategorySizeDatePackage
EJBMetaDataImpl.javaAPI DocJBoss 4.2.14366Fri Jul 13 20:53:52 BST 2007org.jboss.ejb3.proxy

EJBMetaDataImpl

public class EJBMetaDataImpl extends Object implements javax.ejb.EJBMetaData, Serializable
An implementation of the EJBMetaData interface which allows a client to obtain the enterprise Bean's meta-data information.
author
Rickard Oberg (rickard.oberg@telkel.com)
author
Marc Fleury
author
Jason Dillon
version
$Revision: 60233 $

Fields Summary
private static final long
serialVersionUID
Serial Version Identifier. @since 1.1
private final Class
remote
private final Class
home
private final Class
pkClass
private final boolean
session
private final boolean
statelessSession
private final javax.ejb.HomeHandle
homeHandle
Constructors Summary
public EJBMetaDataImpl(Class remote, Class home, Class pkClass, boolean session, boolean statelessSession, javax.ejb.HomeHandle homeHandle)
Construct an EJBMetaDataImpl. this should only be accessible from the factory.


   // Constructors --------------------------------------------------

                  
      
           
           
           
           
           
   
      this.remote = remote;
      this.home = home;
      this.pkClass = pkClass;
      this.session = session;
      this.statelessSession = statelessSession;
      this.homeHandle = homeHandle;
   
Methods Summary
public javax.ejb.EJBHomegetEJBHome()
Obtain the home interface of the enterprise Bean.

throws
EJBException Failed to get EJBHome object.

      try
      {
         return homeHandle.getEJBHome();
      }
      catch (EJBException e)
      {
         throw e;
      }
      catch (RemoteException e)
      {
         e.printStackTrace();
         throw new EJBException(e);
      }
   
public java.lang.ClassgetHomeInterfaceClass()
Obtain the Class object for the enterprise Bean's home interface.

      return home;
   
public java.lang.ClassgetPrimaryKeyClass()
Obtain the Class object for the enterprise Bean's primary key class.

      if (session == true)
         throw new RuntimeException("A session bean does not have a primary key class");

      return pkClass;
   
public java.lang.ClassgetRemoteInterfaceClass()
Obtain the Class object for the enterprise Bean's remote interface.

      return remote;
   
public booleanisSession()
Test if the enterprise Bean's type is "session".

return
True if the type of the enterprise Bean is session bean.

      return session;
   
public booleanisStatelessSession()
Test if the enterprise Bean's type is "stateless session".

return
True if the type of the enterprise Bean is stateless session.

      return statelessSession;