Do you mean I should store SFSB as an instance variable in SLSB? If yes , then how do I make sure that each httpsession in web gets a reference to its own SFSB since SLSB will not distinguish between clients?
Do you mean I should store SFSB as an instance variable in SLSB? If yes , then how do I make sure that each httpsession in web gets a reference to its own SFSB since SLSB will not distinguish between clients?
Hi Ajai Sandhu, I think that you are very clear about Handle right ? Getting the handle in the sense your SFSB will return duplicate copies of remote objects there by your clinet should be use your remote object only. In EJBHome interface there is one function called getHomeHabdle() it returns HomeHandle(It's also an interface). Hope that your Doubt is cleared. Regards, G Sirish Reddy.,
Originally posted by G Sirish Reddy: Hi Ajai Sandhu, I think that you are very clear about Handle right ? Getting the handle in the sense your SFSB will return duplicate copies of remote objects there by your clinet should be use your remote object only. In EJBHome interface there is one function called getHomeHabdle() it returns HomeHandle(It's also an interface). Hope that your Doubt is cleared. Regards, G Sirish Reddy.,
How is getting the Homehandle useful in the above case?
Hi Pradip Bhat, How is getting the Homehandle useful in the above case? A)First it decrese the no.or Network calls. * as soon as you obtaining the remote object you are passing that remote object reference to your clients also for to use the same resource which is used by you on the server.this graduvally decrease the Network calls. If possible plz go thru Mastering EJB by EDRoman. Thanks, G Sirish Reddy.,
Originally posted by G Sirish Reddy: Hi Pradip Bhat, How is getting the Homehandle useful in the above case? A)First it decrese the no.or Network calls. * as soon as you obtaining the remote object you are passing that remote object reference to your clients also for to use the same resource which is used by you on the server.this graduvally decrease the Network calls. If possible plz go thru Mastering EJB by EDRoman. Thanks, G Sirish Reddy.,
I posted the que since I read somewhere that SFSB was used behind SLSB facade for shopping case scenario.I feel the only way to get the SFSB handle and save it in session would be to use SFSB(remote) benind SLSB facade .Am I right?
I posted the que since I read somewhere that SFSB was used behind SLSB facade for shopping case scenario.I feel the only way to get the SFSB handle and save it in session would be to use SFSB(remote) benind SLSB facade .Am I right?
Thanks
I dont where you read this but their example may be different. Why session are you talking about - http session ? If you use a SLSB facade then how will you ever use the handle ?
I dont where you read this but their example may be different. Why session are you talking about - http session ? If you use a SLSB facade then how will you ever use the handle ?
I read about this example in a forum in javaranch, I could not find it again ,but It might just be somebody's view which I was trying to understand. I am talking about HTTPSession.
If we get a handle for remote SFSB and return it to servlet through SLSB facade and store the SFSB handle in httpSession. Of course we might as well use SFSB as facade itself rather than going through SLSB.
I am curious to know what else does your Facade class do apart from talking to SFSB?
Ok,SLSB facade might be doing all other normal stuff like connecting to entity beans etc. apart from getting and providing the handle to Servlet.Take the example of a typical on line shopping case where only shopping cart is an SFSB whereas other beans can be SLSB or entity.In this scenaio i was thinking of providing only one SLSB as facade with SFSB behind it or use two facades one SFSB and other SLSB
If we get a handle for remote SFSB and return it to servlet through SLSB facade and store the SFSB handle in httpSession. Of course we might as well use SFSB as facade itself rather than going through SLSB.
One of pupose of Session facade is to hide the client from the business objects (SFSB in your example) and if you are returning the handle to the servlet, the servlet is exposed to SFSB interface, isn't. So SFSB facade is the right way.
Post by:autobot
Evacuate the building! Here, take this tiny ad with you:
a bit of art, as a gift, that will fit in a stocking