Package org.jacorb.orb

Examples of org.jacorb.orb.ExceptionHolderImpl


    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

TOP

Related Classes of org.jacorb.orb.ExceptionHolderImpl

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.