@@ -0,0 +1,2641 @@
+import com.tutorialspoint.stateless.LibraryPersistentBeanRemote;%0Aimport java.io.BufferedReader;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.util.List;%0Aimport java.util.Properties;%0Aimport javax.naming.InitialContext;%0Aimport javax.naming.NamingException;%0A%0Apublic class EJBTester %7B%0A%0A   BufferedReader brConsoleReader = null; %0A   Properties props;%0A   InitialContext ctx;%0A   %7B%0A      props = new Properties();%0A      try %7B%0A         props.load(new FileInputStream(%22jndi.properties%22));%0A      %7D catch (IOException ex) %7B%0A         ex.printStackTrace();%0A      %7D%0A      try %7B%0A         ctx = new InitialContext(props);            %0A      %7D catch (NamingException ex) %7B%0A         ex.printStackTrace();%0A      %7D%0A      brConsoleReader = %0A      new BufferedReader(new InputStreamReader(System.in));%0A   %7D%0A   %0A   public static void main(String%5B%5D args) %7B%0A%0A      EJBTester ejbTester = new EJBTester();%0A%0A      ejbTester.testEntityEjb();%0A   %7D%0A   %0A   private void showGUI()%7B%0A      System.out.println(%22**********************%22);%0A      System.out.println(%22Welcome to Book Store%22);%0A      System.out.println(%22**********************%22);%0A      System.out.print(%22Options %5Cn1. Add Book%5Cn2. Exit %5CnEnter Choice: %22);%0A   %7D%0A   %0A   private void testEntityEjb()%7B%0A%0A      try %7B%0A         int choice = 1; %0A%0A         LibraryPersistentBeanRemote libraryBean =%0A         LibraryPersistentBeanRemote)%0A         ctx.lookup(%22LibraryPersistentBean/remote%22);%0A%0A         while (choice != 2) %7B%0A            String bookName;%0A            showGUI();%0A            String strChoice = brConsoleReader.readLine();%0A            choice = Integer.parseInt(strChoice);%0A            if (choice == 1) %7B%0A               System.out.print(%22Enter book name: %22);%0A               bookName = brConsoleReader.readLine();%0A               Book book = new Book();%0A               book.setName(bookName);%0A               libraryBean.addBook(book);          %0A            %7D else if (choice == 2) %7B%0A               break;%0A            %7D%0A         %7D%0A%0A         List%3CBook%3E booksList = libraryBean.getBooks();%0A%0A         System.out.println(%22Book(s) entered so far: %22 + booksList.size());%0A         int i = 0;%0A         for (Book book:booksList) %7B%0A            System.out.println((i+1)+%22. %22 + book.getName());%0A            i++;%0A         %7D           %0A      %7D catch (Exception e) %7B%0A         System.out.println(e.getMessage());%0A         e.printStackTrace();%0A      %7Dfinally %7B%0A         try %7B%0A            if(brConsoleReader !=null)%7B%0A               brConsoleReader.close();%0A            %7D%0A         %7D catch (IOException ex) %7B%0A            System.out.println(ex.getMessage());%0A         %7D%0A      %7D%0A   %7D%0A%7D%0A

Create EJBTester.java