users@glassfish.java.net

Re: app-client + jaas + swing = I am confused

From: <glassfish_at_javadesktop.org>
Date: Fri, 23 May 2008 08:50:54 PDT

Hi, Dan.

Thanks for attaching the example. That helped expose what I think is the problem.

A few notes:

1. I saw failures with the client as you posted it running with [b]both[/b] the appclient script and with Java Web Start.

2. I am not sure that the client-side ORB supports multiple concurrent outbound calls. I set the loop to iterate one time, and I would still see occasional errors from the ORB but not reliably - sometimes all invocations of the various EJBs would work and sometimes I'd see error messages after I clicked OK. But even within the same run of the client a subsequent OK click might result in all successful calls.

If the ORB does not support multiple concurrent calls, then the thread scheduling in the VM and the OS could vary enough to allow some iterations of the test to succeed while others fail. I strongly suspect that the errors occurred when multiple threads tried to use some of the same ORB code at the same time.

You may have seen this only under Java Web Start due to similar sorts of thread scheduling oddities that were hidden for some reason in your appclient tests.

OK, so if that's the problem what is there to do about it?

You may not like the sound of this, but you may need to serialize the remote EJB invocations from your client, making sure that the remote calls occur only one at a time. Or, can you restructure the client so that it does not rely on different threads to invoke the EJBs? Without knowing more about your app it's hard to know exactly what to suggest.

I hope this helps. Please let us know what you decide to do.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=276333