Examples of ExceptionHolder


Examples of nexj.core.util.ExceptionHolder

         }

         nEnd = nNewEnd;
      }

      ExceptionHolder eh = null;

      if (predCountMap.size() != 0)
      {
         for (Iterator itr = predCountMap.iterator(); itr.hasNext();)
         {
View Full Code Here

Examples of nexj.core.util.ExceptionHolder

    * @param aspects The topologically sorted aspect array (from resolveAspects())
    * @throws MetadataException if an error occurs.
    */
   public static void resolveMembers(ClassAspect[] aspects) throws MetadataException
   {
      ExceptionHolder eh = null;

      for (int i = 0; i < aspects.length; ++i)
      {
         eh = aspects[i].resolveAspectMembers(eh);
      }
View Full Code Here

Examples of nexj.core.util.ExceptionHolder

    * @param aspects The topologically sorted aspect array (from resolveAspects())
    * @throws MetadataException if an error occurs.
    */
   public static void resolvePersistence(ClassAspect[] aspects) throws MetadataException
   {
      ExceptionHolder eh = null;

      for (int i = 0; i < aspects.length; ++i)
      {
         ClassAspect aspect = aspects[i];

View Full Code Here

Examples of nexj.core.util.ExceptionHolder

      for (Iterator itr = compatible.getMetaclassIterator(); itr.hasNext();)
      {
         final Metaclass compatibleMetaclass = (Metaclass)itr.next();
         Metaclass metaclass = findMetaclass(compatibleMetaclass.getName());

         ExceptionHolder eh;

         if (metaclass != null)
         {
            eh = new ExceptionHolder()
            {
               public void addException(Throwable e)
               {
                  if (e instanceof MetadataValidationException)
                  {
View Full Code Here

Examples of nexj.core.util.ExceptionHolder

    * events and actions for this class and its subclasses.
    * @throws MetadataException if inconsistencies are found.
    */
   public final void resolveInheritance()
   {
      ExceptionHolder eh = resolveInheritance(null);

      if (eh != null)
      {
         throw (UncheckedException)eh;
      }
View Full Code Here

Examples of nexj.core.util.ExceptionHolder

    * @param machine The VM for macro expansion.
    * @throws MetadataException if an error occurs.
    */
   public void resolveAttributes(final Machine machine)
   {
      ExceptionHolder eh = visit(new AttributeDependencyVisitor()
      {
         protected void computeDependency(Attribute attribute)
         {
            attribute.resolve(machine);
         }
View Full Code Here

Examples of nexj.core.util.ExceptionHolder

    * @throws MetadataException if an error occurs.
    * @see Attribute#computeInverseDependency(Holder)
    */
   public void computeInverseDependency(final Set depSet)
   {
      ExceptionHolder eh = visit(new AttributeDependencyVisitor()
      {
         protected void computeDependency(Attribute attribute)
         {
            attribute.computeInverseDependency(depSet);
         }
View Full Code Here

Examples of nexj.core.util.ExceptionHolder

    */
   public final void compile(Machine machine)
   {
      Metaclass sysSyncClass = ((Metadata)machine.getContext().getContextMetadata())
         .findMetaclass(Metadata.SYNC_CLASS_CLASS_NAME);
      ExceptionHolder eh = (sysSyncClass == null) ? null : generateSyncDependencyActions(sysSyncClass, null);

      eh = compile(machine, eh);

      if (eh != null)
      {
View Full Code Here

Examples of org.mule.util.ExceptionHolder

        int i = 0;

        int numberOfThreads = 1;

        CountDownLatch latch = new CountDownLatch(numberOfThreads);
        ExceptionHolder exceptionHolder = new ExceptionHolder();
        try
        {
            for (int x = 0; x < numberOfThreads; x++)
            {
                Thread thread = new Thread(new ClientReceiver(latch, numRequests / numberOfThreads, exceptionHolder));
                thread.start();
            }


            for (i = 0; i < numRequests; i++)
            {
                if (i == getWarmUpMessages())
                {
                    stopWatch.start();
                }
                client.dispatch("CustomerRequests", requests[i % 3], null);
            }
        }
        finally
        {
            latch.await();
            stopWatch.stop();
            System.out.println("Total running time was: " + stopWatch.getTime() + "ms");
            System.out.println("Requests processed was: " + i);
            int mps = (int) (numRequests / ((double) stopWatch.getTime() / (double) 1000));
            System.out.println("Msg/sec: " + mps + " (warm up msgs = " + getWarmUpMessages() + ")");
            if(exceptionHolder.isExceptionThrown())
            {
                exceptionHolder.print();
                fail("Exceptions thrown during async processing");
            }
        }
    }
View Full Code Here

Examples of org.mule.util.ExceptionHolder

        int i = 0;

        int numberOfThreads = 1;

        CountDownLatch latch = new CountDownLatch(numberOfThreads);
        ExceptionHolder exceptionHolder = new ExceptionHolder();
        try
        {
            for (int x = 0; x < numberOfThreads; x++)
            {
                Thread thread = new Thread(new ClientReceiver(latch, numRequests / numberOfThreads, exceptionHolder));
                thread.start();
            }


            for (i = 0; i < numRequests; i++)
            {
                if (i == getWarmUpMessages())
                {
                    stopWatch.start();
                }
                client.dispatch("CustomerRequests", requests[i % 3], null);
            }
        }
        finally
        {
            latch.await();
            stopWatch.stop();
            System.out.println("Total running time was: " + stopWatch.getTime() + "ms");
            System.out.println("Requests processed was: " + i);
            int mps = (int) (numRequests / ((double) stopWatch.getTime() / (double) 1000));
            System.out.println("Msg/sec: " + mps + " (warm up msgs = " + getWarmUpMessages() + ")");
            if(exceptionHolder.isExceptionThrown())
            {
                exceptionHolder.print();
                fail("Exceptions thrown during async processing");
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.