Package org.jboss.test.perf.interfaces

Examples of org.jboss.test.perf.interfaces.Session


      throws CreateException, RemoteException
   {
      try
      {
         long start = System.currentTimeMillis();
         Session bean = lookupSession();
         bean.create(low, high);
         long end = System.currentTimeMillis();
         log.debug("create ran in: "+(end - start));
      }
      catch (CreateException ce)
      {
View Full Code Here


      throws RemoveException, RemoteException
   {
      try
      {
         long start = System.currentTimeMillis();
         Session bean = lookupSession();
         bean.remove(low, high);
         long end = System.currentTimeMillis();
         log.debug("remove ran in: "+(end - start));
      }
      catch(Exception e)
      {
View Full Code Here

   public void read(int id) throws RemoteException
   {
      try
      {
         long start = System.currentTimeMillis();
         Session bean = lookupSession();
         bean.read(id);
         long end = System.currentTimeMillis();
         log.debug("read ran in: "+(end - start));
      }
      catch(Exception e)
      {
View Full Code Here

   public void read(int low, int high) throws RemoteException
   {
      try
      {
         long start = System.currentTimeMillis();
         Session bean = lookupSession();
         bean.read(low, high);
         long end = System.currentTimeMillis();
         log.debug("read ran in: "+(end - start));
      }
      catch(Exception e)
      {
View Full Code Here

   public void write(int id) throws RemoteException
   {
      try
      {
         long start = System.currentTimeMillis();
         Session bean = lookupSession();
         bean.write(id);
         long end = System.currentTimeMillis();
         log.debug("write ran in: "+(end - start));
      }
      catch(Exception e)
      {
View Full Code Here

   public void write(int low, int high) throws RemoteException
   {
      try
      {
         long start = System.currentTimeMillis();
         Session bean = lookupSession();
         bean.write(low, high);
         long end = System.currentTimeMillis();
         log.debug("write ran in: "+(end - start));
      }
      catch(Exception e)
      {
View Full Code Here

   private Session lookupSession() throws Exception
   {
      Context context = new InitialContext();
      Object ref = context.lookup("java:comp/env/ejb/Session");
      SessionHome home = (SessionHome) PortableRemoteObject.narrow(ref, SessionHome.class);
      Session bean = home.create(entityName);
      return bean;
   }
View Full Code Here

      getLog().debug("+++ testClientSession()");
      Object obj = getInitialContext().lookup(CLIENT_SESSION);
      obj = PortableRemoteObject.narrow(obj, SessionHome.class);
      SessionHome home = (SessionHome) obj;
      getLog().debug("Found SessionHome @ jndiName=ClientSession");
      Session bean = home.create(CLIENT_ENTITY);
      getLog().debug("Created ClientSession");
     
      try
      {
         bean.create(0, getBeanCount());
      }
      catch(javax.ejb.CreateException e)
      {
         getLog().debug("Exception while creating entities: ", e);
      }
     
      long start = System.currentTimeMillis();
      bean.read(0);
      bean.read(0, getBeanCount());
      bean.write(0);
      bean.write(0, getBeanCount());
      bean.remove(0, getBeanCount());
      long end = System.currentTimeMillis();
      long elapsed = end - start;
      getLog().debug("Elapsed time = "+(elapsed / iterationCount));
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.perf.interfaces.Session

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.