users@glassfish.java.net

Asynchrous calls throws sometimes CORBA.NO_PERMISSION

From: <glassfish_at_javadesktop.org>
Date: Sun, 25 Apr 2010 03:14:25 PDT

Hi all,

I have a problem with my enterprise application. I have a swing client, which calls sessionbeans on Glassfish server. In the GUI form is a tree, which contains nodes - entities from database. When user selects an node client loads from server the whole entity and children data(child nodes in the tree). This is done in a swingworker thread - doInBackground loads the objects in two calls (object and children) to one sessionbean and done() sets this objects into GUI. On Glassfish I'm using flexiblejdbcrealm. Everything works fine until the user clicks on the tree very fast (or uses arrows). The client creates more workerthreads and more parallel calls and sometimes glassfish returns AccessException: CORBA NO_PERMISSION. When I unsecure the bean, no exception is thrown, but this is unexceptable.

In the GUI forms, where nodes don't have children (there is only one call in the worker thread), has this exception never been thrown.

The call is made using lookup method:

synchronized private SessionRemote lookupSessionBean() {
        try {
            Context c = new InitialContext();
            return (SessionRemote) c.lookup("java:comp/env/SessionBean");
        } catch (NamingException ne) {
            Logger.getLogger(getClass().getName()).log(Level.SEVERE, "exception caught", ne);
        }
    }

I played with this method (adding synchornized, reusing Context, using single c.lookup(...) instead of calling this method,...), but nothing helped me.

My env : Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs), JDK1.6.0.20, Netbeans 6.8, Eclipselink 2.0.0, Windows XP.

Please, can anybody help me?

Thank you very much.

The expcetion:

java.util.concurrent.ExecutionException: javax.naming.NamingException: ejb ref resolution error for remote business interface xxx.yyy.SessionRemote [Root exception is java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
        org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
        at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:576)
        at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
        at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)

----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No]
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
        at java.util.concurrent.FutureTask.get(FutureTask.java:83)
...
[Message sent by forum member 'anaq']

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