• 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

Are EJBHome and EJBObject pooled?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are EJBHome and EJBObject pooled?
I am assuming they would be, but different containers use different schemes.

I would appreciate any clarification on this.

thanks.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya ur right depending on container policies there may be any number of home and remote interfaces
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
EJBHome is EJBclient can use to create ,find destroy methods and EJBObject is container generated implemented object.actually both are pooled
it is container specific.
 
Deeps Soma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your replies Karthik and Ramakrishnan.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Well i would like to add to the question posted by Deepa.
So does it make any sense to call remove method on stateless session beans?
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

So does it make any sense to call remove method on stateless session beans



You dont need to call remove method for SLSB.
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you can read in the EJB 2.1 spec about the session objects lifecycles (Chapter 6.7): a remove method will take the session from "exists and referenced" state and move it to "does not exist and referenced" state (so preparing it to return to the pool).
Another interesting part of ejbRemove() is that it is responsible with the deallocation of all resources allocated during the ejbCreate() invocation.
 
s pramod
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ali but This is what happens inside the ejbremove method in StatelessEJLocalObject(weblogic)

public void remove(MethodDescriptor methoddescriptor)
throws EJBException, RemoveException
{
if(!methoddescriptor.checkMethodPermissionsLocal(EJBContextHandler.EMPTY))
{
SecurityException securityexception = new SecurityException("Security violation: insufficient permission to access method");
throw new AccessLocalException(securityexception.getMessage(), securityexception);
} else
{
return;
}
}
i.e the remove method call is a noop.

And the spec as you pointed says the remove method changes the state of session object from exists and referenced to does not exist and referenced.
So can u please throw some light on the same.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess there is a different meaning for *removing* in SLSB.

When the client calls remove() with SLSB, the container will simply put it *back* into the pool without really destroy it.

For SFSB, the bean instance will be removed, without putting back into the bean pool.

This property is valid for Entity bean too.

You call remove simply means you tell the container you are finished with this SLSB, whether this SLSB be deleted is all depends on the container. If it has enough resource, it may keep it. Otherwise, it may distroy it. Thus, we can control the *real* deletion.

Nick
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic