The scenario is: Simple java clients needs to access an EJB application and the ejb beans will provide the data from LDAP. While beans connecting to the LDAP, we need a client credentials(name, password..etc). How do we pass this client information to Beans? We want provide webservice endpoint in future, so we can't use a Stateful sesssion bean to keep client credentials and LDAP connection specific to client in bean.
I am thinking design like: Clients will pass his credentials to make a LDAP connection to stateless session beans in each method and, and the stateless session bean should able to find client stefulsesion bean(Some how, not sure how) and return the connection to stateless bean, and from there stateless bean access LDAP and return results.
What is the point is, Is sateful beans can accessable from stateless beans?
-
Calling Stateful beans from stateless beans. (3 messages)
- Posted by: Ramesh Ch
- Posted on: August 26 2004 17:30 EDT
Threaded Messages (3)
- Calling Stateful beans from stateless beans. by Fredrik Borgh on August 27 2004 03:57 EDT
- Calling Stateful beans from stateless beans. by vaheesan selvarajah on August 27 2004 12:10 EDT
- Calling Stateful beans from stateless beans. by Ian Purton on August 30 2004 07:00 EDT
-
Calling Stateful beans from stateless beans.[ Go to top ]
- Posted by: Fredrik Borgh
- Posted on: August 27 2004 03:57 EDT
- in response to Ramesh Ch
Just like you do a lookup for the stateless bean from your client, your stateless bean can do a lookup to a stateful bean. -
Calling Stateful beans from stateless beans.[ Go to top ]
- Posted by: vaheesan selvarajah
- Posted on: August 27 2004 12:10 EDT
- in response to Ramesh Ch
If you are using a EJB2.0 compatible appserver you could use local references instead of looking up within your container
More
http://www.devx.com/getHelpOn/10MinuteSolution/16677/1954?pf=true
-vaheesan selvarajah -
Calling Stateful beans from stateless beans.[ Go to top ]
- Posted by: Ian Purton
- Posted on: August 30 2004 07:00 EDT
- in response to Ramesh Ch
How do we pass this client information to Beans? We want provide webservice endpoint in future, so we can't use a Stateful sesssion bean to keep client credentials and LDAP connection specific to client in bean. I am thinking design like: Clients will pass his credentials to make a LDAP connection to stateless session beans in each method and, and the stateless session bean should able to find client stefulsesion bean(Some how, not sure how) and return the connection to stateless bean, and from there stateless bean access LDAP and return results.What is the point is, Is sateful beans can accessable from stateless beans?
If you want to pass secuity information between beans and enable them to be accessed as web services later then passing the security credentials is probably your best bet.
Ian Purton
Tune up your web site stats with IndexTools.com