public interface ReadyEntityCache
Modifier and Type | Method and Description |
---|---|
void |
create(EntityBeanComponentInstance instance)
Called after an entity bean has been created and associated with a new identity.
|
void |
discard(EntityBeanComponentInstance instance)
Discard the object, called when an exception occurs
|
EntityBeanComponentInstance |
get(Object key)
Gets an entity bean instance for the given primary key.
|
void |
release(EntityBeanComponentInstance instance,
boolean transactionSuccess)
Release the object from use.
|
void |
start()
Start the cache.
|
void |
stop()
Stop the cache.
|
void create(EntityBeanComponentInstance instance)
instance
- The new instanceEntityBeanComponentInstance get(Object key) throws javax.ejb.NoSuchEntityException
release(org.jboss.as.ejb3.component.entity.EntityBeanComponentInstance, boolean)
Implementors of this method must ensure that repeated calls to get within the same transaction
return the same instance for a given primary key. This must also take into account entity beans
created in the same transaction using the create(org.jboss.as.ejb3.component.entity.EntityBeanComponentInstance)
method.
Implementations are free to use a 1 to 1 instance -> pk mapping, or create multiple instances per
primary key.key
- the identifier of the objectjavax.ejb.NoSuchEntityException
- if the object identity association failedvoid release(EntityBeanComponentInstance instance, boolean transactionSuccess)
instance
- The entitytransactionSuccess
- True if the transaction succeededvoid discard(EntityBeanComponentInstance instance)
instance
- The instance to discardvoid start()
void stop()
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.