we are developing a project for a credit card acquisition system.we are mostly using the stateless ejb's. actually we are wrapping this ejb interface to an already existing functional system based on rmi.previously most of the content was written and sent back from the tables. but with the current system some of the data is no more taken from tables. but as we are now following stateless we can't even tie a particular data to the client, by passing it to a method.i would like to know about what could be the better approach in this situation. i hope iam not missing any detail here and u all got my point thanks in advance.
Joined: Apr 09, 2000
To solve your problem : "we can't even tie a particular data to the client". You have several options. 1) You can use Stateful session bean but its performance would not be as perfect as Stateless. 2) If your client of EJB is Web Client (Servlet/JSP), you can store client-specific data with HttpSession and passed it to Stateless session bean whenever you invoke bean methods. But Bean methods should have at least one parameter that represents client identity (e.g, customer_id). 3) If your client is Java AWT/Swing application client, you can cache client specific data with member variables. Hope it helps.