Transitive closure in
java parlance means recursive traversal of all objects referenced from within the bean's instance.
An example would be a Customer Session Bean with the following instance variables:Account & Profile (just consider these two instance variables as POJOs).
The Account object has the following definition:
public class Account
{
public
String accountId;
public String accountName;
public Orders[] accountOrders;
public Profile aProfile;
}
public class Profile
{
public String profileId;
public String nickName;
public String preferredVendor;
}
public class Orders
{
public long orderNumber;
public String productOrdered;
private String notPartOfTransitiveClosure;
}
Transitive closure would imply that from an Account oject, say myAccount, we can do the following:
(1) You can refer to all Account object's instance variables (myAccount.accountId, myAccount.accountName,
myAccount.accountOrders, myAccount.aProfile)
(2) You can also refer to myAccount.aProfile.profileId, myAccount.aProfile.nickName, myAccount.aProfile.preferredVendor
(3) You are also able to access myAccount.[orderIndex].orderNumber, myAccount.[orderIndex].productOrdered
but, you will not be able to access myAccount.[orderIndex].notPartOfTransitiveClosure.
So, the object graph for Account object would be all the instance variables in myAccount plus recursively going through each reference (in this case, Account and Profile) to get to the lowest attribute reachable with the object reference.