Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main extends AbstractTestAgency{
- @EJB
- static CarRentalSessionRemote rsvSession;
- @EJB
- static ManagerSessionRemote mgrSession;
- // /**
- // * @param args the command line arguments
- // */
- // public static void main(String[] args) {
- // System.out.println("found rental companies: "+session.getAllRentalCompanies());
- // }
- public Main(String scriptFile) {
- super(scriptFile);
- }
- @Override
- protected Object getNewReservationSession(String name) throws Exception {
- InitialContext context = new InitialContext();
- return (CarRentalSessionRemote) context.lookup(CarRentalSessionRemote.class.getName());
- }
- @Override
- protected Object getNewManagerSession(String name, String carRentalName) throws Exception {
- InitialContext context = new InitialContext();
- return (ManagerSessionRemote) context.lookup(ManagerSessionRemote.class.getName());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement