Package interfaces.clients

Examples of interfaces.clients.IMetierClients


    public void run(){
      try{
        System.out.println("coucou 1");
//            registration du metier Clients.
            String name = "MetierClients";
            IMetierClients metierClients = new MetierClients();
           
            System.out.println("coucou 2");           
            IMetierClients stubClient =
                (IMetierClients) UnicastRemoteObject.exportObject(metierClients, port);
            System.out.println("Registration de "+name);
           
            String urlMetier = URL_RMI+name;
            registry.rebind(urlMetier, stubClient);           
View Full Code Here


     *
     */
    public String execute(HttpServletRequest req) throws Exception {
      String actionModif = req.getParameter(Message.ACTION_MODIF_ADRESSE);
     
      IMetierClients mc = (IMetierClients)req.getSession().getServletContext().getAttribute("metierClients");
      //MetierClients mc = new MetierClients();
     
     
     
      if(actionModif != null){           
         
          String adresse = req.getParameter("adresse");
          if(!verifierChaine(adresse)){
            req.setAttribute(Message.MESSAGE_ERREUR, Message.SAISIE_ADRESSE);         
            return erreur;
          }       
                             
         
          try{         
            HttpSession session = req.getSession(false);
            if(session != null){
              Client client = (Client)session.getAttribute("client");
              if(client == null){
                throw new MetierException();
              }
              System.out.println("Adresse : "+adresse);
              // On modifie l'adresse du client
              client.setAdresse(adresse);
              mc.modifierAdresse(client);
             
              // On remet l'adresse dans la session
              session.setAttribute("client", client);
             
              // Tout est ok
View Full Code Here

      System.out.println("Lookup Commandes");
      IMetierCommandes imCom = (IMetierCommandes) Naming.lookup(urlCommandes);
      System.out.println("Lookup Produits");
      IMetierProduits imPdts = (IMetierProduits) Naming.lookup(urlProduits);
      System.out.println("Lookup Clients");
      IMetierClients imCl = (IMetierClients) Naming.lookup(urlClients);
     
      System.out.println("Mise du metier en contexte");
      // On met le tout dans le servlet contexte
      context.setAttribute("metierCatalogue", imCat);
      context.setAttribute("metierCommandes", imCom);
View Full Code Here

TOP

Related Classes of interfaces.clients.IMetierClients

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.