Lennart,
Are you creating the initial context in one thread and then looking
up home
objects through it from a different thread? I suspect that your
GUI actions
use worker threads. If that is the case, here is the solution. Before
instantiating your context set the following property (the only
client-side
property with Ejipt) as shown:
System.setProperty("ejipt.sessionScope", "vm");
It is important that the property is set before any connections to
the
server are made. This property controls how login credentials are
propagated
from the client to the server. The default case is "thread" meaning
that
only calls originating from the instantiating thread are considered
logged
in. Calls from other threads will get the "access disallowed" exception.
This is required if you use Ejipt with multi-threaded clients (e.g.
servlets). In your case, when the entire GUI will be considered
"one"
client, regardless of how many threads it uses, the proper setting
is "vm".
This means that, once a thread logged in, all threads in the process
are
considered logged in. The third setting is "thread_group".
Hope this helps,
Imre
Nick Lawson wrote:
Hi,I am using the Ejipt EJB server. Access to all resource management
facilities rely on the currently executing thread.
If you have a situation where your client logs in and is logged in on
the servers User Manager using the clients 'main' thread.
Then your client launches a Gui which accepts user actions triggering
remote methods on EJBs, then the requests originate from the clients
event-dispatching thread. The EJB server doesn't recognise these to come
from the same client that originally logged in.An obvious workaround is to ensure all requests orginate from the same
thread on the client - e.g. A dedicated proxy thread or the
event-dispatching thread itself using Swing's 'invokeAndWait' method.However, I just wondered if I'm missing something and if there's a
smarter way of doing this on the server ?Thanks,
Nick.
===========================================================================
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".
--
________________________________
Lennart Petersson
Benefit Partner AB
Bergendorffsgatan 5A
S-652 24 Karlstad
Phone: +46 (0)54 186800
mailto:[EMAIL PROTECTED]
http://www.benefit.se
===========================================================================
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".
