Package com.titan.travelagent

Examples of com.titan.travelagent.TravelAgentHomeRemote


        try {
            Context jndiContext = getInitialContext();
          
           Object ref = jndiContext.lookup("TravelAgentHome");         
              
           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++){
View Full Code Here


    public static void main(String [] args) {
    try {
      Context jndiContext = getInitialContext()
      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

    throws RemoteException {

    // The home interface is out of scope in this method,
    // so it must be obtained from the EJB object.
    Object ref = agent.getEJBHome();
    TravelAgentHomeRemote home = (TravelAgentHomeRemote)
      PortableRemoteObject.narrow(ref,TravelAgentHomeRemote.class);

    // Do something useful with the home interface
    EJBMetaData meta = home.getEJBMetaData();
    System.out.println(meta.getHomeInterfaceClass().getName());
    System.out.println(meta.getRemoteInterfaceClass().getName());
    System.out.println(meta.isSession());
        //System.exit(0);
View Full Code Here

        try {
           Context jndiContext = getInitialContext();
          
           Object ref = jndiContext.lookup("TravelAgentHome");     
              
           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++){
View Full Code Here

           Context jndiContext = getInitialContext();

       // Obtain a list of all the cabins for ship 1 with bed count of 3.

      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]);
      }
View Full Code Here

           Context jndiContext = getInitialContext();

       // Obtain a list of all the cabins for ship 1 with bed count of 3.

      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]);
      }
View Full Code Here

TOP

Related Classes of com.titan.travelagent.TravelAgentHomeRemote

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.