can we write the database connection code in the stateless session bean................
i mean i just need to connect to the database and display the records on the database..................
Hi Mahadevan, yes you can as long as you keep in mind that a stateless session bean cannot pertain any state across multiple method invocations. Just get the connection, read the data, close the connection and return the data to the caller.
thanks for you reply.
mikael, i heard that session beans can handel only one client , what does it mean.
say for example, if i create an application and deploy it on the server and a client A wants to read the data and at the same time Client B wants to read the data will it not work for Client B.
I am confused.....
Each EJB object, or instance, can only have one client. Thus, client A and client B will each call a different EJB object. Unlike servlets, EJB objects are not thread aware.
Hope this helps!