• Post Reply Bookmark Topic Watch Topic
  • New Topic

it is statless or statefull session home

 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear sir i would like to know that i have created a home interface as below,

import javax.ejb.*;
import java.rmi.*;

public interface AdviceHome extends EJBHome{
public Advice create() throws CreateException,RemoteException;
}

now i would like to know that this interface is for statful seession bean or for statless session bean. I am sure one thing herer that this is for statless it is sure . but can we say it for statful also.

as We know that home interface for statful most have overloaded create method.


with reagard

Arun kumar maalik
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35736
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arun,
It could be for either a stateless or stateful bean. The bean type is specified in the deployment descriptor, not the code. The code winds up being different for semantic reasons, but these aren't rules.

Why do stateful home interfaces need to overload the create method? I know that they may, but why do they have to?
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they don't. This can indeed be either.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!