> Gary,
> 
> I agree that EJB can be overkill in some instances.  I wanted to use
> transactions in my COR solution so I did some cool stuff with
> commons-chain.  I used the "Filter" object (extends Command) which
> guarantees that its postprocess method will be called if its execute
> method is called.  I created a Filter class that I called Transaction.
> 
> In the execute method I create a Stack object and put it in the chain
> context.  I also push an instance of 'this' onto that stack.  This is
> so if you have multiple chains with a Transaction in the chain, you
> can make sure they are all finished before you commit the transaction.
>  You would of course pop these references in the postprocess command.
> 
> In the final postprocess command (you know its final because the stack
> is now empty), you can commit the transactions.  I combined this with
> ThreadLocal so that I could have database transactions with connection
> pooling without the rest of the hassle of EJB.
> 
> Maybe you could do something like this.
> 

That's good idea using the Shale filter commands.  Seems like a great place to 
capture state at a page level and if the managed beans are defined in request 
scope, you wouldn't have to clone the object before pushing on the context 
stack. 


> sean
> 

Gary




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to