javax.ejb

Interface EJBObject

All Superinterfaces:
Remote
Known Subinterfaces:
Converter, Management

public interface EJBObject
extends Remote

The main ejb context.

Method Summary

EJBHome
getEJBHome()
Handle
getHandle()
Object
getPrimaryKey()
boolean
isIdentical(EJBObject obj)
void
remove()

Method Details

getEJBHome

public EJBHome getEJBHome()
            throws RemoteException
Usages and Demos :

View More Examples of getEJBHome()
   1: 
   2: import javax.ejb.EJBObject;
   3: import javax.ejb.Handle;
   4:         ...
   5:     try {
   6:       EJBObject obj = getEJBObject();
   7:     
   8:         ...
   9:       return obj.getEJBHome().getEJBMetaData().getRemoteInterfaceClass();
  10:     } catch (Exception e) {

View Full Code Here
   1:          log.debug("setNextEntity: " + beanName);
   2:          EJBObject ejbObject = entityContext.getEJBObject();
   3:         ...
   4:          EnterpriseEntityHome home = (EnterpriseEntityHome) ejbObject.getEJBHome();
   5:          try
   6:          {
   7:             nextEntity = home.findByPrimaryKey(beanName);

View Full Code Here

getHandle

public Handle getHandle()
            throws RemoteException
Usages and Demos :

View More Examples of getHandle()
   1: import javax.ejb.EJBHome;
   2: import javax.ejb.EJBObject;
   3: import javax.ejb.Handle;
   4:         ...
   5:   {
   6:     if (obj instanceof EJBObject) {
   7:         ...
   8:       EJBObject ejbObject = (EJBObject) obj;
   9:       EJBHome ejbHome = ejbObject.getEJBHome();
  10:         ...
  11:       
  12:       Handle handle = ejbObject.getHandle();

View Full Code Here

getPrimaryKey

public Object getPrimaryKey()
            throws RemoteException
Usages and Demos :

View More Examples of getPrimaryKey()
   1: import javax.ejb.EJBLocalObject;
   2: import javax.ejb.EJBObject;
   3: import javax.ejb.Handle;
   4:         ...
   5:   {
   6:     return getEntityContext().getPrimaryKey();
   7:   }
   8:         ...
   9: 
  10:   public boolean isIdentical(EJBObject obj) throws RemoteException
  11:   {
  12:         ...
  13:       Object key = getPrimaryKey();
  14:       Object objKey = obj.getPrimaryKey();

View Full Code Here
   1: 
   2: import javax.ejb.EJBObject;
   3: import javax.ejb.EJBException;
   4:         ...
   5: 
   6:     public EJBObject convertPCToEJBObject (Object pc, PersistenceManager pm) {
   7:         if (pc == null) return null;
   8:         ...
   9: 
  10:     public Object convertEJBObjectToPC(EJBObject o, PersistenceManager pm, boolean validate) {
  11:         Object key = null;
  12:         ...
  13:         try {
  14:             key = o.getPrimaryKey();

View Full Code Here

isIdentical

public boolean isIdentical(EJBObject obj)
            throws RemoteException

remove

public void remove()
            throws RemoteException,
                   RemoveException
Usages and Demos :

View More Examples of remove()
   1: import javax.naming.NamingException;
   2: import javax.ejb.EJBObject;
   3: import com.sun.j2ee.blueprints.util.tracer.Debug;
   4:         ...
   5: 
   6:     public static final void remove(EJBObject obj) {
   7:       if (obj != null) {
   8:         ...
   9:         try {
  10:           obj.remove();
  11:         }

View Full Code Here
   1: import javax.ejb.CreateException;
   2: import javax.ejb.EJBObject;
   3: import javax.naming.InitialContext;
   4:         ...
   5: 
   6:       EJBObject bean = home.create();
   7:       getLog().debug("Created ENCBean");
   8:         ...
   9:       bean.remove();
  10:    }
  11:         ...
  12: 
  13:       EJBObject bean = home.create();

View Full Code Here
   1: 
   2:       generator.remove();
   3:    }
   4:         ...
   5:          {
   6:             EJBObject obj = (EJBObject)enum.next();
   7:             getLog().debug("Removing " + obj.getPrimaryKey());
   8:         ...
   9:             obj.remove();
  10:          }

View Full Code Here
   1:         
   2:         EJBObject ejbo;
   3:         try {
   4:         ...
   5:         }
   6:         ejbo.remove();
   7:     }
   8:     
   9:     

View Full Code Here
   1: 
   2: import javax.ejb.EJBObject;
   3: import javax.naming.NamingException;
   4:         ...
   5: 
   6:     protected EJBObject newSessionBeanInstance() throws NamingException, InvocationTargetException {
   7:         if (logger.isDebugEnabled()) {
   8:         ...
   9:         Object ejbInstance = create();
  10:         if (!(ejbInstance instanceof EJBObject)) {
  11:             throw new AspectException("EJB instance [" + ejbInstance + "] is not a remote SLSB");
  12:         ...
  13:             try {
  14:                 ejb.remove();

View Full Code Here