D'Oh again you are completely correct, apologies...this is at the system
config level not broker...

So the only way to pass it in is as a command line parameter -prop
'preferenceStoreAttributes=...'

-- Rob



On Mon, 26 Nov 2018 at 17:55, VERMEULEN Olivier <olivier.vermeu...@murex.com>
wrote:

> Actually, looking at the code, there is no 'preferenceStoreAttributes'
> field in the Broker class
>
> https://github.com/apache/qpid-broker-j/blob/c018e1ac9d21e9f5eb38d2ae7a26a31e63c07fdf/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
> So it's expected that it would be ignored in the below config file no?
>
> Olivier
>
> {
>   "name": "${broker.name}",
>   "modelVersion": "7.0",
>
>   "preferenceStoreAttributes": {
>     "type" : "Noop"
>   },
>
>   "authenticationproviders" : [ {
>     "name" : "anonymous",
>     "type" : "Anonymous"
>   } ],
>
> ...
>
>   "virtualhostnodes" : [ {
>     "name" : "default",
>     "type" : "JSON",
>     "defaultVirtualHostNode" : "true",
>     "virtualHostInitialConfiguration" : "{ \"type\" : \"DERBY\" }"
>   } ]
> }
>
> -----Original Message-----
> From: VERMEULEN Olivier
> Sent: lundi 26 novembre 2018 13:32
> To: users@qpid.apache.org
> Subject: RE: [Broker-J] JDBC config store
>
> Thanks Alex for the fix.
> I tried setting the 'preferenceStoreAttributes' in the initial
> configuration but it's not taken into account...
>
> Olivier
>
> -----Original Message-----
> From: Oleksandr Rudyy <oru...@gmail.com>
> Sent: vendredi 23 novembre 2018 12:44
> To: users@qpid.apache.org
> Subject: Re: [Broker-J] JDBC config store
>
> Hi Olivier,
>
> I am sorry for the inconveniences caused  by provided preferences stores
> configured by default in JDBC system config.
> I committed  changes against QPID-8260  fixing  the issue with provided
> preferences stores in DERBY and JDBC system configs.
>
> As Rob has suggested already, you can work around the issue by creating
> your own initial configuration and overriding type of preferences store in
> attribute 'preferenceStoreAttributes' to  'Noop'
> or 'JSON'.
>
> Kind Regards,
> Alex
> On Thu, 22 Nov 2018 at 16:53, Rob Godfrey <rob.j.godf...@gmail.com> wrote:
> >
> > On Thu, 22 Nov 2018 at 17:31, VERMEULEN Olivier
> > <olivier.vermeu...@murex.com>
> > wrote:
> >
> > > Thanks Rob for the answer.
> > >
> > > I don't know if I'm looking in the right place but here:
> > >
> > > https://github.com/apache/qpid-broker-j/blob/c018e1ac9d21e9f5eb38d2a
> > > e7a26a31e63c07fdf/broker-plugins/jdbc-store/src/main/java/org/apache
> > > /qpid/server/store/jdbc/JDBCSystemConfig.java
> > > the default preference store is "Provided"...
> > >
> >
> > D'oh - I didn't spot that.  That's just a bug, it shouldn't have been
> > overridden.
> >
> >
> > >
> > > Do you have a sample where the preferenceStoreAttributes is set?
> > > I tried in the command line with -prop
> > > "systemConfig.preferenceStoreAttributes={\"type\":\"Noop\"}
> > > and in the initial config.json of the broker without any success...
> > >
> >
> > For the initial config.json I would have hoped a top level attribute
> > preferenceStoreAttributes="{\"type\":\"Noop\", \"attributes\":{}}"
> > would work... Obviously the initial config will only be picked up if
> > you are running the broker for the first time pointing at that database
> instance.
> >
> > -- Rob
> >
> >
> > >
> > > Olivier
> > >
> > > -----Original Message-----
> > > From: Rob Godfrey <rob.j.godf...@gmail.com>
> > > Sent: jeudi 22 novembre 2018 16:41
> > > To: users@qpid.apache.org
> > > Subject: Re: [Broker-J] JDBC config store
> > >
> > > On Thu, 22 Nov 2018 at 15:11, VERMEULEN Olivier <
> > > olivier.vermeu...@murex.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I'm using version 7.0.3 of the Broker-J.
> > > > I tried to configure it to use a JDBC (here Sybase) config store.
> > > >
> > > > qpid-server.bat -st JDBC -prop
> > > > "systemConfig.connectionUrl=jdbc:sybase:Tds:dell719srv:4100/DB"
> > > > -prop "systemConfig.username=USER" -prop "systemConfig.password=PWD"
> > > >
> > > > But I got the following exception:
> > > >
> > > > [Broker] BRK-1016 : Fatal error : Cannot create provided
> > > > preference store on non PreferenceStoreProvider : See log file for
> > > > more information [Broker] Exception during startup:
> > > > org.apache.qpid.server.util.ServerScopedRuntimeException: Broker
> > > > failed reach ACTIVE state (state is ERRORED)
> > > >         at
> > > > org.apache.qpid.server.model.AbstractSystemConfig$3.onSuccess(Abst
> > > > ract
> > > > SystemConfig.java:318)
> > > >
> > > > I debugged a bit and it uses the
> ProvidedPreferenceStoreFactoryService.
> > > > But it is called with JDBCSystemConfigImpl as parent which does
> > > > not implement PreferenceStoreProvider, thus the crash.
> > > >
> > > > First, what is exactly the preference store and do I really need it?
> > >
> > >
> > > It is where per-user preferences for the web console are stored.
> > > The default is to use JSON - so at some point the configuration must
> > > have been edited to use "provided" instead.
> > >
> > > If not how can I configure my broker to use the NOOP one?
> > > >
> > >
> > > The type of preference store to use is defined in the attribute
> > > "preferenceStoreAttributes" in the system config.  The default value
> > > is the JSON object "{\"type\": \"JSON\", \"attributes\":{\"path\":
> > > \"${json:qpid.work_dir}${json:file.separator}preferences.json\"}}".
> > > If you wanted to change that to the NoOp provider you could use
> "{\"type\":
> > > \"Noop\", \"attributes\":{}}" I would think.
> > >
> > >
> > >
> > > > Second, why isn't it working with a JDBC config store, did I miss
> > > > something in the configuration?
> > > >
> > >
> > > It's just never been implemented - I'm not sure why, I guess because
> > > there wasn't really seen to be a demand.
> > >
> > >
> > > >
> > > > Thanks,
> > > > Olivier
> > > >
> > > >
> > > -- Rob
> > >
> > >
> > > > ******************************* This e-mail contains information
> > > > for the intended recipient only. It may contain proprietary
> > > > material or confidential information. If you are not the intended
> > > > recipient you are not authorized to distribute, copy or use this
> > > > e-mail or any
> > > attachment to it.
> > > > Murex cannot guarantee that it is virus free and accepts no
> > > > responsibility for any loss or damage arising from its use. If you
> > > > have received this e-mail in error please notify immediately the
> > > > sender and delete the original email received, any attachments and
> > > > all
> > > copies from your system.
> > > >
> > > ******************************* This e-mail contains information for
> > > the intended recipient only. It may contain proprietary material or
> > > confidential information. If you are not the intended recipient you
> > > are not authorized to distribute, copy or use this e-mail or any
> attachment to it.
> > > Murex cannot guarantee that it is virus free and accepts no
> > > responsibility for any loss or damage arising from its use. If you
> > > have received this e-mail in error please notify immediately the
> > > sender and delete the original email received, any attachments and all
> copies from your system.
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional
> commands, e-mail: users-h...@qpid.apache.org
>
> ******************************* This e-mail contains information for the
> intended recipient only. It may contain proprietary material or
> confidential information. If you are not the intended recipient you are not
> authorized to distribute, copy or use this e-mail or any attachment to it.
> Murex cannot guarantee that it is virus free and accepts no responsibility
> for any loss or damage arising from its use. If you have received this
> e-mail in error please notify immediately the sender and delete the
> original email received, any attachments and all copies from your system.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>

Reply via email to