Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
Context Object is a generic object used to share domain-neutral state throughout an application.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
SCJP, SCEA
Originally posted by Dan Drillich:
The Context Object is a good solution for this case. As the Core J2EE Patterns book says.
SCJP, SCEA
Originally posted by David Follow:
Hi,
I don't understand why you need to get that ID and pass the reference to your SFSB in every subsequent call? Why don't you just store the business delegate (which hides your remote interface to your SFSB) in the httpSession in case of the web client and in local memory in case of the application client?
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
SCJP, SCEA
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
SCJP, SCEA
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
SCJP, SCEA
Originally posted by Andrew Zilahi:
David,
I like the idea of caching the BD in session scope, but wouldn't storing ServiceLocator instead be better? Please advise.
thanks,
Andrew
SCJP, SCEA
Originally posted by David Follow:
I would prefer a SessionFacade to be the SFSB and also single point of entry to the business tier.
What do you think?
D.
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
Originally posted by Durgaprasad Guduguntla:
If you cache the SFSB handle in HttpSession, you may want to clean up the session on EJB tier. This can be done using HttpSessionBindingListener which listens to the session termination event on the web tier and call remove() on SFSB. The same thing can be implemented for swing client upon log-off event.
SCJP, SCEA
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Originally posted by Andrew Zilahi:
BTW, why do you need to clean up the session on EJB tier??
SCJP, SCEA
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Originally posted by Marta De rossi:
Hi all !
In fact I don't like very much to use both a Stateful SB and HTTPSession to store the handle(of SFSB). It seems more complicated and error-prone to keep up with both this session information.
Now I re-engineered it with just SLSB. I have inserted the ShoppingCart object in the HTTPSession for web clients and just kept it in memory for plain Java Clients.
I think it could make also the application more scalable.
I hope that my approach will not be a failure when I deliver my assignment
![]()
What do you say ?
Thanks
Marta
Originally posted by Marta De rossi:
Hi all !
I would like to join the discussion since I have taken a different approach.
I started with a SFSB facede for keeping Session information, then I decided to change it.
In fact I don't like very much to use both a Stateful SB and HTTPSession to store the handle(of SFSB). It seems more complicated and error-prone to keep up with both this session information.
Now I re-engineered it with just SLSB. I have inserted the ShoppingCart object in the HTTPSession for web clients and just kept it in memory for plain Java Clients.
I think it could make also the application more scalable.
I hope that my approach will not be a failure when I deliver my assignment
![]()
What do you say ?
Thanks
Marta
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Originally posted by Brian Smith:
Hello Guys,
This is very interesting dicussion topic and also this area is where I am struggling at. Thanks for initiating this topic.
As far as whether it's gonna work, it absolutely works. However, is this an ideal approach, I am not sure as the sun blue prints, its advisable to store the session in the EJB tier if the EJB tier is presence in the design in such a way that you don't have to maintain it in two places separately for Web Client and Java Client. Also, Is it scalable? I don't know - please how do you think it would be a scalable approach.
If I understood correctly, this dicussion seems to have suggested that it's a good idea to store the session centrally in a Business Delegate what would work both for Web Client and Java Client - leads manageability definitely. But I stil don't know how its gonna be implemented though. Do we store the Session Facade (SFSB) in some sort of collection in the Business Delegate? How do we design the Business Delegate? as a SLSB? How does clients access this BD? through Service Locator? How does the individual client keep its handle to the Session Facade? Please help understand this.
Thanks.
BR
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Originally posted by Andrew Zilahi:
BD is a POJO on the client/web tier, not a SLSB.
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Originally posted by Brian Smith:
Also, Is it scalable? I don't know - please how do you think it would be a scalable approach.
Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
Originally posted by Steve Taiwan:
I like Marta De rossi's idea.
The architecture of my last project is VB --> JCOM --SLSB. There is no way to store seesion or system information in such architecture
so we used Context Object to store the necessary information and passed it backware and forward in many tiers. No performance issue about Context Object. We pretty much like this design. I believe SFSB is too heavey and is not easy for programmers to implement. Most time SFSB shall be my last last last one choice.
I am constnatly, periodically reading threads here and do hope someone can porpose a better solution for this issue. I think, if no other solution for this issue, I am gonna use Context Object with SLSB because I have proved it worked well. I also believe Sun gives you an oppertunity to explain your design in the attached document.
[ November 21, 2006: Message edited by: Steve Taiwan ]
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
Originally posted by Steve Taiwan:
Dear Andrew.
Yes, I designed to do the second query based on the first query. I think this is much efficient.
If there are 10 itineraries from the frsit query and then user selects one, I only have to do the second query once based on the selected itinerary.If I don't do this, I might have 10*10 query in the first query and have to caache them in the Context Object, which is so fat.
I think i won't put a lot of imformation in Context Object and I don't plan to make Context Object a shopping cart. Airline seat booking is different from buying books in Amazon. So I don't make a shooping cart in the design. At the current stage, I have no plan to implement ValueListHandler
What do you think??
[ November 22, 2006: Message edited by: Steve Taiwan ]
Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
Also, Guys, FlyByNight already has one Application Server and 2 Web servers, is the intention to separately deploy the EJB plus business objects in Application server and the web tier (Servlets, JSPs, HTML and other stuffs) in those 2-web servers?
The term Web server can mean one of two things:
1. A computer that is responsible for accepting HTTP requests from clients, which are known as Web browsers, and serving them HTTP responses along with optional data contents, which usually are Web pages such as HTML documents and linked objects (images, etc.).
2. A computer program that provides the functionality described in the first sense of the term.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Steve Taiwan:
Dear Andrew.
Yes, I designed to do the second query based on the first query. I think this is much efficient.
If there are 10 itineraries from the frsit query and then user selects one, I only have to do the second query once based on the selected itinerary.If I don't do this, I might have 10*10 query in the first query and have to caache them in the Context Object, which is so fat.
I think i won't put a lot of imformation in Context Object and I don't plan to make Context Object a shopping cart. Airline seat booking is different from buying books in Amazon. So I don't make a shooping cart in the design. At the current stage, I have no plan to implement ValueListHandler
What do you think??
[ November 22, 2006: Message edited by: Steve Taiwan ]
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1
Originally posted by Dan Drillich:
Hi Brian,
What do you think?
Regards,
Dan
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
Originally posted by Durgaprasad Guduguntla:
If we assume that the web container and EJB container are colocated within the same Application server, we can use local interface for the web application and remote interface for the swing client, for accessing the facade to businnes tier. That way we can confine RMI communication to swing client only and on the other hand as the web client uses local communication, there will be a significant improvement in performance. What do you think?
If we assume that the web container and EJB container are colocated within the same Application server, we can use local interface for the web application and remote interface for the swing client, for accessing the facade to businnes tier. That way we can confine RMI communication to swing client only and on the other hand as the web client uses local communication, there will be a significant improvement in performance. What do you think?
Anything to do with dynamic request are routed to Application server where Servlet, JSP, EJB and other business objects are deployed to support business logics. I think the hardwares mentioned in the conversation with CIO can be utilized just this way.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Brian Smith:
That's what I am considering doing. I am wondering if we can know whether web clients performs better over the swing client or vice-versa. One the requirements is to provide FBN reps faster performing client to support their customers over the phone. Please let me know what you guys think.
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
Steve,
Can you please clarify what you mean by "If there are 10 itineraries..."? I was talking about caching flights for 1 itinerary only, plus alternative cheaper ones within the hour. I feel that 100 is exagerated (at most 10 in my assumptions).
Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |