This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

HFEJB p.561: Help needed to fill Exception Chart for Remote and Local Clients

 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

please view my assumptions (in RED) for the exception chart provided in HFEJB on p. 561, I'm not sure whether it's correct. Do you agree on them .



Regards,
Darya
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#2 - Remote - java.rmi.NoSuchObjectException
Local - javax.ejb.NoSuchObjectLocalException

#6 - Ref 7.5.6 of Spec
Clients are not allowed to make concurrent calls to a stateful session object. If a client-invoked business method is in progress on an instance when another client-invoked call, from the same or different client,
arrives at the same instance of a stateful session bean class, the container may throw the java.rmi.RemoteException to the second client,if the client is a remote client, or the javax.ejb.EJBException, if the client is a local client. This restriction does not apply to a stateless
session bean because the container routes each request to a different instance of the session bean class.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#6 ---->>

In this case the rlevant section in EJB Spec is 7.6, Page No.79;

An attempt to remove a session object while the object is in a transaction will cause the container to throw the avax.ejb.RemoveException to the client.



Hence, RemoveException seems to be right in given scenario.

Regards
 
Muhammad Saeed
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, my fault... please read #6... as #7 in the previous post.

Regards
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic