You might find reading the discussion of declarative transaction support in
any book on ejbs more enlightening than the flames this post is likely to
receive.  There's a free one (mastering ejbs) you can download from
theserverside.

david jencks

On 2002.09.19 18:49:59 -0400 taxali wrote:
> Hi,
> I have 2 Entity Beans and one Session Bean. One method
> in the session bean ("placeOrder") has to update two
> DIfferent DB tables (eg: customer wants to buy,
> therefore insert record into ORDER table and UPDATE a
> record in CURRENT_STOCK table). This method MUST
> perform BOTH these operations as *ONE* DB transaction
> to maintain DB integrity. How do I achieve this using
> CMP2.0 ???? (I have created the tables and modelled
> the relationships bet. them already, just not sure how
> to specify the transaction related stuff)
> 
> Also, if I use BMP then I'm hoping that this will be
> sufficient (put into ONE of the entity beans) :-
> con = getConnection()
> con.setAutoCommmit(false)
> *--CALL ENTITY EJB method 1 - create Order--*
> *--CALL ENTITY EJB method 2 - reduce current stock--*
> con.Commit()
> IS THE ABOVE ENUFF/OK?
> 
> THANKS A MILLION!!!
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to