/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package book_db_client; import businessLogic.Book_mgtRemote; import java.util.Scanner; import javax.ejb.EJB; /** * * @author Burabari */ public class Main { @EJB static Book_mgtRemote bookMgtEJB; public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter '1' to create Book record, '2' to add " + "chapter to book, any other character to exit: "); String entry = input.nextLine(); if(entry.equals("1")){ bookMgtEJB.createBook(); System.out.println("Book record created... Thank you"); }else if(entry.equals("2")){ bookMgtEJB.addChapterToBook(); System.out.println("Chapter record created... Thank you"); }else{ System.out.println("Exiting... Thank you"); System.exit(0); } } }