net.walend.lyophil.ejb.ejbbeans
Interface IdentifierSourceEJB

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface IdentifierSourceEJB
extends javax.ejb.EJBObject


Method Summary
 boolean checkSetUp()
          make sure the backing storage is set up correctly
 java.io.Serializable createID()
          Return a new identifier Object.
 java.io.Serializable peekNextID()
          Returns the next id to be created, without assigning it as in use.
 void setUp()
          set up the backing storage
 void tearDown()
          clean up the backing storage
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

createID

public java.io.Serializable createID()
                              throws java.rmi.RemoteException
Return a new identifier Object. The Object should be immutable and unique inside the system. Longs or RMI identifiers are a good choice. Your implementation should periodically log information about how quickly it's using up unique identifiers.

Throws:
IdentifierUnavailableException - if the IdentifierSource can't get a new unique Object.
LastIdentifierUsedException - if the IdentifierSource is completely out of unique Objects.
java.rmi.RemoteException

peekNextID

public java.io.Serializable peekNextID()
                                throws java.rmi.RemoteException
Returns the next id to be created, without assigning it as in use. I use this method for testing.


checkSetUp

public boolean checkSetUp()
                   throws java.rmi.RemoteException
make sure the backing storage is set up correctly

Throws:
PersistenceFailureException
java.rmi.RemoteException

setUp

public void setUp()
           throws java.rmi.RemoteException
set up the backing storage

Throws:
PersistenceFailureException
java.rmi.RemoteException

tearDown

public void tearDown()
              throws java.rmi.RemoteException
clean up the backing storage

Throws:
PersistenceFailureException
java.rmi.RemoteException


Copyright (c) 2000, 2001, David Walend