| Here's what we could do for the factory construction. Please vote or discuss. 1. Remove factory-class from the metadata. It's too much work for this late in the project. All sequences would be implemented by the JDO vendor. 2. Retain the attributes name and strategy but add a nested element sequence-property. We still need to add some other interfaces or methods to allow the factory sequence to implement transactional sequences. <!ELEMENT sequence (extension*, sequence-property*, extension*)> <!ATTLIST sequence name CDATA #REQUIRED> <!ATTLIST sequence datastore-sequence CDATA #IMPLIED> <!ATTLIST sequence factory-class CDATA #IMPLIED> <!ATTLIST sequence strategy (nontransactional|contiguous|noncontiguous) #REQUIRED> <!ELEMENT sequence-property (extension*)> <!ATTLIST sequence-property key CDATA #REQUIRED> <!ATTLIST sequence-property value CDATA #IMPLIED> Example: <sequence name="MySequence" factory-class="org.apache.jdo.tck.sequence.TestSequence"> <sequence-property key="javax.jdo.sequence.Strategy" value="transactional"/> <sequence-property key="org.apache.jdo.tck.sequence.InitialValue" value="1009"/> <sequence-property key="org.apache.jdo.tck.sequence.Increment" value="10"/> </sequence> We could standardize some of the property names and leave others to the implementation, exactly as we do now for PMF properties. Then, the newInstance method would take the name and Properties as arguments: public static Sequence newInstance(String name, Properties props); We might also add the PersistenceManagerFactory to the newInstance method allowing the factory to use the same DataSource as used by the PMF. Or define the parameters as a Map and pass the PMF as the value of the key "javax.jdo.sequence.PersistenceManagerFactory". 3. Some other mechanism for passing construction values to the sequence. Craig On Sep 19, 2005, at 11:10 AM, Craig Russell wrote: Javadogs, Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp! |
smime.p7s
Description: S/MIME cryptographic signature
