*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Best Answer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Best Answer" Watch "Best Answer" New topic
Author

Best Answer

arusha khan
Greenhorn

Joined: Dec 08, 2004
Posts: 9
Following are the Q's:


How can storing session information in a Session Bean be more scalable over storing session information in HttpSession?
Choice 1

Session Beans can survive a server crash.
Choice 2

Session Beans can be activated/passivated.
Choice 3

Session Beans can use container managed persistence.
Choice 4

Session Beans can be used by multiple client threads.
Choice 5

HttpSession requires use of cookies or URL rewriting.



I think 5 and 3 are correct. which is a better ans?

===================================
What is the importance of using design patterns in J2EE applications?

1 Design patterns increase code duplication.
2 Design patterns make applications architectually robust in the long-term.
3 Usage of design patterns is mandated by J2EE 1.4 specification for web and business logic tiers.
4 Design patterns reduce the amount of code developers would have to write.
5 Design patterns provide better compatibility with other application servers.

I think 4 but 2 is also good choice???
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Originally posted by arusha khan:
Following are the Q's:


How can storing session information in a Session Bean be more scalable over storing session information in HttpSession?
Choice 1

Session Beans can survive a server crash.
Choice 2

Session Beans can be activated/passivated.
Choice 3

Session Beans can use container managed persistence.
Choice 4

Session Beans can be used by multiple client threads.
Choice 5

HttpSession requires use of cookies or URL rewriting.



I think 5 and 3 are correct. which is a better ans?


Why 3? CMP is for Entity Beans.


SCJP, SCJD, SCWCD, SCBCD
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Originally posted by arusha khan:
What is the importance of using design patterns in J2EE applications?

1 Design patterns increase code duplication.
2 Design patterns make applications architectually robust in the long-term.
3 Usage of design patterns is mandated by J2EE 1.4 specification for web and business logic tiers.
4 Design patterns reduce the amount of code developers would have to write.
5 Design patterns provide better compatibility with other application servers.

I think 4 but 2 is also good choice???


I have my doubts with 4. Isn't it possible that with design patterns you even write more at the begin.
Gabriel Buheler
Ranch Hand

Joined: Apr 21, 2004
Posts: 39
Definitely the answer is 4 and 2.

Choice 1: is not talking about scalability, that is fail over, and that depends on the implementation of the application server. Something not defined in specification.

Choice 3: does not exist with Session beans.
Choice 5: NA

Then the benefits of activate/passivate is that the EJB container would know when it performs these operations to be more efficient, when holding several instances.

And remember one of the benefits of EJB's are that they are thread-safe.

Gabriel
Manish S Malhotra
Ranch Hand

Joined: Jan 19, 2007
Posts: 61
Ques 1:
Ans: Option 2.

Because using DP wont assure to reduce the amount of code which a developers write.

Ques2:
Ans: 2 & 4 as the Gabriel said is pretty correct.

As support of client from multi threads means scalable, and passivation and activation process is also to save the resources of the container to serve to more users / clients which is also related to scalability.

Regards,
Manish


"Abstraction is the key thing while designing"
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Best Answer