Cesar Koot

+ Follow
since Dec 10, 2009
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Cesar Koot

While studying for JPA exam I encountered this text in the enthuware exam, handling transactions and locking:
"Entity relationships for which the locked entity contains the foreign key will also be locked, but not the state of the referenced entities (unless those entities are explicitly locked)."

What does it mean when a relationship is locked but the state of the entity isn't? Does this mean the referenced entity can't be deleted but can be updated?
It's important to know what the persistence unit root is. The persistence unit root is the JAR or directory that contains the META-INF directory where the persistence.xml file is located.

So I'm with you on both examples: I think it needs to be ../lib/warEntities.jar for the first and in the second example, in which the JAR is the root, I believe it needs to be ../../lib/earEntities.jar

Can anyone shed a light on this please?
I'm sorry but I'm totally wrong on this. Chapter 7.7 of the specs made me realize that.
Hi Ramy

To answer your first question: No it's not possible to use extended scope for persistence context. Extended scope is initiated by EJB's, which in turn need a container. So extended persistence context is per definition container managed.
In that case you don't need to join transactions either, but I'm not 100% sure if I'm right about that one.


Paul Anilprem wrote:I tried to refrain from posting a reply on this topic but what the heck!

I'm glad you replied though :-)
I agree with you, Criteria is too different from anything else to simply get a grasp on if you're not used to it (that's why we're learning for this exam, right? :-p).

But what I love about it, is that it's way easier to mock and test than those pesky sql strings. How many times I've seen change be made in the database (for example change the name of a column), only to discover an sql query to fall over in production because there's just no way to test your queries. So I agree with you that it's hard to learn and read, but if all kinds of developers start to delete Criteria code in preference of sql or jpql, that's just bad, hire someone else (someone with a JPA Certificate :-))
I'm prepping for JPA exam for quite a while now. I've read the right chapters of the Pro JPA 2 book and now I'm doing the EPractize labs mock exams. And I must say, the EPractize mock exam program would be great if it didn't have all those errors! I've tried to give them feedback with the feedback-tool inside the program but no result.

Let me give an example.

Question: Which statements are true when a developer maps abstract entity class A with concrete sub-classes B and C, using the single table per class hierargy strategy? (what is a single table per class strategy anyway?)
A) Instances of B and C are stored in the same table.
B) Columns that correspond to fields in A must be defined nullable.
C) Fields in A are stored in a different table than the fields declared in B and C.
D) Columns that correspond to fields in B and C must be defined nullable in the database.

As a matter of fact I don't believe any of the above are true, but the program says A and D are correct. And this is but one example.. and I'm not even talking about the many typo's (they typed 'Int' instead of 'int', so I choose it to be a wrong type for Id... answer not correct...). It's true that because of this error, it triggered me to search it up in the book and the specs, but it shouldn't be the case of course.
Hello friends,

I'm having trouble retrieving e-mail from an Exchange server using Java. Right now I use the Apache Slide project to set up a connection with the OWA web access part of the Exchange server, so I can retrieve EML files. But for my project I need MSG files... Is there any way to convert the EML files to MSG, or is there a way to retrieve MSG files directly from Exchange? Any help would greatly be appreciated, my project ends at the end of this month so there's quite a bit of hurry to this...

I crossposted this question on stackoverflow: http://stackoverflow.com/questions/1880922/java-ms-exchange-how-to-retrieve-msg-files