Hi,

I have the following setup:

Client ---->  EJB on Server1  ---> EJB on Server2

>From the client, I can call the EJB on either server.

When Server1 is the same as server2, the following works
like a charm:

public class HelloBean implements javax.ejb.SessionBean {
   [....]

   public String remoteHello() {
        Properties p = new Properties();
        
        p.put("java.naming.factory.initial", 
            "org.jnp.interfaces.NamingContextFactory");
        p.put("java.naming.provider.url", "192.168.100.146:1099");
        p.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");

        HelloHome hh;
        try {
            InitialContext ic = new InitialContext(p);
            System.out.println("Got an initial Context");
            
            Object o = ic.lookup("ejb/Hello");            
            System.out.println("Found the ejb");
            //hh = (HelloHome)o;
            hh = (HelloHome) PortableRemoteObject.narrow(o,
HelloHome.class);
            System.out.println("Casted the home object; this is: " + hh);
        }
        catch (Exception e) {
            System.err.println("Lookup of ejb failed: " + e.toString());
            return ("HelloException: " + e.toString());
        }
                  
        try {
            System.out.println("Creating the hello object");
            Hello h = hh.create();
            System.out.println("Created the hello object");
            System.out.println("Hello returned: " + h.sayHello());
            System.out.println("Hello2 returned: " +h.sayHello2("Heiko"));
       } 
        catch (Exception e) {
            System.err.println("bla bla failed .. " + e.toString());
            return ("Hello Home Exception: "+ e.toString());
        }        
        return "";
}
[....]

If the called EJB is on a different server, I get

15:12:58,908 ERROR [STDERR] bla bla failed .. java.rmi.MarshalException:
error marshalling arguments; nested exception is:
        java.io.NotSerializableException: org.jboss.tm.TransactionImpl


JBoss is 3.0.6 with either all or default config.

What am I missing here?

Thank you
  Heiko


-- 
Bancotec GmbH      EMail: [EMAIL PROTECTED]
Calwer Str. 33     Telefon: +49 711 222 992 900
D-70173 Stuttgart  Telefax: +49 711 222 992 999
Ein Unternehmen der Cellent AG http://www.cellent.de/


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to