javax.ejb

Interface EntityBean

All Superinterfaces:
EnterpriseBean, Serializable

public interface EntityBean
extends EnterpriseBean

The main ejb context.

Method Summary

void
ejbActivate()
void
ejbLoad()
void
ejbPassivate()
void
ejbRemove()
void
ejbStore()
void
setEntityContext(EntityContext ctx)
void
unsetEntityContext()

Method Details

ejbActivate

public void ejbActivate()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbActivate()
   1: import javax.ejb.EJBException;
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5: 
   6: public class EntityBeanImpl implements EntityBean
   7: {
   8:         ...
   9:     {
  10:         log.debug("EntityBean.ejbActivate() called");
  11:     }
  12:         ...
  13:     {
  14:         log.debug("EntityBean.ejbPassivate() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5:     protected BaseEJBContext newInstance() throws Exception {
   6:         EntityBean bean = null;
   7:         Class beanClass = m_container.getBeanClass();
   8:         ...
   9:         try {
  10:             bean = (EntityBean) beanClass.newInstance();
  11:         } catch (Exception e) {
  12:         ...
  13:         try {
  14:             bean.ejbActivate();

View Full Code Here
   1: 
   2: public class EnterpriseEntityBean implements EntityBean {
   3:    org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(getClass());
   4:         ...
   5: 
   6:        log.debug("EntityBean.ejbCreate("+name+") called");
   7:        this.name = name;
   8:         ...
   9: 
  10:        log.debug("EntityBean.ejbCreateMETHOD("+name+") called");
  11:        this.name = name;
  12:         ...
  13:   public void ejbActivate() throws RemoteException {
  14:     log.debug("EntityBean.ejbActivate() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EJBObject;
   4:         ...
   5:       {
   6:          EntityBean eb = (EntityBean) ctx.getInstance();
   7:         ...
   8:          eb.ejbActivate();
   9:       }

View Full Code Here
   1:             
   2:             EntityBean ejb = (EntityBean)inv.ejb;
   3:             EntityContextImpl context = (EntityContextImpl)inv.context;
   4:         ...
   5:         EntityContextImpl context = (EntityContextImpl)ctx;
   6:         EntityBean ejb = (EntityBean)context.getEJB();
   7:         synchronized ( context ) {
   8:         ...
   9:         try {
  10:             ejb.ejbActivate();
  11:             

View Full Code Here

ejbLoad

public void ejbLoad()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbLoad()
   1: import javax.ejb.EJBException;
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5: 
   6: public class EntityBeanImpl implements EntityBean
   7: {
   8:         ...
   9:     {
  10:         log.debug("EntityBean.ejbActivate() called");
  11:     }
  12:         ...
  13:     {
  14:         log.debug("EntityBean.ejbLoad() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5:     protected BaseEJBContext newInstance() throws Exception {
   6:         EntityBean bean = null;
   7:         Class beanClass = m_container.getBeanClass();
   8:         ...
   9:         try {
  10:             bean = (EntityBean) beanClass.newInstance();
  11:         } catch (Exception e) {
  12:         ...
  13:             bean.ejbActivate();
  14:             bean.ejbLoad();

View Full Code Here
   1: 
   2: public class EnterpriseEntityBean implements EntityBean {
   3:    org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(getClass());
   4:         ...
   5: 
   6:        log.debug("EntityBean.ejbCreate("+name+") called");
   7:        this.name = name;
   8:         ...
   9: 
  10:        log.debug("EntityBean.ejbCreateMETHOD("+name+") called");
  11:        this.name = name;
  12:         ...
  13:   public void ejbLoad() throws RemoteException {
  14:    log.debug("EntityBean.ejbLoad() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EJBObject;
   4:         ...
   5:       {
   6:          EntityBean eb = (EntityBean) ctx.getInstance();
   7:          eb.ejbActivate();
   8:         ...
   9:          EntityBean eb = (EntityBean) ctx.getInstance();
  10:          eb.ejbLoad();
  11:       }

View Full Code Here
   1: 
   2:     protected void callEJBStore(EntityBean ejb, EntityContextImpl context) {
   3:     }
   4:         ...
   5:     
   6:     protected void callEJBLoad(EntityBean ejb, EntityContextImpl entityCtx)
   7:         throws Exception
   8:         ...
   9:         
  10:     private void callLoad(EntityBean ejb, EntityContextImpl entityCtx, 
  11:                           int pkLevelSequenceNum,
  12:         ...
  13:             context.setInEjbLoad(true);
  14:             ejb.ejbLoad();

View Full Code Here

ejbPassivate

public void ejbPassivate()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbPassivate()
   1: import javax.ejb.EJBException;
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5: 
   6: public class EntityBeanImpl implements EntityBean
   7: {
   8:         ...
   9:     {
  10:         log.debug("EntityBean.ejbActivate() called");
  11:     }
  12:         ...
  13:     {
  14:         log.debug("EntityBean.ejbPassivate() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5:     protected BaseEJBContext newInstance() throws Exception {
   6:         EntityBean bean = null;
   7:         Class beanClass = m_container.getBeanClass();
   8:         ...
   9:         try {
  10:             bean = (EntityBean) beanClass.newInstance();
  11:         } catch (Exception e) {
  12:         ...
  13:             bean.ejbStore();
  14:             bean.ejbPassivate();

View Full Code Here
   1: 
   2: public class EnterpriseEntityBean implements EntityBean {
   3:    org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(getClass());
   4:         ...
   5: 
   6:        log.debug("EntityBean.ejbCreate("+name+") called");
   7:        this.name = name;
   8:         ...
   9: 
  10:        log.debug("EntityBean.ejbCreateMETHOD("+name+") called");
  11:        this.name = name;
  12:         ...
  13: 
  14:      log.debug("EntityBean.ejbPassivate() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EJBObject;
   4:         ...
   5:       {
   6:          EntityBean eb = (EntityBean) ctx.getInstance();
   7:          eb.ejbActivate();
   8:         ...
   9:          EntityBean eb = (EntityBean) ctx.getInstance();
  10:          eb.ejbPassivate();
  11:       }

View Full Code Here
   1:             
   2:             EntityBean ejb = (EntityBean)inv.ejb;
   3:             EntityContextImpl context = (EntityContextImpl)inv.context;
   4:         ...
   5:         EntityContextImpl context = (EntityContextImpl)ctx;
   6:         EntityBean ejb = (EntityBean)context.getEJB();
   7:         synchronized ( context ) {
   8:         ...
   9:             
  10:             ejb.ejbPassivate();
  11:             
  12:         ...
  13:             try {
  14:                 ejb.ejbPassivate();

View Full Code Here

ejbRemove

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

View More Examples of ejbRemove()
   1: import javax.ejb.EJBException;
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5: 
   6: public class EntityBeanImpl implements EntityBean
   7: {
   8:         ...
   9:     {
  10:         log.debug("EntityBean.ejbActivate() called");
  11:     }
  12:         ...
  13:     {
  14:         log.debug("EntityBean.ejbRemove() called");

View Full Code Here
   1: 
   2: public class EnterpriseEntityBean implements EntityBean {
   3:    org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(getClass());
   4:         ...
   5: 
   6:        log.debug("EntityBean.ejbCreate("+name+") called");
   7:        this.name = name;
   8:         ...
   9: 
  10:        log.debug("EntityBean.ejbCreateMETHOD("+name+") called");
  11:        this.name = name;
  12:         ...
  13:   public void ejbRemove() throws RemoteException, RemoveException {
  14:    log.debug("EntityBean.ejbRemove() called "+hashCode());

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EJBObject;
   4:         ...
   5:       {
   6:          EntityBean eb = (EntityBean) ctx.getInstance();
   7:          eb.ejbActivate();
   8:         ...
   9:          EntityBean eb = (EntityBean) ctx.getInstance();
  10:          eb.ejbRemove();
  11:       }

View Full Code Here
   1:             
   2:             EntityBean ejb = (EntityBean)inv.ejb;
   3:             EntityContextImpl context = (EntityContextImpl)inv.context;
   4:         ...
   5:         EntityContextImpl context = (EntityContextImpl)ctx;
   6:         EntityBean ejb = (EntityBean)context.getEJB();
   7:         synchronized ( context ) {
   8:         ...
   9:             context.setInEjbRemove(true);
  10:             ejb.ejbRemove();
  11:         } catch ( Exception ex ) {

View Full Code Here

ejbStore

public void ejbStore()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbStore()
   1: import javax.ejb.EJBException;
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5: 
   6: public class EntityBeanImpl implements EntityBean
   7: {
   8:         ...
   9:     {
  10:         log.debug("EntityBean.ejbActivate() called");
  11:     }
  12:         ...
  13:     {
  14:         log.debug("EntityBean.ejbStore() called");

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5:     protected BaseEJBContext newInstance() throws Exception {
   6:         EntityBean bean = null;
   7:         Class beanClass = m_container.getBeanClass();
   8:         ...
   9:         try {
  10:             bean = (EntityBean) beanClass.newInstance();
  11:         } catch (Exception e) {
  12:         ...
  13:         try {
  14:             bean.ejbStore();

View Full Code Here
   1: 
   2: public class EnterpriseEntityBean implements EntityBean {
   3:    org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(getClass());
   4:         ...
   5: 
   6:        log.debug("EntityBean.ejbCreate("+name+") called");
   7:        this.name = name;
   8:         ...
   9: 
  10:        log.debug("EntityBean.ejbCreateMETHOD("+name+") called");
  11:        this.name = name;
  12:         ...
  13:       
  14:    log.debug("EntityBean.ejbStore() called "+hashCode());

View Full Code Here
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EJBObject;
   4:         ...
   5:       {
   6:          EntityBean eb = (EntityBean) ctx.getInstance();
   7:          eb.ejbActivate();
   8:         ...
   9:          EntityBean eb = (EntityBean) ctx.getInstance();
  10:          eb.ejbStore();
  11:       }

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.EntityBean;
   3: import javax.transaction.Transaction;
   4:         ...
   5:         try{
   6:         SET_ENTITY_CONTEXT_METHOD = javax.ejb.EntityBean.class.getMethod("setEntityContext", new Class []{javax.ejb.EntityContext.class});
   7:         ...
   8:         UNSET_ENTITY_CONTEXT_METHOD = javax.ejb.EntityBean.class.getMethod("unsetEntityContext", null);
   9:         }catch(NoSuchMethodException nse){
  10:         ...
  11:                 try{
  12:                     bean.ejbStore();

View Full Code Here

setEntityContext

public void setEntityContext(EntityContext ctx)
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of setEntityContext(EntityContext ctx)
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5:     protected BaseEJBContext newInstance() throws Exception {
   6:         EntityBean bean = null;
   7:         Class beanClass = m_container.getBeanClass();
   8:         ...
   9:         try {
  10:             bean = (EntityBean) beanClass.newInstance();
  11:         } catch (Exception e) {
  12:         ...
  13:         try {
  14:             bean.setEntityContext((EntityContext) ctx.getEJBContext());

View Full Code Here
   1:             
   2:             EntityBean ejb = (EntityBean)inv.ejb;
   3:             EntityContextImpl context = (EntityContextImpl)inv.context;
   4:         ...
   5:         EntityContextImpl context = (EntityContextImpl)ctx;
   6:         EntityBean ejb = (EntityBean)context.getEJB();
   7:         synchronized ( context ) {
   8:         ...
   9:                 
  10:                 ejb.setEntityContext(entityCtx);

View Full Code Here

unsetEntityContext

public void unsetEntityContext()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of unsetEntityContext()
   1: 
   2: import javax.ejb.EntityBean;
   3: import javax.ejb.EntityContext;
   4:         ...
   5:     protected BaseEJBContext newInstance() throws Exception {
   6:         EntityBean bean = null;
   7:         Class beanClass = m_container.getBeanClass();
   8:         ...
   9:         try {
  10:             bean = (EntityBean) beanClass.newInstance();
  11:         } catch (Exception e) {
  12:         ...
  13:         try {
  14:             bean.unsetEntityContext();

View Full Code Here
   1:             
   2:             EntityBean ejb = (EntityBean)inv.ejb;
   3:             EntityContextImpl context = (EntityContextImpl)inv.context;
   4:         ...
   5:         EntityContextImpl context = (EntityContextImpl)ctx;
   6:         EntityBean ejb = (EntityBean)context.getEJB();
   7:         synchronized ( context ) {
   8:         ...
   9:                         try {
  10:                             ejb.unsetEntityContext();
  11:                         } catch ( Exception ex ) {
  12:         ...
  13:                             _logger.log(Level.FINE, 
  14:                                 "Exception in ejb.unsetEntityContext()", ex);

View Full Code Here