public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nicolas Geoffray <nicolas.geoffray@menlina.com>
To: mauve-discuss@sourceware.org
Subject: tests with rmic
Date: Mon, 17 Oct 2005 17:13:00 -0000	[thread overview]
Message-ID: <4353DBB0.10807@menlina.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

Hi everyone,

I found what might be a bug in gnu classpath and I would like to commit 
a testlet in mauve. The thing is, my test involves compiling with rmic 
and launching two gnu classpath jvms. I never commited in mauve, but 
seeing other testlets, i didn't found ways to commit such a test.

I attached the files. This is how you launch the test:

gcj -C Main.java
gcj -C ReceiveObject.java
gcj -C ReceiveObjectImpl.java
rmic ReceiveObjectImpl

rmiregistry &
jamvm ReceiveObjectImpl &
jamvm Main


Any suggestions?

Thanks,
Nicolas

[-- Attachment #2: Main.java --]
[-- Type: text/x-java, Size: 443 bytes --]

import java.rmi.Naming;

public class Main{

  class Foo implements java.io.Serializable{}

  class Bar implements java.io.Serializable{
    Foo f = new Foo();
  }
    
  public static void main(String[]args){

    try{
      Bar b = new Bar();
      ReceiveObject ref = (ReceiveObject) Naming.lookup("rmi://localhost/ReceiveObject");
      ref.receiveObject(b);
    }catch(Exception e){
      System.out.println("Error : " + e );
    }
  }
}

[-- Attachment #3: ReceiveObject.java --]
[-- Type: text/x-java, Size: 179 bytes --]

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface ReceiveObject extends Remote{
  public Object receiveObject(Object unknown)
		throws RemoteException;
}

[-- Attachment #4: ReceiveObjectImpl.java --]
[-- Type: text/x-java, Size: 535 bytes --]

import java.rmi.*;
import java.rmi.server.*;


public class ReceiveObjectImpl extends UnicastRemoteObject implements ReceiveObject{

  public ReceiveObjectImpl() throws RemoteException{
  }

  public Object receiveObject(Object unknown)
    throws RemoteException{
      System.out.println(unknown);
      return null;
    }

  public static void main(String[] args){
    try{
      ReceiveObject ref = new ReceiveObjectImpl();
      Naming.rebind("ReceiveObject", ref);
    }catch(Exception e){
      e.printStackTrace();
    }
  }
}

             reply	other threads:[~2005-10-17 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 17:13 Nicolas Geoffray [this message]
2005-10-18  2:37 ` Chris Abbey
2005-10-18  8:41 ` tests with rmic! Meskauskas Audrius
2005-10-18 11:47   ` Nicolas Geoffray
2005-10-18 18:10     ` tests with rmic Meskauskas Audrius
2005-10-19  8:10 Nicolas Geoffray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4353DBB0.10807@menlina.com \
    --to=nicolas.geoffray@menlina.com \
    --cc=mauve-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).