This is an EJB question (not really JBoss specific)...

I have a entity (cmp) bean which is just a simple sequence number generator. 
Its one fancy feature is that with each request it blocks-off a series of 
numbers for the client.

What I am trying to do is wrap the access to the entity bean in a utility 
class (SequenceHolder) which simply returns the next sequence number from the 
block that it got from the entity bean.  When it has used up all that were in 
the block it will request a new block from the entity bean.  This should 
greatly reduce the number of accesses to the entity bean at the cost of some 
skipped/wasted numbers.

In general this is simple enough - but I want the same utility class to be 
able to be used on the server (as a utility to other EJB's) and on the client.

How do I go about setting up the state of SequenceHolder so that 
 a) its access to the entity bean will work from both the server and the 
client
 b) it can be created on the server and serialized back to the client?

I know this is general EJB stuff, but at my current level it seems quite 
tricky, and I still have a muddy (at best) understanding of the allowed uses 
of bean/home/remote references after all the book/docs I've read.

Any help, examples, or RTFM's are appreciated!

Thanks in advance
Mike.

===================
Mike Finn
Tactical Executive Systems
[EMAIL PROTECTED]

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to