Hi,
I'm running JoNAS on a Mac. The server is up and running and I have built
and am running the session EJB sample code.
When I run the client application, OpClient, the call to utx.begin() does
not appear to do anything. If I turn on tracing, I do not see the trace
message from the server indicating a call to begin(). Furthermore, I see
trace messages stating that a new transaction has been started for buy()
because none was in progress.
Looking at the source code, it appears that the UserTransaction interface
is implemented in the Current class, but the Current class does not
implement Remote. Is the client merely calling into its local copy of
Current returned by lookup(). If so, is this a bug or a misunderstanding
on my part.
Also, I think I found a bug in the OpBean.java class in this sample code.
Shouldn't the conditional in the afterCompletion() method have an 'else'
clause? Specifically:
public void afterCompletion(boolean committed) throws RemoteException
{
if (committed)
total = newtotal;
else
newtotal = total; // set newtotal to rolled back total to
handle read() outside of transaction
}
Thank you for your help.
- Mike Rubin
- Modulo Systems Corporation