Sorry, this is not an answer to your problem. But we have a similar problem.
An SQLException occurs during the update of an entity bean, because the
record has been locked by an other user in the database. The Exception can
be seen in the server trace output as a java.sql.SQLException, but neither
the session bean nor the client get the RemoteException. They still believe
everything went ok.
We are using an INFORMIX OnLine Dynamic Server version 7.3. The database is
in buffered lock mode. The error occurs both with TX_REQUIRED and with
TX_BEAN_MANAGED.
Any help will be appreciated.
Regards,
Albert Brotzer
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Gesendet am: Donnerstag, 28. Oktober 1999 14:17
> An: Jeremy Leicester
> Cc: [EMAIL PROTECTED]; Helene JOANIN
> Betreff: Re: Entity set() throws SQLException but never caught
>
> Jeremy Leicester wrote:
> >
> > I have an Entity Bean and a Session Bean.
> > The Session's method update() is called from client code.
> > Session.update() calls Entity.update() which does some set() methods on
> > the Entity.
> > A NOT NULL column in the database gets set to null from this call.
> >
> > The problem is that the Session.update() completes successfully without
> > catching the SQLException that is thrown. The client code sees that no
> > update was made but has no exception to notify it.
> >
> > How do you check to make sure that the store is successful when it
> > happens after
> > the code calling it has finished executing.
> >
> > Please reply to [EMAIL PROTECTED]
> >
> > Thanks!
>
> Hello Jeremy,
>
> I'm sorry but I need more information to fully understand what
> the problem is.
> - is the entity bean container managed persistence,
> or bean managed persistence ?
> - what is the type of the field ?
> - .....
> A part of the source code of the Entity.update() and Session.update()
> may be useful.
>
> However, I'm going to try to give a beginning of answer, in case of
> an entity with container bean managed.
> The code generated by the container tool for accessing the
> data in the relational database is 'surrounded' with the following
> try-catch statement:
> try {
> ... JDBC statement ...
> } catch (Exception e) {
> log the exception 'e'
> throw new RemoteException("....blabla.....", e);
> }
> (The java.sql.PreparedStatement method used is setNull() when a
> field of the bean is null.)
> So, if a SQLException is throwned by the JDBC driver,
> the Session.update() may catch a java.rmi.RemoteException with
> the SQLException as 'detail' variable value.
> Could you please have a look to the log of the server to check if
> an SQLException is catched ?
>
> Regards.
> --
> -=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> mailto:[EMAIL PROTECTED] http://www-frec.bull.com
> Phone: 33.4.76.29.73.53 Fax: 33.4.76.29.76.00
> Download our EJB Server JOnAS at http://www.bullsoft.com/ejb
> _______________________________________________________________
>