[ http://issues.apache.org/jira/browse/JCR-348?page=all ] Jukka Zitting resolved JCR-348: -------------------------------
Resolution: Fixed Fixed in revision 385270, merged into 1.0 in revision 385271. > Add automatic default configuration > ----------------------------------- > > Key: JCR-348 > URL: http://issues.apache.org/jira/browse/JCR-348 > Project: Jackrabbit > Type: Improvement > Components: config > Versions: 0.9 > Reporter: Jukka Zitting > Assignee: Jukka Zitting > Priority: Minor > Fix For: 1.0 > > We should provide a simple way to start a Jackrabbit repository with default > configuration. The current First Hops document exposes too much configuration > details to be really friendly to first-time users. > I'd like to provide a default TransientRepository constructor that looks for > "repository.xml" as the configuration file and "repository" as the repository > home directory. If either of these does not exist, it is automatically > created using default settings. This way the repository setup would boil down > to: > Repository repository = new TransientRepository(); > As an added feature I'm planning to support system properties > "org.apache.jackrabbit.repository.conf" and > "org.apache.jackrabbit.repository.home" for overriding the defaults. > This improvement would make it easier to write and set up "Hello, World!" > -type applications, thus helping interested people to try out Jackrabbit. > This feature will also make it easier to provide a standard template for test > classes that exhibit some error condition. Like this: > import javax.jcr.*; > import org.apache.jackrabbit.core.TransientRepository; > public Example { > public static void main(String[] args) { > try { > Repository repository = new TransientRepository(); > Session session = repository.login(); > try { > // YOUR CODE HERE > } finally { > session.close(); > } > } catch (Exception e) { > e.printStackTRace(); > } > } > } > I'm targetting this for inclusion in 1.0 as it affects none of the existing > code and it will probably be very helpful for the expected number of new > users we are going to see after 1.0 is out. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira