dev@glassfish.java.net

Re: Example of support for --target option?

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Tue, 15 Jun 2010 18:03:12 -0700

Hong Zhang wrote:
> Hi, Marina
> I noticed this also when I was doing the deployment related
> commands. Also the STANDALONE_SERVER should be STANDALONE_INSTANCE.
>
> So in your case the correct syntax should be:
> @TargetType(value={CommandTarget.DAS,
> CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER_INSTANCE})

Can you point me to a class that uses it?
>
> (Did you really mean CLUSTER_INSTANCE or CLUSTER?)

All the names are still not very clear to me... but rollback-transaction
is allowed only on an instance (not on the DAS in a cluster). How would
you call it?

thanks,
-marina
>
>
> - Hong
>
> On 6/15/2010 7:52 PM, Marina Vatkina wrote:
>> Vijay,
>>
>> I'm trying to follow the wiki, but the result doesn't compile:
>>
>> [INFO] Compiling 15 source files to
>> /Users/mvatkina/v3/v3/transaction/jta/target/classes
>> /Users/mvatkina/v3/v3/transaction/jta/src/main/java/org/glassfish/jta/admin/cli/RollbackTransaction.java:58:
>> annotation values must be of the form 'name=value'
>> @TargetType(CommandTarget.DAS,CommandTarget.STANDALONE_SERVER,
>> CommandTarget.CLUSTERED_INSTANCE)
>>
>> thanks,
>> -marina
>>
>>
>> Vijay Ramachandran wrote:
>>>
>>>> 1. Does command replication mean that a) it can be executed against
>>>> any type of target,
>>>
>>> Yes.
>>>
>>>> or b) that if it is executed, it is repeated automatically on all
>>>> instances in a cluster?
>>>
>>> The replication framework will look at the target type, ensure that
>>> the target type is supported by the command being executed, executes
>>> the command on DAS. If execution on DAS succeeds AND the command's
>>> @Cluster has RuntimeType.INSTANCE AND the target type indicates to
>>> the framework that the command should replicated on instances
>>> (typically target types which are config type, stand alone server
>>> type, cluster type), then the command is replicated. If the target
>>> type is stand alone server, the replication happens only on that
>>> instance. If it is cluster it happens on all instances that are part
>>> of that cluster.
>>>
>>>> 2. You point to 'create-custom-resource' CLI that can be executed
>>>> not only on an instance or a cluster, but also on a server or a
>>>> domain. What do the last 2 choices mean?
>>>
>>> server = the string 'server' without the quotes = DAS
>>> domain = the string 'domain' without the quotes = target is only the
>>> domain
>>>
>>> To my knowledge, not many commands support domain target type. A
>>> vast majority of the commands support config, 'server', cluster and
>>> stand alone server as target types. More info on this will be added
>>> to the target type section
>>> <http://wiki.glassfish.java.net/Wiki.jsp?page=CLIDeveloperGuide#section-CLIDeveloperGuide-EnforcingTargetTypesAllowedForCommands>
>>> in the wiki.
>>>
>>> Vijay
>>>
>>>>
>>>> 3. Please add a link to an example of correct implementation of a
>>>> CLI that does correct processing for the --target value.
>>>>
>>>> thanks,
>>>> -marina
>>>>
>>>>
>>>> Vijay Ramachandran wrote:
>>>>> I have updated the wiki
>>>>> <http://wiki.glassfish.java.net/Wiki.jsp?page=CLIDeveloperGuide>
>>>>> with more info, pointers to code samples, added section with
>>>>> answers to FAQ etc
>>>>>
>>>>> Let me know if you would like to see more info
>>>>>
>>>>> Vijay
>>>
>>
>> ---------------------------------------------------------------------
>> 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
>