Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Richard Duglora�

Greenhorn
+ Follow
since Sep 17, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Richard Duglora�

Originally posted by CS Yee:
Is the UML 2.0 acceptable for the part II/assignment?



It would be absurd if it was not !

Richard
I read somewhere that time limit for part III is 90 mn, is it right ?

Any clue about the length (in pages) of the essay? 90mn suggests a sowewhat elaborate response...

Richard
Actually a SFSB was my first choice but I started doubting when I realized that performance seemed to be a major requirement in the specs (20 travel agents + 600 web users max concurrently). Some books recommend to go for SLSB when you need performance. As I already mentioned I also lack concrete experience with the EJBs, which makes hard to compare and weight the different options.

But you have enlightened me, and I'm ready to adopt a SFSB now.

Thanks for the hints

Richard

Originally posted by Rahul Devgan:
Within Java are JDBC and JNDI implemented using Abstract Factory. Can somebody give me a concrete understanding of this design pattern



Remind me of an old (and passionate) debate involving - among others - the Abstract factory: https://coderanch.com/t/152700/java-Architect-SCEA/certification/Please-opine

You may also want to have a look at one of these links:

http://home.earthlink.net/~huston2/dp/factory.html
http://en.wikipedia.org/wiki/Abstract_factory_pattern
http://exciton.cs.oberlin.edu/javaresources/DesignPatterns/FactoryPattern.htm
http://www.dofactory.com/Patterns/PatternAbstract.aspx

HTH

Richard
Parag:

Originally posted by Parag Doshi:


The reason I didnt bother with local or remote interface was because I know app servers (atleast 2 of them - Borland, Weblogic) which do co-located call optimization implicitly. i.e. if it senses that the call to a ejb is co-located in the same jvm, then it does the necessary optimization which is quite similar to using local interfaces. And if these 2 are providing that service, I can imagine others also providing the same.



Thanks for the info, that's useful. I'm a not a beginner in Architecture but I do lack concrete experience with the EJBs.
To me a double remote call (client->Facade and Facade->SFSB) seemed to void the benefit of the SLSB fa�ade, hence my efforts to use the local ref. But if it can be optimized automatically by a smart container...

BTW, I borrowed the SLSB facade idea from... one of your post

Richard
Ajith,

Originally posted by Ajith Kallambella:

Whoa...that is certainly a distorted approach I am not sure why such a thing is neede, and not least of all, if you had to do this, you should be questioning your design decision to make B local.



Well, let's say A is a Stateless Session Facade and B a Stateful Session Bean, and A and B are in the same JVM. You want to have a stateless facade rather than a stateful one because 1-it's lighter 2- some business services are non conversational (in which case you don't need any session state) so in these cases a stateless bean is likely to achieve a better performance.

To implement the idea, you have to pass a ref to B (the stateful bean) as an arg in every call to a "stateful" service. It can be a remote reference to B, but since this ref will only be used locally by the facade A, I was wondering if an optimisation was possible by using a local ref rather than a remote one.

Now if Sun forbids it, I can imagine an alternate solution like using a helper with a local map: someSessionId -> local ref to B on the EJB tier, passing someSessionId to the fa�ade that would use the helper to get the local ref to B. Even if it may look twisted, it's probably faster that to use a remote ref.

Maybe I'm entirely missing the point. Your opinions are welcome.

Richard
- Is RMI-IIOP over SSL possible and if yes is it common ?

- If I have 2 EJBs A and B, is it possible to transmit to a (remote) client a local (EJBLocalObject) ref to B, then have the client pass to A the local ref to B (as an argument in a call), and make A call B via this ref ?

Richard
Parag

I agree that at first glance AbstractFactory could be used, with each family representing a type/model of computer, and parts being the CPU, HDD and RAM. Once you have choosen a factory for a certain model, you wouldn't be able to create illegal parts.
But you want to build a computer composed of exactly one CPU + one HDD + one RAM, not parts individually. The AF pattern controls that you can create only legal parts, but doesn't control the number of parts nor their composition, so you can create say a computer with 5 CPU + 2 HDD + 0 RAM, which is not what you want to get.

OTOH, with the prototype pattern, you would have 3 prototypes representing the 3 possible computer models (each made of a specific combination of CPU, HDD & RAM), and building a new computer would simply consist in copying/cloning one the prototypes, very much like in the industry. This way, it's impossible to build an illegal system.

Richard
There are places in the use(less) cases suggesting that the list of itineraries should be "saved", in order to be presented to the customer later.
If "later" means beyond the current session then yes, the itinerary list should be persisted. Otherwise I see no need.

It's also hard to determine whether the itinerary list should be attached to the customer account or to the session because most use cases require the customer to be logged in (including the ones where the list is accessed), which may suggest that the 2 are linked. But it is not explicitely stated, so I'd lazily go for no link (ie list is just attached to the session). Besides, it doesn't make much sense IMHO to keep a selection of flights forever.

These use cases are incredibly ambiguous and twisted (I don't think I'd hire the business analyst . In real life, we could talk to the client to clarify these points. But for this exam we are on our own

Richard
I've seen this question in the whizlabs mock exams and if I remember well their answer was Builder.
But I disagree with them, I think the correct answer is prototype because you can only purchase a clone of one of the 3 prototypes. You cannot freely combine the parts to get a new computer, so it's not a builder. And finally, your goal is not to create related parts but to get a whole computer, so it's not an abstract factory.

Richard

Originally posted by calvin zhu:


Man, I don't know why u would worry at all. Since like you said, they all succeeded, then just following one path.



Well, I guess that we all worry more or less since we read this forum
I'm confused about the sequence diagrams:
Among the top scores for part 2/3, some recommend to stay at an abstract business level and show only objects from the class diagram, while others recommend to describe interactions at the component level. Personally, I lean toward the former (to stay at an abstract level).

Since these people all succeeded, I'm wondering if it matters that much?

Richard
Here is what I use :

  • General Design patterns by the GoF - the bible!
  • J2EE patterns - particularly useful for part II of the certification
  • UML distilled (3rd edition) by Martin Fowler & Al


  • HTH

    Richard
    Hi

    I'm working on the SCEA assignment (FBN) and I'd greatly appreciate some advice from you guys:

    1- It seems to me that an Itinerary doesn't need to be persisted as an EntityBean until (and unless) it is paid, since it is kept only for the duration of the customer's session. Am I wrong ?

    2- I assume that only ONE component diagram is allowed (right?). In your opinion, is it better to explicitely draw every BusinessDelegate, Controller, JSP form... at the risk of cluttering the diagram, or is it better to show generically the patterns employed and add a note listing the objects to which they apply ?

    Thanx

    Richard