SET GLOBAL OPTION DBPATH

Tuesday, 10 December 2013 · 2 messages
R
Ramesh10 Dec 2013 09:18 #
Dear Christian, Basex Previous versions like 6.7 supported to set GLOBAL OPTION "DBPATH" by user choice, So when we are creating collections we are setting one DBPATH for one collection as per our functionality by using below sample code.. for collection1: -------------- Context context = new Context(); new Set("dbpath","dbpath1).execute(context);// Here we are setting DBPATH new CreateDB("collection1").execute(context); for collection2: -------------- Context context = new Context(); new Set("dbpath","dbpath2).execute(context);// Here we are setting another DBPATH new CreateDB("collection2").execute(context); But when changing Basex6.7 to Basex7.2 version, we are unable to set GLOBAL OPTION "DBPATH" . As per our R&D the DBPATH getting form one of the system property "org.basex.path", once we are set system property unable to change it as for our functionality we have to set different DBPATHS like above code.... when we are trying to set DBPATH like above code we are getting below Exception org.basex.core.BaseXException: Global option 'DBPATH' cannot be set. Please provide any suggestions for us.. Thanks& Regards Ramesh
-- This message is for the intended recipient only. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of the information is strictly prohibited. __ If you'd like to unsubscribe and stop receiving these emails click here: http://u906954.sendgrid.org/wf/unsubscribe?upn=KlScTfMovg4Cf4q4bJul2rkHjPdZA-2BOGhC6IxrJoEUEHIFBnCZO6Q3W-2B33-2B3jhB8NLBFxFVzE35Yi-2F7Uz5voQjjvGZsLQ4iJDOr4Gri-2F7C4XaDmf3a3FPqqSlPX-2B0QQVLRnOl2PsGaxVRZ9EVUIRXC9PERnhPqCmV-2FNktbnCNQD0hkZfs0DoG48BOlOS7R9-2B1huE7OZRViyizTS0s10r7bRq8iIblDDXMd3uddVfYN8-3D.
CG
Christian Grün10 Dec 2013 16:23 #
H Ramesh, since a while, global options like DBPATH cannot be dynamically changed anymore, because such updates led to various undesirable side-effects. If you want to enforce the change of the option in Java, you can directly modify the variable via: context.globalopts.set(GlobalOptions.DBPATH, "your/path"); The implementation of the SET command should give you all required hints [1]. Hope this helps, Christian [1] https://github.com/BaseXdb/basex/blob/next/basex-core/src/main/java/org/basex/core/cmd/Set.java
Quoted text · Ramesh · 44 lines
On Tue, Dec 10, 2013 at 9:18 AM, Ramesh <ramesh.p at intense.in> wrote: > > Dear Christian, > > Basex Previous versions like 6.7 supported to set GLOBAL OPTION "DBPATH" by user choice, So when we are creating collections we are setting one DBPATH for one collection as per our functionality by using below sample code.. > > for collection1: > -------------- > Context context = new Context(); > new Set("dbpath","dbpath1).execute(context);// Here we are setting DBPATH > new CreateDB("collection1").execute(context); > > for collection2: > -------------- > Context context = new Context(); > new Set("dbpath","dbpath2).execute(context);// Here we are setting another DBPATH > new CreateDB("collection2").execute(context); > > > But when changing Basex6.7 to Basex7.2 version, we are unable to set GLOBAL OPTION "DBPATH" . As per our R&D the DBPATH getting form one of the system property "org.basex.path", once we are set system property unable to change it as for our functionality we have to set different DBPATHS like above code.... > > when we are trying to set DBPATH like above code we are getting below Exception > > org.basex.core.BaseXException: Global option 'DBPATH' cannot be set. > > Please provide any suggestions for us.. > > Thanks& Regards > Ramesh > > > > -- > This message is for the intended recipient only. If you are not the > intended recipient you are notified that disclosing, copying, > distributing or taking any action in reliance on the contents of the > information is strictly prohibited. > __ If you'd like to unsubscribe and stop receiving these emails click here. > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery