Shalini Muthukrishnan wrote:
> Hi Jennifer,
>
> All the tests that were failing because of this are passing with the fix.
>
> As part of CLI documentation, the new attributes "dbuser" and
> "dbpassword" would need to be documented, right?
Right, I sent an email to the admin alias so Paul is part of that alias.
dbuser and dbpassword need to be documented for asadmin stop-database.
>
> What would happen in case start-database command is issued with a
> certain user and stop-database command is executed with another
> user/password? I have not tested this though. Though the jdbc devtests
> do not cover this scenario, this is quite an important test case to
> think about.
I have not tested that yet either, it should pass on whatever derby
error message there is when this happens - like authentication failed.
I didn't add any additional logic for that - just pass dbuser and
dbpassword if specified, to NetworkServerControl as -user and -password.
I'll try it.
>
> The NetwrokServerControl is used in the jdbc devtests to start/stop
> database. I am using "-user ${user} -password ${password}" options to
> the shutdown command for the tests to pass, along with your fix.
>
> Attaching the forgotten derby.properties file.
>
> Thanks,
> Shalini.
>
> Jennifer Chou wrote:
>> Shalini Muthukrishnan wrote:
>>> Hi Jennifer,
>>>
>>> I see that you have added 2 new options : --dbuser and --dbpassword.
>>> So when i start-database using asadmin start-database command, only
>>> the user/password listed in the derby.properties file under
>>> <install>/databases directory are allowed to stop-database using
>>> command asadmin stop-database --dbuser APP --dbpassword APP.
>>>
>>> I have attached a derby.properties file with which i tested.
>> I think you missed the attachment?
>>> In this dbuser/dbpassword and APP are listed. So when i
>>> start-database, i could either stop as APP or dbuser. So should
>>> these options be added to the start-database command also?
>> I thought the requirement is only for asadmin stop-database?
>>>
>>> Also, with these new attributes, what would be the implications on
>>> other modules?
>> I'm not sure - seem whoever is using asadmin stop-database would need
>> to be updated.
>>> How can this be used with the NetworkServerControl?
>> If you are not using asadmin stop-database (which just calls
>> NetworkServerControl), should you be able to use NetworkServerControl
>> directly?
>>
>> Maybe I'm not clear on what the requirement is.
>>
>> Jennifer
>>>
>>> <target name="stop-derby">
>>> <java classname="org.apache.derby.drda.NetworkServerControl"
>>> classpath="${db.classpath}" failonerror="true"
>>> fork="true">
>>> <arg line="-h 0.0.0.0 -p 1527 -user ${derby.user}
>>> -password ${derby.password} shutdown"/>
>>> </java>
>>> </target>
>>>
>>> The above will not work.
>>>
>>> Please help,
>>> Thanks,
>>> Shalini.
>>>
>>>
>>> Jennifer Chou wrote:
>>>> Can you see if this works for you?
>>>>
>>>> jen.jar contains the changed DerbyControl.java and
>>>> StopDatabaseCommand.java in admin\cli-optional
>>>> You can copy cli-optional.jar to modules directory.
>>>>
>>>> Shalini Muthukrishnan wrote:
>>>>> Thank you.
>>>>>
>>>>> Jennifer Chou wrote:
>>>>>> Thanks for reminding me. It looks like it only need to add
>>>>>> --user and --password as required option in shutdown.
>>>>>> I will try to send you something today to test with.
>>>>>>
>>>>>> Jennifer
>>>>>>
>>>>>> Shalini Muthukrishnan wrote:
>>>>>>> Hi Jennifer,
>>>>>>>
>>>>>>> Sorry to bother you again on this one. When would this be fixed?
>>>>>>> Some important tests are failing in jdbc because of this one.
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Shalini.
>>>>>>>
>>>>>>> Jennifer Chou wrote:
>>>>>>>> Hi Shalini,
>>>>>>>>
>>>>>>>> Can it wait till after 7/13? I'm quite busy at the moment.
>>>>>>>> Or if you're pressed, you may make the change and I can
>>>>>>>> review? I can tell you where the code is.
>>>>>>>>
>>>>>>>> Jennifer
>>>>>>>>
>>>>>>>> Shalini Muthukrishnan wrote:
>>>>>>>>> Hi Jennifer,
>>>>>>>>>
>>>>>>>>> Could i assign the issue 6626 to you? The stop-database
>>>>>>>>> command needs to be fixed asap as this is affecting the
>>>>>>>>> execution of some of the critical tests in jdbc.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Shalini.
>>>>>>>>
>>>>>>
>>