I believe if you throw a checked exception from your method you will need to
set rollback, if you throw an unchecked exception like EJBException the
container should rollback the transaction for you.

Section 12.2.2 of the EJB 1.1 spec clearly states -

The Container catches a non-application exception, logs it (which can result
in alerting the System
Administrator), and throws the java.rmi.RemoteException (or subclass
thereof) to the client.
The Bean Provider can rely on the Container to perform the following tasks
when catching a non-appli-cation
exception:

. The transaction in which the bean method participated will be rolled back.
. No other method will be invoked on an instance that threw a
non-application exception.

As for the settings I really am not familiar with weblogic stuff, you'll
need to read the docs to figure out if it's misconfigured.

Other issues to consider, where does it load the helper DAO object from, the
jar file or the system classpath?  How do you get the connection (somebody
else mentioned you want a DataSource from weblogic's connection pool I
think)?

Cheers
Jay Walters

-----Original Message-----
From: Kondaskar Yogesh [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 3:02 AM
To: [EMAIL PROTECTED]
Subject: Re: Container Managed Transactions in Entity Beans


Hi Pooja,

I think u r missing soimething here. When you catch an
Exception you need to do an explicit rollback on the
Context.

I hope this takes care of your problem.

Cheers,

--- Pooja Keswani <[EMAIL PROTECTED]> wrote:
> Hi Jay,
>
> I m using oracle database, weblogic5.1,oracle
> driver.
> is there any option for autocommit? pls tell me if u
> know about it.
>
> cheers
>  Pooja
>
>
> On Fri, 19 January 2001, Jay Walters wrote:
>
> >
> > Pooja,
> >
> > What server, database and JDBC drivers are you
> using?  This almost sounds
> > like autocommit is on for the connection to the
> database.
> >
> > Cheers
> > Jay Walters
> >
> > -----Original Message-----
> > From: G Ramasubramani
> [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 19, 2001 3:28 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Container Managed Transactions in
> Entity Beans
> >
> >
> > Pooja,
> >
> >         Could you post the relevant part of the
> code in ejbCreate which
> > catches  the SQL exception and then rethrows a EJB
> Exception? Also the
> > deployment files for the entity?
> >
> > Rama
> >
> > Pooja Keswani wrote:
> >
> > > Hi Reddy,
> > >  I would like to give u more information about
> the problem so that it will
> > be easier for u to understand it exactly. i m
> using entity bean  which has
> > container managed transcation. This ejb has one
> helper class(DAO) for
> > database transactions . ejb calls DAO's create
> method in its ejbcreate
> > method. now DAO's create method calls one more
> method named
> > insertIndividual() which actually updates the D/B
> ie it executes 3 insert
> > queries. Now if SQL exception occures in this
> method, it throws it to create
> > of DAO and then to ejbcreate of ejb which will
> throw the EJBexception
> > causing rollback . but it is not doing this way.
> Actually it says
> > transaction rolled back. but doesn't undo changes
> in D/B.
> > > what must be happening?
> > > I will appreciate ur reply.
> > > thanks
> >
> >
>
********************************************************************
> >
> >      I've got plenty of common sense. I just
> choose to ignore it.
> >
>   - Calvin
> >
>
********************************************************************
> >
> >
>
===========================================================================
> > 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".
>
>
> Chequemail.com - a free web based e-mail service
> that also pays!!!
> http://www.chequemail.com
>
>
===========================================================================
> 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".
>


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

===========================================================================
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