Session Bean
1 posts in topic
Flat View  Flat View

Posted By:   Abdulla_J
Posted On:   Wednesday, December 12, 2001 10:27 PM

Is it possible to insert data into database using session bean without entity bean?

Re: Session Bean

Posted By:   Anonymous  
Posted On:   Wednesday, December 12, 2001 10:56 PM

I think u can insert data using session bean by getting the connection object of the specified data source and do the required operation but if u use session bean for database operation ur violating the purpose of EJB architecure where specs says session bean is used for the logic that is to be applied on client or servelts is implemented in session beans and also transaction of ur database cannot be controled as it is done through entity beans so it is ur own responsibility to take care of all those transaction.Apart from this session beans r not statefull even stateful session bean cannot survive server crash so better u use entity bean for databse operation and wrap that in the session bean for the clients to access.
About | Sitemap | Contact