Package com.titan.travelagent

Examples of com.titan.travelagent.TravelAgentRemote


              
           TravelAgentHomeRemote home = (TravelAgentHomeRemote)
               PortableRemoteObject.narrow(ref,TravelAgentHomeRemote.class)
       

           TravelAgentRemote travelAgent = home.create();
       
           // Get a list of all cabins on ship 1 with a bed count of 3.
           String list [] = travelAgent.listCabins(SHIP_ID,BED_COUNT);
       
           for(int i = 0; i < list.length; i++){
              System.out.println(list[i]);
           }
       
View Full Code Here


      Object ref = jndiContext.lookup("TravelAgentHome");
      TravelAgentHomeRemote home = (TravelAgentHomeRemote)
        PortableRemoteObject.narrow(ref,TravelAgentHomeRemote.class);

      // Get a remote reference to the bean (EJB object).
      TravelAgentRemote agent = home.create();
      // Pass the remote reference to some method.
      getTheEJBHome(agent);

        } catch (java.rmi.RemoteException re){re.printStackTrace();}
          catch (Throwable t){t.printStackTrace();}
View Full Code Here

              
           TravelAgentHomeRemote home = (TravelAgentHomeRemote)
               PortableRemoteObject.narrow(ref,TravelAgentHomeRemote.class)
       

           TravelAgentRemote travelAgent = home.create();
       
           // Get a list of all cabins on ship 1 with a bed count of 3.
           String list [] = travelAgent.listCabins(SHIP_ID,BED_COUNT);
       
           for(int i = 0; i < list.length; i++){
              System.out.println(list[i]);
           }
       
View Full Code Here

      Object ref = jndiContext.lookup("java:comp/env/ejb/TravelAgentHome");
      TravelAgentHomeRemote agentHome = (TravelAgentHomeRemote)
        PortableRemoteObject.narrow(ref,TravelAgentHomeRemote.class);

      TravelAgentRemote agent = agentHome.create();
      String list [] = agent.listCabins(1,3)
      System.out.println("1st List: Before re-creating cabin number 30");
      for(int i = 0; i < list.length; i++){
        System.out.println(list[i]);
      }

      // Obtain the home and re-create cabin 30. Rerun the same cabin list.

      ref = jndiContext.lookup("java:comp/env/ejb/CabinHome");
      CabinHomeRemote c_home = (CabinHomeRemote)
        PortableRemoteObject.narrow(ref, CabinHomeRemote.class);

      // re-create the single cabin (#30) we deleted with Client_4 example
            makeCabin(c_home, 30, 3, 1, 3, 309);

      list = agent.listCabins(1,3)
      System.out.println("2nd List: After re-creating cabin number 30");
      for (int i = 0; i < list.length; i++) {
        System.out.println(list[i]);
      }
       
View Full Code Here

      Object ref = jndiContext.lookup("TravelAgentHome");
      TravelAgentHomeRemote agentHome = (TravelAgentHomeRemote)
        PortableRemoteObject.narrow(ref,TravelAgentHomeRemote.class);

      TravelAgentRemote agent = agentHome.create();
      String list [] = agent.listCabins(1,3)
      System.out.println("1st List: Before deleting cabin number 30");
      for(int i = 0; i < list.length; i++){
        System.out.println(list[i]);
      }

      // Obtain the home and remove cabin 30. Rerun the same cabin list.

      ref = jndiContext.lookup("CabinHome");
      CabinHomeRemote c_home = (CabinHomeRemote)
        PortableRemoteObject.narrow(ref, CabinHomeRemote.class);

      Integer pk = new Integer(30);
      c_home.remove(pk);
      list = agent.listCabins(1,3)
      System.out.println("2nd List: After deleting cabin number 30");
      for (int i = 0; i < list.length; i++) {
        System.out.println(list[i]);
      }
       
View Full Code Here

TOP

Related Classes of com.titan.travelagent.TravelAgentRemote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.