[jboss-user] [EJB 3.0] - Re: Help!! Failed to call remote methods in jboss 4. (EJB3,

MyNameIsDaniel do-not-reply at jboss.com
Mon Sep 29 07:36:56 EDT 2008

oooops!!! Fogot to give the code.
The code of EJB is totally ok. Here're some codes of the Swing client:

package ejbtest;

import java.util.*;
import javax.naming.*;
import com.foshanshop.ejb3.HelloWorld;

public class RemoteString {
public static String getRemoteString(String name,String url) throws Exception{
        Properties props = new Properties();        
        props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
        props.setProperty("java.naming.provider.url", url + ":1099");
        InitialContext ctx = new InitialContext(props);
        HelloWorld helloworld = (HelloWorld)ctx.lookup("HelloWorldBean/remote");
        return helloworld.SayHello(name);

*A part of the codes for Swing, mouse event:
public void mouseReleased(MouseEvent arg0) {
String info[] = textField.getText().split(":");
catch(Exception e){textArea.setText(e.getMessage());}

I repeat: the SwingEJBTest.JAR ran well on the server computer, 
but not in other ones.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179333#4179333

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179333

More information about the jboss-user mailing list