Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ubueng1a;
- import java.util.*;
- import javax.ejb.EJB;
- import javax.naming.*;
- import pack1.NeueSessionBeanRemote;
- public class Ubueng1a {
- @EJB
- protected static NeueSessionBeanRemote hw;
- public static void main(String[] args) {
- // TODO code application logic here
- try {
- Properties prop = new Properties();
- prop.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
- InitialContext ic = new InitialContext(prop);
- hw = (NeueSessionBeanRemote) ic.lookup("pack1.NeueSessionBeanRemote");
- System.out.println("Result: " + hw.addiere(5, 6));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement