Hi Sanju,
HI Every body,
In EJB how to create the instances. How many instances will create for application. Suppose if 10 users will access any bean it will create 10 instances or one instance
Usually developers do not control the way bean instances are created into the pool. All they can do is to define the initial number and the maximum number of bean instances in the pool. The container will create more and more instances as needed up to the specified maximum value; all incoming client requests will block after that waiting for instances to become available. If the transaction timeout is exceeded the container will throw an exception.
I think one instance means it will come single ton. EJB not supporting single ton extensively)
You right singleton are not supported. However there is a work around: define the initial number of instances = max number of instances = 1. This way you�ll have exactly one bean instance (kind of singleton). However this paradigm will brake in a clustered environment.
Regards.