Hi,

it seems that I have found a bug which it pretty easy to reproduce:

try the following code:

import java.io.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;

import java.rmi.*;

public class Stresstest1 extends Thread
{
        private String jndiNameDispatcher = "dispatcher";
        private String url;     
        
        
        //Argument 1 ist die url des AppServers
        public static void main(String argv[])
        {
                for(int i = 0; i < 10; i++) {
                        Thread stresstest = new Stresstest1(argv[0]);
                        System.out.println("Thread: " + i);
                        stresstest.start();
                        try { Thread.sleep(100); } catch(Exception e) {}
                }
                
        }       

        
        
        public Stresstest1(String urlParam)
        {
                url = urlParam;
        }
        
        public void run() {
        
                DispatcherHome home;
                Dispatcher disp;
        
                Properties env = new Properties();
                env.put("java.naming.factory.initial",
"org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextFactory
");
        env.put(Context.PROVIDER_URL, url);

                // get JNDI initial context
                Context initialContext = null;
                try {
                // get JNDI initial context
                    initialContext = new InitialContext(env);
                home =
(DispatcherHome)javax.rmi.PortableRemoteObject.narrow(
                        initialContext.lookup( jndiNameDispatcher ),
DispatcherHome.class);
                disp = home.create(null);
                        System.out.println ("Dispatcher ID:" +
disp.hashCode());
                        disp.remove();
                }
        catch (NamingException ne) {
            System.out.println( "NamingException: " + ne);
        }
        catch (java.rmi.RemoteException re) {
            System.out.println( "RemoteException: " + re);
        }
        catch (javax.ejb.CreateException ce) {
            System.out.println( "CreateException: " + ce);
        }
        catch (javax.ejb.RemoveException ve) {
            System.out.println( "RemoveException: " + ve);
        }
        }
}

You need a stateful session bean with no bussiness-methods. Start the client
application several times. The virtual machine will assign the same hashcode
to the bean instances. If the bean has been removed by calling the
remove()-method and a new instance of the client application creates a new
bean, the following exception is (sometimes) thrown:

RemoteException: java.rmi.MarshalException: error during
marshalling/unmarshalling by stub; nested exception is: 
        org.omg.CORBA.OBJECT_NOT_EXIST:   minor code: 0  completed: No


It seems to occur when the client ejb-instance has by accident the same
hashcode as in a client run before. I hope I made it somehow clear. 

If the remove()-method is not called by the client, this error does not
occur. 

Thanks

Torsten
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to