Win a copy of Head First Android this week in the Android 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Some queires

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.. while i was preparing for SCBCD, i got some question in my mind, which i am not able to find out in book.

1. Container call callback method ejbPassivate(). Can user/client able to force to container for Passivate the bean?

2. What is the main logic or main business to create Home? and what is significance to putting different method in Component and in Home interface?

3. Why three remove() method are there? How can we remove local session bean?

Thanks in advance!!!
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1. Container call callback method ejbPassivate(). Can user/client able to force to container for Passivate the bean?


ejbPassivate() can only be called by the container not the client.


2. What is the main logic or main business to create Home? and what is significance to putting different method in Component and in Home interface?


To create Home, you normally need to do a lookup. If it's remote, you need to narrow it and then cast it to the type of your home interface. If it's local, you only need to cast it to the type of your home interface.


3. Why three remove() method are there? How can we remove local session bean?


If you're talking about local session bean, there are only 2 remove(). One in the home interface and one in the component interface. The only way to remove local session bean is by calling remove() in the local component interface. The remove() methods in the local home interface requires remove(Object) where Object is the primary key, so it's not suitable for session. Only entity needs a primary key.
 
reply
    Bookmark Topic Watch Topic
  • New Topic