Package org.jboss.tutorial.partial_deployment_descriptor.bean

Examples of org.jboss.tutorial.partial_deployment_descriptor.bean.CompleteXMLDD


public class Client
{
   public static void main(String args[]) throws Exception
   {
      Context ctx = new InitialContext();
      CompleteXMLDD completeXMLDDBean = (CompleteXMLDD) ctx.lookup("CompleteXMLDD/remote");
      SecurityClient securityClient = SecurityClientFactory.getSecurityClient();
      securityClient.setSimple("jai", "jai123");
      securityClient.login();
     
      System.out.println("jai is a normal user");
      // call sayHello
      System.out.println(completeXMLDDBean.sayHello("jai"));

      // call greet methods
      System.out.println(completeXMLDDBean.greetWithNotSupportedTransaction("jai"));
      System.out.println(completeXMLDDBean.greetWithRequiredTransaction("jai"));

      // bye
      System.out.println(completeXMLDDBean.sayBye("jai"));

      // let's try the uncallable method
      System.out.println("We'll try calling an uncallable method");
      try
      {
         completeXMLDDBean.uncallableMethod();
         throw new RuntimeException("Bean method in <excluded-list> was allowed to be invoked");
      }
      catch (EJBAccessException e)
      {
         System.out.println("Caught expected exception : " + e.getMessage());
View Full Code Here

TOP

Related Classes of org.jboss.tutorial.partial_deployment_descriptor.bean.CompleteXMLDD

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.