On 2002.09.05 14:30:10 -0400 Bruce Snyder wrote:
> This one time, at band camp, David Jencks said:
> 
> DJ>> If this is true, how can I expose UserTransactions out to a client
> so
> DJ>> that developers have the ability to start, stop or rollback
> transactions?
> DJ>
> DJ>1. (by far the best solution) rethink your architecture using an
> DJ>appropriate layering so the client doesn't explicitly control
> transaction
> DJ>boundaries.
> DJ>
> DJ>2. If (1) is impossible due to time constraints, use a client-side
> user
> DJ>transaction. IOW, look up the UserTransaction in the client.
> 
> I like option 1, but I'm not sure if this can be achieved. I have a
> requirement that says a developer needs to have the ability to begin a
> transaction, do a bunch of work and commit the work or roll back all the
> work.
> Maybe this can be achieved using xa transactions? 

xa has nothing to do with this.  If your requirement is for long lasting
interactive transactions, you need to do (2) or (I should have thought of
this before) use stateful session beans, which should work with your
current method calls.
> 
> Option 2 is certainly doable, but I really don't like the idea of a
> client
> performing JNDI lookups. In my mind that seems to violate boundaries
> (but, of
> course, I could be wrong). 

Don't you do jndi lookups to find the session home?

A stateful session bean is probably a better idea since I think you could
figure out a way to rollback transactions that have remained open too long
(like maybe the client crashed, user went to lunch, etc). If you can
guarantee that the client will really end the tx, I don't see much
difference between a client side ut or a stateful session bean that does
the same operations.

david jencks

> 
> Bruce
> -- 
> perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to