| Author |
ejbhome
|
jay roy
Ranch Hand
Joined: Nov 16, 2006
Posts: 145
|
|
hi guys does ejbhome object follow factory and singleton pattern? or does it follow only factory pattern? thanks Jay
|
 |
Raja Mani
Greenhorn
Joined: Nov 02, 2006
Posts: 26
|
|
|
As for as my knowledge ejbHome is using factory pattern and its not using singleton.
|
 |
jay roy
Ranch Hand
Joined: Nov 16, 2006
Posts: 145
|
|
thanks for replying raja. i thought the same but i have a feeling it follows singleton pattern too. Assuming that there are 1000 users , all those 1000 users accessing the same bean will be using the single instance of the beans' EjbHome object which makes it a singleton pattern. however , i dont see anywhere in books or website which states that it follows singleton pattern. so just wanted a confirmation.. thanks J
|
 |
Roshann Lal
Greenhorn
Joined: Jul 03, 2006
Posts: 10
|
|
Even I have the same doubt Although EJBHome keeps creating different instances, but only one home per bean.
|
 |
Raja Mani
Greenhorn
Joined: Nov 02, 2006
Posts: 26
|
|
|
Me too have joining the queue . :roll:
|
 |
jay roy
Ranch Hand
Joined: Nov 16, 2006
Posts: 145
|
|
guys it does not follow singleton pattern because singleton pattern states that the method should be of type "public static".In the home interface we do not have any methods of type "public static", hence it does not follow singleton pattern ALTHOUGH for a bean only one instance of ejbhome is reused by multiple users. hope that helps J
|
 |
 |
|
|
subject: ejbhome
|
|
|