{
System.out.println("Caught expected EJBAccessException : " + ex.getMessage());
}
System.out.println("Kabir is a student, and students are allowed to do subtraction");
System.out.println("1 - 1 = " + sslCalculator.subtract(1, 1));
// Now let's use the bean whose proxy communicates via normal socket: protocol
Calculator normalCalculator = (Calculator) ctx.lookup("CalculatorNormal");
// do some operation
System.out.println("Invoking bean methods on a proxy through normal socket");