Overloading ejbCreate


EJB programming & troubleshooting: Overloading ejbCreate

  1. Overloading ejbCreate (1 messages)


    Is it that i cannot have overloaded version of the create () method in the home interface and corresponding ejbCreate()in the bean in case of stateless session beans. I have tried doing the same thing in case of stateful session beans it works fine but in case of stateless session beans it gives error in deployement.Can anyone clear this doubt.

  2. Overloading ejbCreate[ Go to top ]

    It is not a matter of overloading the create method. A stateless session bean simply must have only one, no-argument create method. It wouldn't make sense to pass parameters to stateless beans during creation because they are not supposed to have any state. Even if you did pass parameters, the next time you make a call it might go to a different instance that was created with different parameters.