2 Replies Latest reply on Oct 24, 2003 2:56 PM by Francisco Reverbel

    Throwing CORBA UserExceptions ?

    flitzie Newbie

      I would like to throw a simple CORBA UserException from my EJB. That's why I wrote an IDL file defining a CORBA UserException:

      exception FileNotFound {
      ::CORBA::WStringValue filename;
      };

      and generated the Helper and Holder files with idlj (JDK 1.4.1). After I added these files into my EJB, I implemented a remote Method throwFileNotFound for testing purpose:

      public void throwFileNotFound() throws FileNotFound
      {
      FileNotFound fnf = new FileNotFound( "wrong.idl" );
      throw fnf;
      }

      After the client invoked the method JBoss responded with an Exception FileNotFoundEx.
      This is too much overhead in my opinion. So, how can I force JBoss/JacORB to send CORBA UserException (eg. with warpper classes) ?