[
https://issues.apache.org/jira/browse/DIRSERVER-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lecharny updated DIRSERVER-1545:
-----------------------------------------
Description:
We ship a number of deployment packages with our product, of which some are
optionally installed into the JBOSS AS container. Some of those packages that
are installed wish to plug data into the directory, so we use the LDIF file
import mechanism on directory startup to achieve that. Some of the files have
dependencies on others, so we have incorporated a numbering convention into the
LDIF file naming and up until now that has worked successfully. However, on the
Linux platform we realised it was not working. Linux is giving the LDIF files
to the directory startup neither in creation date/time order nor alphabetical
order and thus the dependencies within the files collapse.
I can quickly resolve the issue by simply sorting the files prior to their
import.
i.e. in org.apache.directory.server.configuration.ApacheDS#loadLdifs()
{code:java}
// sort the ldif files
Arrays.sort(ldifFiles, new Comparator<File>() {
@Override
public int compare(File o1, File o2) {
return o1.getName().compareTo(o2.getName());
}
});
// load all the ldif files and load each one that is loaded
. . .
{code}
There are a number of solutions to this, and clearly it is not a problem of the
directory server. However, given that the directory server supports an import
directory and thus multiple LDIF files, I think it would be a useful
enhancement to provide a mechanism to cater for dependencies within the files.
was:
We ship a number of deployment packages with our product, of which some are
optionally installed into the JBOSS AS container. Some of those packages that
are installed wish to plug data into the directory, so we use the LDIF file
import mechanism on directory startup to achieve that. Some of the files have
dependencies on others, so we have incorporated a numbering convention into the
LDIF file naming and up until now that has worked successfully. However, on the
Linux platform we realised it was not working. Linux is giving the LDIF files
to the directory startup neither in creation date/time order nor alphabetical
order and thus the dependencies within the files collapse.
I can quickly resolve the issue by simply sorting the files prior to their
import.
i.e. in org.apache.directory.server.configuration.ApacheDS#loadLdifs()
// sort the ldif files
Arrays.sort(ldifFiles, new Comparator<File>() {
@Override
public int compare(File o1, File o2) {
return o1.getName().compareTo(o2.getName());
}
});
// load all the ldif files and load each one that is loaded
. . .
There are a number of solutions to this, and clearly it is not a problem of the
directory server. However, given that the directory server supports an import
directory and thus multiple LDIF files, I think it would be a useful
enhancement to provide a mechanism to cater for dependencies within the files.
> Ability to specify an import order for the LDIF files
> -----------------------------------------------------
>
> Key: DIRSERVER-1545
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1545
> Project: Directory ApacheDS
> Issue Type: Improvement
> Components: ldap
> Affects Versions: 1.5.7
> Environment: Linux OS, JBOSS AS 5.1.0.GA, Apache DS
> Reporter: Ed Roberts
> Priority: Minor
> Fix For: 2.1.1
>
>
> We ship a number of deployment packages with our product, of which some are
> optionally installed into the JBOSS AS container. Some of those packages that
> are installed wish to plug data into the directory, so we use the LDIF file
> import mechanism on directory startup to achieve that. Some of the files have
> dependencies on others, so we have incorporated a numbering convention into
> the LDIF file naming and up until now that has worked successfully. However,
> on the Linux platform we realised it was not working. Linux is giving the
> LDIF files to the directory startup neither in creation date/time order nor
> alphabetical order and thus the dependencies within the files collapse.
> I can quickly resolve the issue by simply sorting the files prior to their
> import.
> i.e. in org.apache.directory.server.configuration.ApacheDS#loadLdifs()
> {code:java}
> // sort the ldif files
> Arrays.sort(ldifFiles, new Comparator<File>() {
> @Override
> public int compare(File o1, File o2) {
> return o1.getName().compareTo(o2.getName());
> }
> });
> // load all the ldif files and load each one that is loaded
> . . .
> {code}
> There are a number of solutions to this, and clearly it is not a problem of
> the directory server. However, given that the directory server supports an
> import directory and thus multiple LDIF files, I think it would be a useful
> enhancement to provide a mechanism to cater for dependencies within the files.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]