Murali,
This looks like a vendor specific question, but since you didn't specify
who's app server you were using, you might escape the wrath of the forum :^)

I would guess that you are trying (accidently) to invoke a two phase commit
when your app server is either incapable, not configured properly, or your
JDBC drivers are not capable.  When you are invoking two entity beans, I
believe you are inadvertantly using two separate JDBC connections.  When you
try to commit, the app server is trying to do a distributed transaction
across both, even though they may be to the same back-end database.

Look in your app server docs.  There may be some switch or trick you need to
ensure that both beans use the same JDBC connection.  Certainly co-location
in the same server VM would be required.

Dave

David Brown
Technical Director, Western Operations
GemStone Systems, Inc.
(760)510-2754
[EMAIL PROTECTED]
www.gemstone.com


-----Original Message-----
From: B.V.Murali Krishna [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 20, 2000 8: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".

Reply via email to