dev@glassfish.java.net

Re: Submitting admin commands from inside the DAS

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Mon, 1 Nov 2010 19:03:04 -0500

Hi, Marina.

On Nov 1, 2010, at 6:12 PM, Marina Vatkina wrote:

> RecoverTransactions calls CommandRunner.getCommandInvocation. Is it
> ok or needs to be changed?

I think this is OK. CommandRunner and the CommandInvocation both deal
with running a command in the current environment - inside the DAS or
the instance. As long as your code does not instantiate and use
RemoteAdminCommand you should be fine.

- Tim

>
> thanks,
> -marina
>
> Tim Quinn wrote:
>>
>> On Oct 30, 2010, at 7:40 PM, Byron Nevins wrote:
>>
>>> Why not make RemoteAdminCommand abstract and do a full clean &
>>> build? You'll find out right away if it is used anywhere...
>> I grepped the entire codebase for new.*RemoteAdminCommand which is
>> close but not quite as good.
>>
>> My note was just as much for people's future work as for current
>> uses.
>>
>> - Tim
>>>
>>>
>>>
>>> On 10/30/2010 9:02 AM, Tim Quinn wrote:
>>>> This will probably not affect most people on the list but I want
>>>> you to be aware of the following.
>>>>
>>>> Old news: Code which runs in the DAS and submits admin commands
>>>> to an instance should use ClusterOperationUtil.replicateCommand
>>>> (generally preferred in most cases).
>>>>
>>>> New news: If such code must instead instantiate
>>>> RemoteAdminCommand itself it should now instantiate
>>>> ServerRemoteAdminCommand rather than RemoteAdminCommand.
>>>> ServerRemoteAdminCommand extends RemoteAdminCommand and knows how
>>>> to provide the DAS SSL authentication which the instance will
>>>> insist upon if secure admin is enabled.
>>>>
>>>> I have already changed the places I know about
>>>> (StopInstanceCommand, RestartInstanceCommand, and
>>>> ChangeAdminPasswordCommand) that used to instantiate
>>>> RemoteAdminCommand. If you know of other places please change
>>>> them. If you write new code that needs to submit commands to an
>>>> instance and for some reason it cannot use
>>>> ClusterOperationUtil.replicateCommand please instantiate
>>>> ServerRemoteAdminCommand.
>>>>
>>>> - Tim
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>> --
>>> Byron Nevins - Oracle Corporation
>>> Home: 650-359-1290
>>> Cell: 650-784-4123
>>> Sierra: 209-295-2188
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>