<repo_name>Aklil/PlayingField<file_sep>/PlayingField-ejb/src/main/java/com/distributedapplication/OrderFacadeLocal.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.distributedapplication;

import javax.ejb.Local;

/**
 *
 * @author Aklil
 */
@Local
public interface OrderFacadeLocal {

    void check(Order Order) throws Exception;

    Order process(final Order Order);

    Order shipping(final Order Order);
    
}
<file_sep>/PlayingField-web/src/main/webapp/static/js/main.js
var storeApp = angular.module('storeApp',[
    'ngRoute',
    'ngResource']);

var SERVER_URL = "http://localhost:8080/PlayingField-web";

//http://localhost:8383/LaptopStoreClient/index.html#/login

storeApp.config(['$routeProvider',
    function($routeProvider) {
        $routeProvider
                .when('/index', {
                    templateUrl: 'partials/login.html',
                    controller: 'LoginController'
                })
                .otherwise({redirectTo: '/index'});
    }]);
storeApp.factory('RestService',function($http){
    return{
        getMessage: function(){
            return $http.get(SERVER_URL+"/message.htm");
        }
    };
});
storeApp.controller('LoginController',function($scope,$route,RestService){
    
    $scope.testMessage="";
    
    RestService.getMessage().success(function(data,status){
        if(status == 200){
            console.log("Message:"+ data);
            $scope.testMessage = data;
        }
    }).error(function(data,status){
            console.log("Error Fetching data"+status);
    });
    
});
    
<file_sep>/PlayingField-ejb/src/main/java/com/distributedapplication/TestSingletonFacade.java
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.distributedapplication;

import javax.ejb.Singleton;

/**
 *
 * @author Aklil
 */
@Singleton
public class TestSingletonFacade implements TestSingletonFacadeLocal {
    
    String name;
    @Override
    public String getCustomerName() {
        return this.name;
    }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

    @Override
    public void setCustomerName(String name) {
        this.name = name;
    }
}
