/** * Extracts the persistence capable instance from the source of the given event. * @return null if an instance can not be extracted. */ protected PersistenceCapable getPersistenceCapable(LifecycleEvent evt) { Object source = evt.getSource(); return source instanceof PersistenceCapable ? (PersistenceCapable)source : null; }
/** * Extracts the persistence capable instance from the source of the given event. * @return null if an instance can not be extracted. */ protected PersistenceCapable getPersistenceCapable(LifecycleEvent evt) { Object source = evt.getSource(); return source instanceof PersistenceCapable ? (PersistenceCapable)source : null; }
/** * Extracts the persistence capable instance from the source of the given event. * @return null if an instance can not be extracted. */ protected PersistenceCapable getPersistenceCapable(LifecycleEvent evt) { Object source = evt.getSource(); return source instanceof PersistenceCapable ? (PersistenceCapable)source : null; }
/** * Extracts the persistence capable instance from the source of the given event. * @return null if an instance can not be extracted. */ protected PersistenceCapable getPersistenceCapable(LifecycleEvent evt) { Object source = evt.getSource(); return source instanceof PersistenceCapable ? (PersistenceCapable)source : null; }
public void afterStore(LifecycleEvent lifecycleEvent) { postUpdate(lifecycleEvent.getSource()); } }
public void beforeStore(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); final EntityBean bean = (EntityBean) lifecycleEvent.getSource(); if (!creating.get().contains(bean)) { cmpCallback.ejbStore(bean); } }
public void beforeStore(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); final EntityBean bean = (EntityBean) lifecycleEvent.getSource(); if (!creating.get().contains(bean)) { cmpCallback.ejbStore(bean); } }
public void beforeStore(LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); EntityBean bean = (EntityBean) lifecycleEvent.getSource(); if (!creating.get().contains(bean)) { cmpCallback.ejbStore(bean); } }
public void afterAttach(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); final Object bean = lifecycleEvent.getSource(); cmpCallback.setEntityContext((EntityBean) bean); }
public void afterAttach(LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); Object bean = lifecycleEvent.getSource(); cmpCallback.setEntityContext((EntityBean) bean); }
public void afterAttach(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); final Object bean = lifecycleEvent.getSource(); cmpCallback.setEntityContext((EntityBean) bean); }
public void beforeDelete(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); try { final Object bean = lifecycleEvent.getSource(); cmpCallback.ejbRemove((EntityBean) bean); } catch (final RemoveException e) { throw new PersistenceException(e); } }
public void afterDetach(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); // todo detach is called after ejbRemove which does not need ejbPassivate final Object bean = lifecycleEvent.getSource(); cmpCallback.ejbPassivate((EntityBean) bean); cmpCallback.unsetEntityContext((EntityBean) bean); }
public void afterDetach(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); // todo detach is called after ejbRemove which does not need ejbPassivate final Object bean = lifecycleEvent.getSource(); cmpCallback.ejbPassivate((EntityBean) bean); cmpCallback.unsetEntityContext((EntityBean) bean); }
public void afterDetach(LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); // todo detach is called after ejbRemove which does not need ejbPassivate Object bean = lifecycleEvent.getSource(); cmpCallback.ejbPassivate((EntityBean) bean); cmpCallback.unsetEntityContext((EntityBean) bean); }
public void beforeDelete(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); try { final Object bean = lifecycleEvent.getSource(); cmpCallback.ejbRemove((EntityBean) bean); } catch (final RemoveException e) { throw new PersistenceException(e); } }
public void beforeDelete(LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); try { Object bean = lifecycleEvent.getSource(); cmpCallback.ejbRemove((EntityBean) bean); } catch (RemoveException e) { throw new PersistenceException(e); } }
public void afterLoad(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); final Object bean = lifecycleEvent.getSource(); // This may seem a bit strange to call ejbActivate immedately followed by ejbLoad, // but it is completely legal. Since the ejbActivate method is not allowed to access // persistent state of the bean (EJB 3.0fr 8.5.2) there should be no concern that the // call back method clears the bean state before ejbLoad is called. cmpCallback.setEntityContext((EntityBean) bean); cmpCallback.ejbActivate((EntityBean) bean); cmpCallback.ejbLoad((EntityBean) bean); }
public void afterLoad(final LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); final Object bean = lifecycleEvent.getSource(); // This may seem a bit strange to call ejbActivate immedately followed by ejbLoad, // but it is completely legal. Since the ejbActivate method is not allowed to access // persistent state of the bean (EJB 3.0fr 8.5.2) there should be no concern that the // call back method clears the bean state before ejbLoad is called. cmpCallback.setEntityContext((EntityBean) bean); cmpCallback.ejbActivate((EntityBean) bean); cmpCallback.ejbLoad((EntityBean) bean); }
public void afterLoad(LifecycleEvent lifecycleEvent) { eventOccurred(lifecycleEvent); Object bean = lifecycleEvent.getSource(); // This may seem a bit strange to call ejbActivate immedately followed by ejbLoad, // but it is completely legal. Since the ejbActivate method is not allowed to access // persistent state of the bean (EJB 3.0fr 8.5.2) there should be no concern that the // call back method clears the bean state before ejbLoad is called. cmpCallback.setEntityContext((EntityBean) bean); cmpCallback.ejbActivate((EntityBean) bean); cmpCallback.ejbLoad((EntityBean) bean); }