users@glassfish.java.net

RE: create-jms-resource with --target domain

From: David Zhao <liang.x.zhao_at_oracle.com>
Date: Fri, 21 Jun 2013 05:52:13 -0700 (PDT)

Hi Mike,

 

Thanks,

David Zhao

 

From: Mykhailo Kotsur [mailto:miccots_at_gmail.com]
Sent: Friday, June 21, 2013 4:33 PM
To: David Zhao
Cc: users_at_glassfish.java.net
Subject: Re: create-jms-resource with --target domain

 

Hi David,

 

Thanks for the reply!

 

What would be really interesting to know is why does this limitation exist? Any particular reason?

[David Zhao] That is a question about create-admin-object command of glassfish connector module. :-)

 

It's possible to create a destination in domain via web console (when choosing no targets) and with command line using the trick I've described before. May be there is more straightforward way to do it in command line (although create-jms-resource forbids this).

[David Zhao] This can be achieved through 2 asadmin command, 1) create-jms-resource on default server target and then 2) delete-resource-ref from the target.

 

Mike

 

 

On Jun 21, 2013, at 6:13 AM, David Zhao <HYPERLINK "mailto:liang.x.zhao_at_oracle.com"liang.x.zhao_at_oracle.com> wrote:





Hi Mike,

 

The command create-jms-resource can create two type resources: connection factory and destinations including topic and queue. Internally the command calls create-connector-resource and create-admin-object respectively. Create-connector-resource can accept domain as target, but create-admin-resource doesn't. So target:domain can be used for creating jms connection factory by create-jms-resource, and it should be used for creating jms destinations (topic/queue).

 

The description about -target parameter of create-jms-resource docs can be updated to make it clearer.

 

Thanks,

David Zhao

 

From: Mykhailo Kotsur [mailto:miccots@HYPERLINK "http://gmail.com"gmail.com]
Sent: Thursday, June 20, 2013 10:07 PM
To: HYPERLINK "mailto:users_at_glassfish.java.net"users_at_glassfish.java.net
Subject: create-jms-resource with --target domain

 

Hello glassfish community,

 

Does anybody has any idea why the command:

 

asadmin> create-jms-resource --restype 'javax.jms.Queue' --target domain --property ClientId=None:AddressList=None:UserName=guest:Password=guest:Name=name jndi/queue remote failure: Unable to create admin object. Target domain is not a supported type. Command create-admin-object supports these types of targets only : Cluster, Stand alone instance, Config, Default server,

 

fails? Should not be a problem according to the HYPERLINK "http://docs.oracle.com/cd/E18930_01/html/821-2433/create-jms-resource-1.html#scrolltoc"docs. And also it's possible to create the same resource without targets (which is my goal) via web console.

 

Currently I've found a hacky solution: create it with --target server and then delete resource reference from the server, which doesn't look really nice.

 

Thanks in advance,

Mike