Advertisement
Guest User

jee

a guest
Oct 13th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. public class Main extends AbstractTestAgency{
  2.  
  3. @EJB
  4. static CarRentalSessionRemote rsvSession;
  5. @EJB
  6. static ManagerSessionRemote mgrSession;
  7. // /**
  8. // * @param args the command line arguments
  9. // */
  10. // public static void main(String[] args) {
  11. // System.out.println("found rental companies: "+session.getAllRentalCompanies());
  12. // }
  13.  
  14. public Main(String scriptFile) {
  15. super(scriptFile);
  16. }
  17.  
  18. @Override
  19. protected Object getNewReservationSession(String name) throws Exception {
  20. InitialContext context = new InitialContext();
  21. return (CarRentalSessionRemote) context.lookup(CarRentalSessionRemote.class.getName());
  22. }
  23.  
  24. @Override
  25. protected Object getNewManagerSession(String name, String carRentalName) throws Exception {
  26. InitialContext context = new InitialContext();
  27. return (ManagerSessionRemote) context.lookup(ManagerSessionRemote.class.getName());
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement