Hi folks!
 
While switching from JBoss 3.0.0 to JBoss 3.0.1 I experienced some strange behaviour from the container concerning Container Managed Relations.
After some analysis the problem can be drilled down as follows:
Whenever one Bean Type has two relationships with a different bean type which point to different bean instances from the same type then the container manages these two relations as pointing to the same bean instance.
 
To clarify this statement, I'll give you an example drawn from the domain of cost accounting. This can be generalized to linear input-/output systems present in production planning environments.
 
A cost center is a place where the firm's production takes place. Such cost centers provide services to other cost centers or finally produce products. On the other hand cost centers receive services from other cost centers (such as energy, cleaning or repair, water).
 
This results in an Input-/Output structure which can be depicted as a graph and evaluated using a matrix and subsequently solving a system of linear equations.
 
There are two bean types: CostCenter and CostCenterInterlinking
The CostCenterInterlinking Bean manages the n:m relation between cost centers. So it has two relations with two different CostCenter bean instances. One Input and one Output.
 
Since JBoss 3.0.1 - when queried - these two relations point to the exact same bean instance whereas the application worked fine with version 3.0.0. This behaviour is still present in 3.0.2.
 
There might not be so many applications relying on this feature but when it comes to enterprise solutions this kind of structure is quite frequent.
 
regards, Michael
 
 

Reply via email to