Examples of ExceptionHolder


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.omg.Messaging.ExceptionHolder

        implements org.omg.CORBA.portable.ValueFactory
    {
        public java.io.Serializable read_value
                        ( org.omg.CORBA_2_3.portable.InputStream is )
        {
            ExceptionHolder result = new ExceptionHolderImpl();
            result._read( is );
            return result;
        }
View Full Code Here

Examples of org.omg.Messaging.ExceptionHolder

        implements org.omg.CORBA.portable.ValueFactory
    {
        public java.io.Serializable read_value
                        ( org.omg.CORBA_2_3.portable.InputStream is )
        {
            ExceptionHolder result = new ExceptionHolderImpl();
            result._read( is );
            return result;
        }
View Full Code Here

Examples of org.omg.Messaging.ExceptionHolder

        implements org.omg.CORBA.portable.ValueFactory
    {
        public java.io.Serializable read_value
                        ( org.omg.CORBA_2_3.portable.InputStream is )
        {
            ExceptionHolder result = new ExceptionHolderImpl();
            result._read( is );
            return result;
        }
View Full Code Here

Examples of org.omg.Messaging.ExceptionHolder

        @Override
        public java.io.Serializable read_value
            ( org.omg.CORBA_2_3.portable.InputStream is )
        {
            ExceptionHolder result = new ExceptionHolderImpl(orb);
            result._read( is );
            return result;
        }
View Full Code Here

Examples of org.omg.Messaging.ExceptionHolder

    public void test_jac492_exceptionholderlogging()
    {
        // This decidely hacky set of code is to provoke a rather unlikely error
        // from exception holder which in turn reveals that logging has not been
        // configured which throws another error.
        ExceptionHolder eh = new ExceptionHolderImpl ((org.jacorb.orb.ORB)setup.getClientOrb ());
        try
        {
            final Field fields[] = ExceptionHolder.class.getDeclaredFields();
            CDROutputStream cdr = new CDROutputStream (setup.getClientOrb ());
            cdr.write_string ("Dummy_id");

            for (int i = 0; i < fields.length; ++i)
            {
                if ("marshaled_exception".equals(fields[i].getName()))
                {
                    Field f = fields[i];
                    f.setAccessible(true);
                    f.set (eh, cdr.getBufferCopy ());
                    break;
                }
            }
            cdr.close();
            eh.raise_exception ();

            fail ("No exception raised");
        }
        catch (NullPointerException e)
        {
View Full Code Here

Examples of org.teiid.client.util.ExceptionHolder

      logProcessingException(e, context);
    } else {
      LogManager.logError(context, e, RuntimePlugin.Util.getString("ServerWorkItem.Received_exception_processing_request", this.socketClientInstance.getWorkContext().getSessionId())); //$NON-NLS-1$
    }

    return new ExceptionHolder(e);
  }
View Full Code Here

Examples of org.teiid.client.util.ExceptionHolder

        results = BatchSerializer.readBatch(in, dataTypes);

        // Plan Descriptions
        planDescription = (PlanNode)in.readObject();

        ExceptionHolder holder = (ExceptionHolder)in.readObject();
        if (holder != null) {
          this.exception = (TeiidException)holder.getException();
        }
        List<ExceptionHolder> holderList = (List<ExceptionHolder>)in.readObject();
        if (holderList != null) {
          this.warnings = ExceptionHolder.toThrowables(holderList);
        }
View Full Code Here

Examples of org.teiid.client.util.ExceptionHolder

        // Plan descriptions
        out.writeObject(this.planDescription);

        if (exception != null) {
          out.writeObject(new ExceptionHolder(exception));
        } else {
          out.writeObject(exception);
        }
        if (this.warnings != null) {
          out.writeObject(ExceptionHolder.toExceptionHolders(this.warnings));
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.