Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

bernard savary

Ranch Hand
+ Follow
since Jan 09, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by bernard savary

I was hoping sun would come out with a new scdjws exam atleast by end of this year and I think with the new book by the exam authors planned for dec 2008, probably means this "current"(outdated) exam is here to stay !
I read chapters 3 - 7 from pro ejb
Hi all ,

Today i cleared the exam , got 59 of 61 quetions right . There were some really easy as well as some tough questions . for scbcd i prepared for 2 months exactly . i used the following material :
1. EJB in action
2. Pro EJB 3 - (Few chapters)
3. MZ's notes
3. Enthuware mocks
I also referred the specs for sections which were metioned in enthuware .
I think enthuware really helps !

Its been a marathon of sorts for me , ive now taken SCJP5(97%) , SCWCD(92%) and SCBCD (96%) in the last 4 months . My new year resolutions are now fullfiled time to party!!! Good luck to all d guys preparing ...
Hi ,

Entity manager operations like persist , merge etc when called through a transaction scoped entity manager requires a transaction context to be present or else an exception will be thrown . So if you want to update the entity using a transaction scoped EM , then you will have to do it inside a transactional context .
Hi ,
Unidirectional OneToMany relationships are not directly supported by JPA however they can be done by the use of a @JoinTable (similar to ManyToMany)
I think its best you read this part from the specs .

Only these methods can specify transaction attribute
The enterprise bean�s business methods, message listener methods, business method interceptor methods,
lifecycle callback interceptor methods, or timeout callback method

I have doubt realted the above , how could transaction attributes be applied for lifecycle call interceptor methods. Life cycle method do not execute with under any security or transaction context.Can someone tell me how it makes sense to apply transaction attribute on lifecycle callback interceptor methodslifecycle callback interceptor methods. thanks !
I think ENC is the context of the component(bean environment) , it is usually of form java:comp/env It is like a programmer reference to the operational environment and is independent of the operational environment. In case of JNDI global names it is the deployer who is responsible for configuring a resource in global JNDI and then he/she should map the global JNDI names to the specific component ENC reference .In most contaners , if the global and ENC names are the same then the ENC is resolved utomatically by binding to the global JNDI name.
The blog says the exam has 180 qns and 5 hrs to take . I think its incorrect information . Below are details from Sun :

Prerequisites: Sun Certified Programmer for the Java 2 Platform (any edition)
Exam type: Multiple-Choice, Scenario-based questions and Drag-and-Drop questions
Number of questions: 61
Pass score: 59% (36 of 61 questions)
Time limit: 145 minutes
Thanks a lot Alim . The Answers were in great demand . By the way , did you do it yourself ?
hi nitin
It depends whether your exception is a checked or unchecked exception . In case of checked exception it will reach the client , in case of unchecked it will be considered as system exception and a EJBException will be sent to the client. However we can have a unchecked exception propagate to client as it is by marking it with @ApplicationException .
Hi ,

In the exam objectives its metioned in single line annotaions/xml equivalents, but in reality there are some many of them . Do we have to memorize all the XML elements in ejb-jar.xml , persistence.xml , orm.xml and also the annotations ? Do you think on the real exam it is very important to compelety know the xml & annotations ?
Which one should be given more importance .Please advice .
Hi ,
I think a ejb called with a remote interface will always follow the remote semantics (with marshalling , unmarshallling etc..) I am saying this because I was just testing propagation of Container manager PersistenceContext with extended scope ,basically to test Persistence context inheritance. I was calling a stateful session bean from another, I passed the reference of a new entity(detached) from Bean A to Bean B ,and in Bean B method, I do a persist of the new entity.
and I noticed that after the Bean B method call returns ,the state of entity in Bean A i.e whether it is managed or detached was dependent on the type of interface I used to call Bean B from bean A. When I use Local then the entity remains managed in BeanA but if I use remote it is detached .This is because using a remote will serialize the entity and results in entity being detached .
Hi try running it without using the mappedName . Dont use mappedName with @Stateless or @Stateful as well
Hi ,

I have used @EJB in glasfish to call a EJB from a servlet . It works fine. I think you could be missing something with the JNDI names , Please check the server logs for NamingException. Also I would like to add that DI cannot be used in JSP's and helper classes . We have to use a JNDI Lookup . (Refer page 440 in ejb3 in action )
Ok I figured out my problem . I wasnt using the innodb engine in mysql . Besides the java.sql.connection.commit throws runtime exception when used inside CMT!