|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.lyophil.ejb.ejbbeans.IdentifierSourceEJBBean
This session bean wraps an IdentifierSource and puts all calls to that IdentifierSource inside their own transactions. This design keeps the same identifier from getting used twice.
Field Summary | |
private javax.ejb.SessionContext |
ctx
|
private IdentifierSource |
idSource
|
Constructor Summary | |
IdentifierSourceEJBBean()
|
Method Summary | |
boolean |
checkSetUp()
make sure the backing storage is set up correctly |
java.io.Serializable |
createID()
Return a new identifier Object. |
void |
ejbActivate()
|
void |
ejbCreate()
|
protected java.lang.Object |
ejbCreateGuts(java.lang.String className)
This method constructs the "guts" object for this Session bean. |
void |
ejbPassivate()
|
void |
ejbRemove()
|
java.io.Serializable |
peekNextID()
Returns the next id to be created, without assigning it as in use. |
void |
setSessionContext(javax.ejb.SessionContext context)
|
void |
setUp()
set up the backing storage |
void |
tearDown()
clean up the backing storage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private IdentifierSource idSource
private javax.ejb.SessionContext ctx
Constructor Detail |
public IdentifierSourceEJBBean()
Method Detail |
protected java.lang.Object ejbCreateGuts(java.lang.String className) throws javax.ejb.CreateException
public void ejbCreate() throws javax.ejb.CreateException
public void setSessionContext(javax.ejb.SessionContext context)
setSessionContext
in interface javax.ejb.SessionBean
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public java.io.Serializable createID()
an
- IdentifierUnavailableException if the IdentifierSource can't get a new unique Object.a
- LastIdentifierUsedException if the IdentifierSource is completely out of unique Objects.public java.io.Serializable peekNextID()
public boolean checkSetUp()
<{PersistenceFailureException}>
public void setUp()
<{PersistenceFailureException}>
public void tearDown()
<{PersistenceFailureException}>
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |