I'll put together a little sample and look into this. By my reading of
the spec, you should be able to call into the bean (even the same
instance) after you call setRollbackOnly and throw an application
exception. Even if that weren't legal, locking-waiting would not be what
we'd want to see. 

-danch

Achim Demelt wrote:
> 
> > What version of JBoss is this?
> >
> 
> 2.2  binary distribution w/ tomcat 3.2.1
> 
> > The Classification that's being passed in is null, correct? Otherwise
> > commenting out the call to setRollbackOnly should have no effect.
> >
> 
> Yes, it's null. Oops, I see I've copied the wrong method into the email, but
> anyway, all three methods (setClassification, setStatus, setType) have a
> similar implementation, and are all called with null arguments. So
> setRollbackOnly is definitely called.
> 
> > The test client calls the entity directly (not through a session
> > wrapper), correct?
> >
> 
> Correct.
> 
> Achim
> 
> > -danch
> >
> > Achim Demelt wrote:
> > >
> > > hi,
> > >
> > > I have a CMP entity bean and a simple test client. one of the bean
> methods
> > > is
> > >
> > > public void setClassification(Classification param) throws
> > > LocalizedAppEventException {
> > >   if (param == null) {
> > >     ctx.setRollbackOnly();
> > >     throw new
> > > LocalizedAppEventException("isis.masterdata.invalidClassification");
> > >   }
> > >   this.classification = param.intValue();
> > > }
> > >
> > > the client calls this method and another one, which is more or less
> > > identical to the one above:
> > >
> > > try {
> > >   spec.setStatus(null);
> > > }
> > > catch (LocalizedAppEventException e) {
> > >   // that's ok, ignore
> > > }
> > >
> > > try {
> > >   spec.setType(null);
> > > }
> > > catch (LocalizedAppEventException e) {
> > >   // that's ok, ignore
> > > }
> > >
> > > the first invocation is OK, the exception is thrown. on the second
> > > invocation, though, the client hangs. the server produces this line in
> the
> > > log file:
> > >
> > > [Specification] LOCKING-WAITING (TRANSACTION) for id
> > > com.tiscon.isis.masterdata.ejb.SpecificationPK@1e ctx.hash 2721646
> > > tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=c197//81,
> BranchQual=]
> > >
> > > As far as I've understood earlier postings in the list, this message
> usually
> > > occurs in case of a deadlock with non-reentrant beans. OK, my bean *is*
> > > non-reentrant, but there is only one client thread, and, obviously, no
> > > callbacks. If I uncomment the call to setRollbackOnly() everything works
> > > fine. What's the problem here?
> > >
> > > Thanks,
> > >   Achim
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > Confidential e-mail for addressee only.  Access to this e-mail by anyone
> else is unauthorized.
> > If you have received this message in error, please notify the sender
> immediately by reply e-mail
> > and destroy the original communication.
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
Confidential e-mail for addressee only.  Access to this e-mail by anyone else is 
unauthorized.
If you have received this message in error, please notify the sender immediately by 
reply e-mail 
and destroy the original communication.


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to