Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Local Objects and remove() operation

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
For local EJBs is there any restriction for using remove() in LocalHome and EjbLocalObject regarding EB, SFSB and SLSB? i.e.,
1) Can EjbLocalObject.remove() be called on local SFSB?
2) Can EjbLocalObject.remove() be called on local SLSB?
3) Can EjbLocalObject.remove(), EjbLocalHome.remove(Obj pk) be called on local EB?
Thanks,
Phani
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.Yes
2.Yes
3.Yes
 
Phanindra Nayani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still have 1 doubt left. If EJBLocalObject.remove() is called on local SLSB, what will happen to EJBObject and Bean instances? Will the bean go back to pool or will it die permanently? What about EJBObject instance? Onemore thing, is there any restriction not allowing the usage of EJBLocalObject.remove()?
[ February 23, 2004: Message edited by: Phanindra Nayani ]
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For SLSB 'remove' allows the client to tell the server that it doesn't intend to make any more requests. It allows the container to GC the EJBObject/EJBLocalObject skeleton instance, or whatever kind of housekeeping the container does for the container-side end of the communication. The bean instance itself goes wherever the container wants it to go - typically the pool.
As for restrictions, you can't remove something that has already been removed. It won't break anything in the container, but the client would have to catch and ignore an exception. Typically the exception will be java.rmi.NoSuchObjectException (for remote invocations) or javax.ejb.NoSuchObjectLocalException (for local invocations). Strictly speaking you could also get a java.rmi.RemoteException (e.g. if the network was down so you couldn't get to the server to even find out that the EJBObject was unavailable).
 
Phanindra Nayani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou Guys !!!
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic