users@glassfish.java.net

Re: Target deployment after domain resource provisioning with asadmin

From: <glassfish_at_javadesktop.org>
Date: Tue, 16 Oct 2007 02:48:53 PDT

Interesting question.

I don't think we have a cli command to find out the servers or clusters that reference a particular
resource or application. Let me find out.

If there is none, you should file an RFE.

There is a rather round-about way and if you dislike it, you should consider filing the RFE.
Here you go:

Basically, an application (Java EE Application, Web App, EJB module, User defined MBean etc.)
and a resource are in a "unique" name space. This name is referred to by servers and clusters
as those names. Thus, if a resource has a jndi-name "jdbc/foo" then no other resource
(jdbc-connection-pool, external-resource, connector-connection-pool etc.) can have that name.

In this case, if you want to find out if a particular resource is referenced by cluster "cluster1"
or not, you should do:

asadmin list "cluster1.*" | grep "foo"

and you'll see something like:

cluster1.resource-ref.jdbc/foo

Now, the same thing can be done to find out if this is also referenced from cluster2 etc.

But I admit, this is not the best solution. We need something like:

"asadmin list-referrers app-name/resource-name"

which outputs something like:

server [default server]
server1 [standalone server]
cluster2 [cluster]
cluster4 [cluster]
server4 [standalone server]

I am almost sure we don't have something like this. And I think we have utility for this command.
Once I confirm, please file an RFE.

Regards,
Kedar

(For dotted names, please see: http://blogs.sun.com/bloggerkedar/entry/dotted_names_of_glassfish_administration)
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=240359