This week's book giveaway is in the JDBC and Relational Databases forum.
We're giving away four copies of Murach's MySQL and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Darshan Karandikar

Greenhorn
+ Follow
since Aug 14, 2006
Merit badge: grant badges
For More
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 Darshan Karandikar

Hi,

Here is the list of books I referred to for SCEA I:

-The EJB 1.1 book from Monson-Haefel (O'reilly)- Did 2 to 3 revisions of this book (page by page).
-Design Patterns:GoF
-Mark Cade's book
-UML Distilled
-Jamie Jaworski's book for legacy connectivity, security
-Ramu Meda's notes on common architecture from one the SCEA yahoo groups
-2nd chapter of UML User Guide.
-JMS by Monson-Haefel (O'reilly)
-Internationalization tutorial from Sun

Hope this helps.

All the best!!!

-Darshan.
The book "JAVA 2 CERTIFICATION BY JAMIE JAWORSKI" has a chapter on Legacy Connectivity and it is very informative.

-Darshan.
There is no single book that covers part 1 completely. Here is a list of books/notes I had used:

-Design Patterns:GoF
-Mark Cade's book
-UML Distilled
-Jamie Jaworski's book for legacy connectivity, security
-Ramu Meda's notes on common architecture from one of the SCEA yahoo groups
-2nd chapter of UML User Guide.
-JMS by Monson-Haefel (O'reilly)
-Internationalization tutorial from Sun

Regards,
Darshan.
(SCEA Part 1).
As with few other questions in these mock exams, I think the answer to this one also is not that objective in nature- given the 2 close options. The choice of Template or Strategy depends on whether the "complete" algorithm / business logic or just a "part" of it needs to be changed based on some parameter (like �country� in this case). The question does not clarify whether the person wants to change the business rules "completely" or "partly", but the term "somewhat differently" is comparatively close match for "partly change the business rules�. Based on these words used in the question, �Template� pattern looks a closer fit than �Strategy� (again, this is just the closest I feel- but Strategy is also not completely wrong either).
On a lighter note- I think the best person to make this decision is that person him/herself who knows �the extent to which� he/she wants to vary the business rules since the creator of the question hasn�t clarified that person�s intentions in the question.
As you said in points 1 and 2, yes, if certain things are addressed in the specs, then "multithreaded stateless session beans" can exist. I was trying to highlight the probable reasons for not allowing this in "existing" specs which surround the implementation of a statless sb.

Point 3- SessionSynchronization - I missed that the specs say slsb "must not" implement SessionSynchronization. I better read the specs once again before answering next time...

Point 4- EJBContext - As you stated, it is possible to address the issue with not-so-elegant implementation around existing specs, or address the issue in the specs itself to ensure elegant implementation.


One more point for discussion: The "Concurrency" primary service (supported by an EJB server) specs state that-
"Session beans do not support concurrent access. This makes sense if you consider the nature of both stateful and stateless session beans.....Stateless session beans don't need to be concurrent because they don't maintain state that needs to be shared. The scope of the operations performed by a stateless bean is limited to the scope of each method invocation. No conversational state is maintained.....In a distributed object system, problems arise when you attempt to share distributed objects among clients. If two clients are both using the same EJB object, how do you keep one client from writing over the changes of the other? If, for example, one client reads the state of an instance just before a different client makes a change to the same instance, the data that the first client read becomes invalid....EJB has addressed the dangers associated with concurrency by implementing a simple solution: EJB, by default, prohibits concurrent access to bean instances."[O'reilly EJB book]

It talks about
1) clients sharing same EJB obejct (not bean).
2) clients overwriting each others "states".

Since we are discussing about sharing "stateless" session bean "instance" (not its EJB object), these reasons for "not allowing concurrent access to slsb instance" doesn't seem to be relevant for this discussion.

To summarize: The possibility of having a multithreaded slsb doesn't sound like an inefficient way of handling slsb (assuming issues like handling system exceptions, session context etc. are addressed in the specs), unless someone throws some light on why the specs didn't and someone shouldn't consider this approach.
Some of the reasons why I think a pool of stateless session beans is necessary (the excerpts referred below are from the O�reilly EJB book):

1)�Beans that are involved in transactions are subjected to the isolated ACID property, which means that their services cannot be shared during the life of the transaction.� [O�reilly EJB book]. If my interpretation of �services cannot be shared� is correct, then that means no other client can access the same method of the stateless session bean already involved in a transaction. Hence just having one instance of a stateless session bean will be a bottleneck if it is involved in a transaction.
2)�When a system exception occurs, the bean instance is discarded, which means that it's dereferenced and garbage collected. The container assumes that the bean instance may have corrupt variables or otherwise be unstable, and is therefore unsafe to use. The impact of discarding a bean instance depends on the bean's type. In the case of stateless session beans and entity beans, the client does not notice that the instance was discarded. These types of beans are not dedicated to a particular client; they are swapped in and out of an instance pool, so any instance can service a new request.� [O�reilly EJB book]. Hence having only one instance of a stateless bean can impact the availability of the service it offers in case a system exception occurs in one of its methods while serving a client request.
3)�If, however, the session bean is managing database data for the user, it may want to know about the beginning and ending of user transactions, so that it can cache data at the start and commit its database updates at the end. For this reason, the EJB specification allows session beans to optionally implement the javax.ejb.SessionSynchronization interface. By implementing this interface, the session bean indicates that it wants the container to notify it about the beginning and end of transactions.� [O�reilly EJB book]. This is related to point no. 1) above � �Session beans involved in transaction�. Though use of SessionSynchronization may make more sense for a stateful session bean, it is still available for stateless beans. Hence I am not sure how only one instance of a stateless session bean serving many clients can handle SessionSynchronization in a transaction.
4)�The SessionBean.setSessionContext(SessionContextcontext) method is invoked on the bean instance. This is when the instance receives its reference to the EJBContext for its lifetime. The SessionContext reference may be stored in a nontransient instance field of the stateless session bean. Everything a stateless session bean method needs to know has to be passed via the method's parameters. The only exception to this rule is information obtainable from the SessionContext and in EJB 1.1, the JNDI ENC.�[O�reilly EJB book]. Hence if only one instance of a stateless session bean is shared by multiple EJBObjects, how that one instance will be able to get a reference to its corresponding EJBObect through its nontransient sessioncontext field?
Super score!!! Congratulations!!!
17 years ago
Thanks!

Back calculating from the percentages, there must have been around 5 questions on legacy connectivity...

Regards,
Darshan.
Thanks Satish.

1. Are all the questions in EJB related to 1.1 Version in Exam Yesterday.
(i.e. J2EE 1.2 or 1.3)
2. How many questions you got in Security & Legacy Conn.



1. All EJB questions were related to EJB 1.1
2. Security - 2, Legacy connec.- 1 or 2 (don't remember exactly)

Regards,
Darshan.
Tried deleting and closing it too...getting following message:

"Only administrators or moderators may perform this action. "

Regards,
Darshan.
Sorry for posting the previous topic twice...happened by mistake..

-Darshan.
Hi All,

Passed part 1 today. Details:
Total: 95%
Breakup:
Legacy Connectivity : 80%
Security : 50%
Rest : 100%
Firstly, thanks to whoever started this forum!!! and then, thanks to you ranchers for posting the valuable discussions...the discussions helped me surely during my preparations...
Let me share some information for those who are planning to take part 1:
I didn't get any time to review the answers (!!!)...yes, even I was scared a bit during the test when I realized I am not going to get time for review...but I followed the stratgy of reviewing each answer at least twice immediately after answering it (I answered my last question in this way when there were 2-3 minutes left from time.)
1) I did not have any real world experience of working with EJBs, JMS. Also, did not get a chance to use other concepts (security, design patterns) extensively...hence had to prepare for long(ggg) time...long(ggg) time = 4 weeks time off from work + some hours on weekends...had to grasp EJB concepts starting from 0, and thanks to the EJB 1.1 book from Monson-Haefel (O'reilly)- I managed to understand the EJB world...did 2 to 3 revisions of this book (page by page).
2) Other books/notes referred:
-Design Patterns:GoF
-Mark Cade's book
-UML Distilled
-Jamie Jaworski's book for legacy connectivity, security
-Ramu Meda's notes on common architecture from one the SCEA yahoo groups
-2nd chapter of UML User Guide.
-JMS by Monson-Haefel (O'reilly)
-Internationalization tutorial from Sun
3)Mock tests-
Whizlabs + other online mocks listed in this forum in various posts...
About Whizlabs: After reading some negative reviews about quality of Whizlabs mocks, I was confused whether to go for it or not...finally, got it 1.5 week before exam date...and here are some comments from me about Whizlab mocks-
-some questions were too ambiguous to even understand the meaning of the question...
-some answers were conflicting with information available in other online resources / some answers had no reasoning.
-some questions were on EJB 2.0 and J2EE design patterns with a note stating:"This question is applicable for EJB 2.0 version of SCEA". No explanation from Whizlab so far on why they included these in current mocks when the real test doesn't yet cover EJB 2.0 and J2EE Design Patterns.
Well, these things somewhat scared me- especially given that I came across them just 6-7 days prior to exam day...
Given all this, still Whizlabs surely helped me feel bit confident by practicing a lot and get a feel of the real exam. Especially, when it came to handling those tricky ones...some of the questions and Whizlabs notes were really good to enhance understanding of the topic...
4) (I hope you're not tired of reading yet...so some more). A suggestion: Try to understand the concepts from books and other online resources as much as you can, rather than concentrating on mocks. But yes, practice as much as you can with mocks when you feel you have understood the concepts enough to try your knowledge to answer questions based on them.
5) All the best to all those who are going for part 1 (and 2 and 3)!!!

Have a good one.
Darshan.
Hi All,

Passed part 1 today. Details:
Total: 95%
Breakup:
Legacy Connectivity : 80%
Security : 50%
Rest : 100%
Firstly, thanks to whoever started this forum!!! and then, thanks to you ranchers for posting the valuable discussions...the discussions helped me surely during my preparations...
Let me share some information for those who are planning to take part 1:
I didn't get any time to review the answers (!!!)...yes, even I was scared a bit during the test when I realized I am not going to get time for review...but I followed the stratgy of reviewing each answer at least twice immediately after answering it (I answered my last question in this way when there were 2-3 minutes left from time.)
1) I did not have any real world experience of working with EJBs, JMS. Also, did not get a chance to use other concepts (security, design patterns) extensively...hence had to prepare for long(ggg) time...long(ggg) time = 4 weeks time off from work + some hours on weekends...had to grasp EJB concepts starting from 0, and thanks to the EJB 1.1 book from Monson-Haefel (O'reilly)- I managed to understand the EJB world...did 2 to 3 revisions of this book (page by page).
2) Other books/notes referred:
-Design Patterns:GoF
-Mark Cade's book
-UML Distilled
-Jamie Jaworski's book for legacy connectivity, security
-Ramu Meda's notes on common architecture from one the SCEA yahoo groups
-2nd chapter of UML User Guide.
-JMS by Monson-Haefel (O'reilly)
-Internationalization tutorial from Sun
3)Mock tests-
Whizlabs + other online mocks listed in this forum in various posts...
About Whizlabs: After reading some negative reviews about quality of Whizlabs mocks, I was confused whether to go for it or not...finally, got it 1.5 week before exam date...and here are some comments from me about Whizlab mocks-
-some questions were too ambiguous to even understand the meaning of the question...
-some answers were conflicting with information available in other online resources / some answers had no reasoning.
-some questions were on EJB 2.0 and J2EE design patterns with a note stating:"This question is applicable for EJB 2.0 version of SCEA". No explanation from Whizlab so far on why they included these in current mocks when the real test doesn't yet cover EJB 2.0 and J2EE Design Patterns.
Well, these things somewhat scared me- especially given that I came across them just 6-7 days prior to exam day...
Given all this, still Whizlabs surely helped me feel bit confident by practicing a lot and get a feel of the real exam. Especially, when it came to handling those tricky ones...some of the questions and Whizlabs notes were really good to enhance understanding of the topic...
4) (I hope you're not tired of reading yet...so some more). A suggestion: Try to understand the concepts from books and other online resources as much as you can, rather than concentrating on mocks. But yes, practice as much as you can with mocks when you feel you have understood the concepts enough to try your knowledge to answer questions based on them.
5) All the best to all those who are going for part 1 (and 2 and 3)!!!

Have a good one.
Darshan.
Rayssa , thanks a lot for the information!

The thread that you referred is dated back to Dec 2005 and it has a comment "you can expect SCEA based on java EE 5.0 after an year or so. I heard from Bert that it's not going to be updated for quite a long time ".

I am not sure why Whizlab included EJB 2.0 and core J2EE design patterns in the mocks, but looking at the above mentioned timeline, I just want to make sure that its still EJB 1.1 for part 1 in Dec 2006.

Though the technology versions shouldn't matter much when you are expected to apply the concepts more (as in this exam), but still it will be really helpful if Sun mentions the J(2)EE or EJB version for part 1...

Can anyone who has appeared for part 1 recently please confirm about the EJB version and core j2ee patterns?

Thanks for your time!

Regards,
Darshan.