• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

exceptions for exam

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
One of the test simulators required the knowledge of the following 4 exceptions
- javax.transaction.NotSupportedException
- javax.transaction.RollbackException
- javax.ejb.AccessLocalException
- javax.transaction.InvalidTransactionException
I was not familiar with these exception and therefore was unable to answer the question correctly.
HF make no mention of any of these four exceptions. What exceptions do we need to know for the exam? Is there some master list?
Thanks.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know of these 3
InvalidTransactionException : This exception indicates that the request carried an invalid transaction context. Transaction attributes mismatch fro example.
TransactionRequiredException This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction. If the target object has an attribute of Required, but is not invoked in the right context.
TransactionRolledbackException This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back. CMR's created in on Tx context and invoked in another for example.
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Akasmat,
I appreciate your efforts but I don't think you got the gist of my question. I'm not asking for a description of particular exception but a master list of all the exceptions that I need to know for the exam.
Thanks.
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main exceptions you have to know for the exam are five application exceptions:
* CreateException
* RemoveException
* FinderException
* ObjectNotFoundException
* DuplicateKeyException
and...
EJBException and RemoteException
and...
NoSuchObjectException
NoSuchObjectLocalException
You should also know about TrasactionRollbackException / TransactionRolledbackLocalException and TransactionRequiredException / TransactionRequiredLocalException
You should know about NamingException and IllegalStateException.
You should know the circumstances under which something can throw an exception, and *especially* you must know the implications of an exception.
Application Exception: no rollback, bean lives. If you want a rollback, YOU need to do it either via your UserTransaction (BMT) or by calling setRollbackOnly() on your context (CMT).
System Exception: transaction automatically rolled back, bean is destroyed (without getting an ejbRemove() or unset<something>Context() call, and the exception is logged.
In general, if you know what is and is not allowed in the spec, then you can usually figure out which exceptions might be thrown. In other words, it is far more important to know that something WILL throw an exception rather than to know exactly which exception is thrown.
The Application exceptions are the ones where you should know the exact circumstances under which these exceptions can be thrown, and what it might mean to the bean and to the client.
cheers,
Kathy
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic