AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

newbie Transactions

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JavaBeans
View previous topic :: View next topic  
Author Message
Tomer Ben-David
Guest





PostPosted: Wed Jul 23, 2003 6:00 pm    Post subject: newbie Transactions Reply with quote



Hi

Im wondering...using container managed transactions...

I know i should use the session facade but what if my client uses two
entity beans

client: lets update user A
so its calling these two guys:

UserEntityEJB
{
updating user A...
}
UserInfoEntityEJB
{
updating user A
oppss some exception
rolling back
but what about UserEntityEJB? how will it roll back ? Sad
}

so what is happening in that case? whats the use of container managed
transactions in that scenario?

Thanks In advance,

Tomer
Back to top
Tomer Ben-David
Guest





PostPosted: Thu Jul 24, 2003 6:17 am    Post subject: Re: newbie Transactions Reply with quote



Thanks, this has completely answered what I wondered about...

"Nick" <Nick.Ivanov (AT) iname (DOT) com> wrote

Quote:
What's the use of container managed transactions in that scenario?
Not much.

If your client calls the entity beans separately then each call will
be done in a separate transaction.

You should indeed use a facade and from there make the two calls.
Or you could invoke update in one entity bean and then have that
method invoke the other entity bean's update user method.

I hope I have interpreted what you have asked correctly. What you
have written is not very precise. Actual methods would have been
clearer.

Hope this helps.



"Tomer Ben-David" <tomerbd (AT) barak-online (DOT) net> wrote in message
news:161d1c31.0307231000.1b0936f1 (AT) posting (DOT) google.com...
Hi

Im wondering...using container managed transactions...

I know i should use the session facade but what if my client uses two
entity beans

client: lets update user A
so its calling these two guys:

UserEntityEJB
{
updating user A...
}
UserInfoEntityEJB
{
updating user A
oppss some exception
rolling back
but what about UserEntityEJB? how will it roll back ? Sad
}

so what is happening in that case? whats the use of container managed
transactions in that scenario?

Thanks In advance,

Tomer

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JavaBeans All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.