}
sequenceName = determineSequenceName(acmd);
if (sequenceName != null) {
// Fetch the sequence data
SequenceMetaData sequenceMetaData = mdm.getMetaDataForSequence(clr, sequenceName);
if (sequenceMetaData != null) {
// derive allocation size and sequence name from the sequence meta data
if (sequenceMetaData.hasExtension(KEY_CACHE_SIZE_PROPERTY)) {
allocationSize = Integer.parseInt(sequenceMetaData.getValueForExtension(KEY_CACHE_SIZE_PROPERTY));
} else {
allocationSize = longToInt(sequenceMetaData.getAllocationSize());
}
sequenceName = sequenceMetaData.getDatastoreSequence();
} else {
// key cache size is passed in as a prop for JDO when the sequence
// is used directly (pm.getSequence())
if (properties.getProperty(KEY_CACHE_SIZE_PROPERTY) != null) {
allocationSize = Integer.parseInt(properties.getProperty(KEY_CACHE_SIZE_PROPERTY));