Two Laptop Bag
The moose likes EJB and other Java EE Technologies and the fly likes stateless ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "stateless ejb" Watch "stateless ejb" New topic

stateless ejb

seetarama raju
Ranch Hand

Joined: Feb 07, 2001
Posts: 104
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.
Victor Htet
Ranch Hand

Joined: Apr 09, 2000
Posts: 70
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.

I agree. Here's the link:
subject: stateless ejb
It's not a secret anymore!