hi everyone,
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..................
thanks
bye
-
stateless session bean (3 messages)
- Posted by: mahadevan venkata
- Posted on: January 11 2001 05:09 EST
Threaded Messages (3)
- stateless session bean by Mikael Forslund on January 11 2001 06:20 EST
- stateless session bean by mahadevan venkata on January 11 2001 06:45 EST
- stateless session bean by John Yost on January 11 2001 08:29 EST
- stateless session bean by mahadevan venkata on January 11 2001 06:45 EST
-
stateless session bean[ Go to top ]
- Posted by: Mikael Forslund
- Posted on: January 11 2001 06:20 EST
- in response to mahadevan venkata
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. -
stateless session bean[ Go to top ]
- Posted by: mahadevan venkata
- Posted on: January 11 2001 06:45 EST
- in response to Mikael Forslund
Hi Mikael,
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.....
thanks again.
bye
mahadevan
-
stateless session bean[ Go to top ]
- Posted by: John Yost
- Posted on: January 11 2001 08:29 EST
- in response to mahadevan venkata
Hi,
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!
John