Hello,

I know that you experts will find this a stupid question, but i am asking me: 
Why can't I access an EJB3 Session Bean with just simple RMI. No additional 
libraries for JNDI and that stuff required. The client shouldn't know that it 
is accessing an EJB3 service. So the client would be as small as possible and 
independent of EJB3. Why can't an EJB3 client not simply look like that:

  | import java.rmi.Naming;
  | 
  | public class Client {
  |     public static void main(String[] args) {
  | 
  |         try {
  |             Hello service = (Hello) Naming.lookup("service/Hello");
  |             String response = service.sayHello();
  |             System.out.println("response: " + response);
  |         } catch (Exception e) {
  |             System.err.println("Client exception: " + e.toString());
  |             e.printStackTrace();
  |         }
  |     }
  | }
  | 

Best regards,
Alexander

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to