• Post Reply Bookmark Topic Watch Topic
  • New Topic

Some queires  RSS feed

 
Arun Bhardwaj
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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!!!
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!