Bobby Jakachira

Greenhorn
+ Follow
since Jun 01, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Bobby Jakachira

The two exams are different and they test one's skills of different specifications and paradigm.

Visit the Oracle site and check both exams' objectives.

The fact that you do not understand what Web services are means you have no experience in that area. It is pointless to certify on something that you do not have experience on. These certifications are helpful to people who are in the field. This is the reason why I can't go on and do Architect exams as this is pointless until i am actually employed in the field.

In very basic terms, Web Services are services deployed online that clients can utilize through a number of protocols such as SOAP. Clients can be any application written in any language.

Web Component certification deals with the specification request for developing Java Web Applications..
Yeah, its there.. sat for it last month.
Congratulations!!

I am preparing go write this exam on Saturday. What sections do you think you missed in the exam?
10 years ago
Transaction semantics span between the two exams. You are required to know Transactions Demarcations and Propagation. It forms almost 15% of the exam. You also need to know how to integrate JPA with the EJBs. But the spec covers everything you need for the exam. You need to know what type of Persistence Context used in Stateful or in Stateless session beans for example. You need just a ground-up knowledge of EJBs, I must. The section for Handling Exceptions also always sneaks in between the two exams.

If you haven't sorted this out already, it is highly likely that this section below is the culprit. I would assume that the cabin_id is being persisted before you reach line 3. The reason lies with how you are propagating your transactions.



When you create the employee, you are passing in a department object which, for this to work, should have empCabin already. You are using container-managed transaction in you beans so once the method finishes the transaction will commit. For this to work before line 2, make sure you set the empCabin. Try that and see how it works..

Yes it is part of the exam

Metamodel API allows you to use STRONGLY typesafe queries when using Java persistence interface.

A simple example is you won't refer to column names in your queries with the physical column names but you utilise the Metamodel class of the entity.

Each entity have a corresponding Metamodel class

tbl_persons.age (table_name.column_name)

Person_.age (Metamodel).

The easiest way of thinking about this for anyone who would want to know is take

Map<key,Value>

Forget about Key type.. The value part is the important part for mapping the relationships.

You only put relationship annotations to real entities. thus the value part should be an Entity and nothing else for this to be marked @OneToMany etc.

Anything else as a Value part, such as embeddables and basic types should be mapped as @ElementCollection.

For the exam, mapping keys to the database is important and tricky. I got 11% less because of that section.

P Wang wrote:For people who have taken the test, do you know if the test cover subjects that are in the JPA Pro2 book and spec but are not in the test objectives? Subjects like Cache, Validation, XML Mapping file, Packaging, and EJB3.

Thanks in advance.



Everything you have mentioned except the EJB3 part. But in the EJB3 you need to know the transactions semantics. 15% of the exam is about transactions.
I understand but with a REQUIRES_NEW transaction attribute defined on the method being called by the client in a transaction context there is No way the client's transaction can be marked for roll back. The client itself should decide after catching the exception whether to rollback or continue. It cannot be marked for rollback because the method does not have the handle to client's transaction. I also do not think the container can even act on it because doing so will certainly create parallel open transactions. It CAN ONLY be marked for roll back by the client himself should he think that the exception received from such method warrants a rollback.

Client - tx1

MethodA - tx2 (with RequiresNew)

Client calls MethodA with transaction tx1, the container suspends client's transaction tx1 and the container creates transaction tx2. If MethodA then throws an exception that requires a rollback, ONLY transaction tx2 will be marked for rollback when the methodA finishes. At this stage the MethodA does not have a handle to tthe ransaction tx1 and cannot do anything about it. The client will then get an exception and decides whether to mark the transaction for rollback or not.

Please correct me if I am wrong, I need to be sure that I understand this part correctly.
Client's transaction context is important always.

A..If the client has a transaction context, it means he wants the process to be transactional - atomic principle applied, all or nothing

B..if the client does not have a transaction context, then it's quite possible that the client does not mind the atomicity of the proccess.

For A, a method with the REQUIRES_NEW transaction attribute will NOT mark the client's transaction for roll back if an exception happens, system exceptions and application exceptions marked to achieve a rollback, because the transaction running is not the client's one. The new transaction will be rolled-back but the client's transaction will continue. REQUIRED attribute will mark the client's transaction for rollback because the method will run using the client's transaction and thus it will be affected directly.

For, B, No client's transaction context means on the client's perspective nothing will be marked for rollback because there is no transaction to talk about. The client will not even know that there are transactions, if any, running behind the scenes.


Transactions form almost 15% of the exam. The reason is Java entities and underlying RDMS are almost always involved in most of these transactions. EntityManagers and EntityManagerFactories are transaction resources.
On top of it all, do a simple project using one of the JPA providers around. Hibernate being the best. EclipseLink has few pending issues but good as well.

Get your hands dirty before you go to the exam. Read and code.
I cleared this stubborn exam today with 89%. Surprisingly, I thought I will perform badly on the Criteria API questions. They form almost 10% of the exam, I got them all. :-)

Locking, Caching, Transactions and ORM concepts are all part of the exam. I have to mention that the part of overidding metadata in almost in all of these topics. They like those type of questions. Overriding Embedded attributes, overriding TransactionAttributes in subclasses beans, overriding in Advance collection mapping (Maps and Element collections), overriding between entity annotations and orm.xml file etc :-)

The topic that I didn't do well is the Advanced collection mapping.. using Maps. I did lots of practice for this topic and EclipseLink has a defect on persisting attributes that are mapped as Maps.

Used Enthuware Exam and the Pro JPA 2 - Mastering the Java Persistence API Nov 2009... and lots of experience at work.
Next up is the 1Z0-895
11 years ago
Hello

I would like to ask a question that has been troubling me a lot, both in Java and PHP

Lets say i have a POJO called Journal [variables - Articles List, Volumes List, Issues List]

Lets say I'm suppose to show Journal titles on the homepage.. what is the best way to load up the data from the repository?

Can I load say 20 journals each with all the lists and save in the cache?

Or should I only load what I think its necessary at the time (making round trips to the database).

Some of these objects becomes very large because of class composition. I page the results

or how far can anyone load data in a hierachy like this

journal->volume->issue->absctract : Which means a JOURNAL object will have a list of volumes, each having a list of Issues. Each issue a list of abstracts.


Is there a danger of loading the complete Journal object with paged lists results? Problem