Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Q's about Mikalai's BCD guide

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First off, I'd like to seriously congratulate Mikalai Zaikin for coming up with a really well organized and comprehensive guide. Kudos!!

There were a couple of things, though, that bothered me, like:
  • Chapter 12. Exceptions

  • The first line says

    An APPLICATION EXCEPTION is an exception defined in the throws clause of a method of the enterprise Bean's home and component interfaces, other than the java.rmi.RemoteException.

    Shouldn't this also include java.lang.RuntimeException?
  • Chapter 6. Component Contract for Container-Managed Persistence (CMP)

  • Here you mentioned that

    ...the container-managed persistent (CMP) fields and container-managed relationship (CMR) fields...are accessed through get and set accessor methods.

    If I remember the JavaBeans Framework correctly, the get methods were called accessors and the set methods were called mutators. That's just a cosmetic issue, but we wouldn't want to confuse any newbies!


    Feel free to get back to me with any comments/queries you may have.
    [ January 10, 2005: Message edited by: saager mhatre ]
     
    Greenhorn
    Posts: 26
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    >># Chapter 12. Exceptions
    >>The first line says
    >>
    >> quote: An APPLICATION EXCEPTION is an exception defined in the throws >>clause of a method of the enterprise Bean's home and component interfaces, >>other than the java.rmi.RemoteException.
    >>
    >>Shouldn't this also include java.lang.RuntimeException?

    No. You usually don't define RuntimeException (or one of its subclasses) in the "throws" clause of a method. So I suppose it's not included.
     
    saager mhatre
    Ranch Hand
    Posts: 61
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    You usually don't define RuntimeException (or one of its subclasses) in the "throws" clause of a method



    The EJB Spec Chapter 18.1.1 Application Exceptions says

    An application exception is an exception defined in the throws clause of a method of an enterprise bean�s home, component, message listener, or web service endpoint interface, other than the java.rmi.RemoteException.



    The same section also says

    An application exception class must be a subclass (direct or indirect) of java.lang.Exception. An application exception class must not be defined as a subclass of the java.lang.RuntimeException or of the java.rmi.RemoteException.



    So by definition, java.lang.RemoteException and its subcalsses would not be Application Exceptions. But in the limited context of the Client View (by declaration), the java.lang.RuntimeException clause has been ignored as unchecked exceptions need not be declared in the throws clause.

    Wot say??

    ****************************************************************

    In a broader perspective, in several places the spec refers to Application Exceptions and non-Application Exceptions.
    Would non-Application Exceptions always imply System Exceptions or is there any gray area here.
    [ January 11, 2005: Message edited by: saager mhatre ]
     
    Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
    the value of filler advertising in 2020
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic