Murali,
Do these two entity beans talk to the same database or a different database?
Its sounding to me like the container is attempting a distributed
transaction. Is this your intention? Is your app server capable? Is the
database capable?
Dave Wolf
Internet Applications Division
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of B.V.Murali Krishna
> Sent: Sunday, August 20, 2000 11:17 AM
> To: [EMAIL PROTECTED]
> Subject: Problem in Transaction Handling
>
>
> HI all,
> I am calling a function of Stateless Session Bean in which i
> am writing
> the following code.
>
> UserTransaction tranx=null;
> tranx=sessionContext.getUserTransaction();
> tranx.begin();
>
> pJob = pJobHome.create(pendingJobId,descOfJob); //Inserting row in table
> using entity bean
>
> pRequest=pRequestHome.create(requestId,vin,laufId); //Inserting row in
> table
> using entity bean
>
>
> try
> {
> tranx.commit();
> }
> catch(Exception e)
> {
> System.out.println("Insertion of Record failed due to"+e);
> }
>
> The transaction in session bean is Bean managed and container managed in
> entity beans with transaction attributes as TX_REQUIRED
> It is giving the exception as Heuristic Rollback .
>
> If it is only with one entity bean it is fine. If i used two entity bean
> methods at that time the problem is coming.
> What all transaction attributes i have to set.
>
> Thanking in Advance,
>
>
>
>
>
> MURALI KRISHNA BALUSA
> VELOCIENT TECHNOLOGIES
> NEW DELHI.
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".