"Blumreiter, Fa. Westernacher, IIPS, B" wrote:
> 
> 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

Hi Torsten,
we knew that with the last version of Jeremie there is the following
bug:
if you try to access to session bean previously removed 
you will receive org.omg.CORBA.OBJECT_NOT_EXIST:   minor code: 0 
completed: No
instead of ObjectNotFound exception
we have signaled the problem to the Jonathan guys and are waiting for a
fix.
But the problem you raises seems to be  slightly different but it
seems  to confirm that there is a problem in Jeremie.
-- 
        Philippe

Philippe Coq  Evidian   Phone: (33) 04 76 29 78 49
Bull S.A  - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
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