Code: Select all
...
5. Context ctx = new InitialContext();
6. MyBean bean = (MyBean) ctx.lookup("test/MyBean/local");
8. bean.add(10);
9. bean.add(20);
10. bean.add(30);
11. System.out.println(bean.getTotal()); //prints 60
...
Moderators: Site Manager, fjwalraven
Code: Select all
...
5. Context ctx = new InitialContext();
6. MyBean bean = (MyBean) ctx.lookup("test/MyBean/local");
8. bean.add(10);
9. bean.add(20);
10. bean.add(30);
11. System.out.println(bean.getTotal()); //prints 60
...
Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests