geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <>
Subject equals() for MCF
Date Fri, 30 Apr 2004 04:22:30 GMT
I see where the J2CA spec says that equals() and hashCode() should the 
properties that make the MCF "unique and specific", but I have a couple 
of concerns:

1) I don't know what that is. For example, with Oracle you can
    specify the instance using a URL or by setting properties (host,
    server, port, ...), so two instances could be configured in
    different ways, have different properties, but point to the same
    EIS instance.

2) All the properties are mutable, which could change the values
    used in comparison. Short of implementing a JavaBean change
    notification and have the CM subscribe I don't see how this
    can work.

Seems to me that the safest way is to define these using identity on the 
MCF, then no two MCFs will be the same and the app server will need to 
treat them differently. This does preclude a couple of optimizations 
(e.g. that the CM could map two different CF's to the same MCF) but I 
don't think it stops it working.

An alternative may be to have the MCF delegate to the EIS implementation 
e.g. by calling equals on a delegate instance e.g. the OracleDataSource 
from above. That way the driver gets to determine what is equivalent.

Any thoughts?

( For acronym decoding see the J2CA spec. )

View raw message