users@glassfish.java.net

[gf-users] Re: Phantom JMS resource? (3.1.2.2)

From: Pawel Veselov <pawel.veselov_at_gmail.com>
Date: Mon, 19 May 2014 10:22:33 -0700

Jagadish,

the literal 'domain' did the job!

David,

I was both starting the domain with specific domain directory, and
executing a "remote" command, meaning that I was connecting asadmin to a
running domain server.

Thank you guys!

On Sun, May 18, 2014 at 7:27 PM, David Zhao <liang.x.zhao_at_oracle.com> wrote:

> Hi Pawel,
>
> Plus, list-jms-resources is a remote subcommand so that its logic is run
> at GF server side. You may need set --domaindir when you start miSpot
> domain before you run any remote subcommands like list-jms-resource against
> the domains under domaindir.
>
> For asadmin start-domain,
>
> --domaindir
>
> The domains directory that contains the directory of the domain that
> is to be restarted. If specified, the path must be accessible in the file
> system. The default domains directory is as-install/glassfish/domains.
>
> Thanks,
> David Zhao
>
> > -----Original Message-----
> > From: Jagadish Prasath Ramu
> > Sent: Saturday, May 17, 2014 11:15 PM
> > To: users_at_glassfish.java.net; Pawel Veselov
> > Cc: David Zhao
> > Subject: [gf-users] Re: Phantom JMS resource? (3.1.2.2)
> >
> > I guess, the command should be :
> > "asadmin list-jms-resources domain"
> >
> > No need to specify the domain name, specify the string "domain".
> >
> > Thanks,
> > -Jagadish
> >
> > On Fri, 2014-05-16 at 20:19 -0700, Pawel Veselov wrote:
> > >
> > >
> > > Hi.
> > >
> > > I'm having troubles doing that as well, since my domain is not in a
> > > default directory.
> > > It looks like to specify a domain, I need to specify the domain
> > > directory, but I can't do it for commands like list-jms-resources...
> > > Any possible workarounds, short of writing a script to cut the JMS
> > > resource out of the domain.xml?
> > >
> > >
> > > Thank you,
> > > Pawel.
> > >
> > >
> > > /opt/glassfish/bin/asadmin
> > > -W /home/mispot/4.2.1.p3/deployment/miSpot-p -H localhost -p 7001 -u
> > > glassfish Use "exit" to exit and "help" for online help.
> > > asadmin> list-domains
> > > CLI141 No Domains to list.
> > > Command list-domains executed successfully.
> > > asadmin>
> > > asadmin> list-jms-resources miSpot
> > > remote failure: Unable to find a valid target with name miSpot
> > Command
> > > list-jms-resources failed.
> > > asadmin>
> > > asadmin> list-domains --domaindir /home/mispot/4.2.1.p3/deployment
> > >
> > > miSpot running, restart required to apply configuration changes
> > > Command list-domains executed successfully.
> > > asadmin>
> > >
> > >
> > >
> > > On Tue, May 6, 2014 at 10:04 PM, Jagadish Prasath Ramu
> > > <jagadish.ramu_at_oracle.com> wrote:
> > > A JMS Resource is backed by "connector connection pool" and
> > > "connector
> > > resource".
> > >
> > > When you create a jms-resource, changes will happen in two
> > > areas.
> > > 1) there is a <resources> list in the configuration that will
> > > have
> > > <connector-connection-pool> and <connector-resource> created.
> > > These
> > > "resource" configuration are homogeneous across all instances
> > > of the
> > > domain and hence it is in domain wide configuration.
> > > 2) a <resource-ref> will be created in the server (instance)
> > > being
> > > targeted to. (default being "server" when --target is not
> > > specified).
> > >
> > > So, <resources> is common for all instances of the domain. To
> > > enable
> > > them in a specific instance one needs to specify --target as
> > > part of
> > > create-jms-resource (default of --target being "server").
> > > Other option
> > > to enable the resource in an instance/cluster is to use
> > > "create-resource-ref" command.
> > >
> > > Since the instance was deleted, only the <resource-ref> in
> > the
> > > instance
> > > is deleted. The common configuration would remain. If you do
> > > "list-jms-resources domain", it would list the resources in
> > > the domain.
> > >
> > > Hence, when the same command is executed again, it fails. You
> > > can use
> > > "create-resource-ref" to enable them in the newly created
> > > instance.
> > >
> > > Thanks,
> > > -Jagadish
> > >
> > > On Tue, 2014-05-06 at 21:33 -0700, Pawel Veselov wrote:
> > > >
> > > >
> > > > Hi David,
> > > >
> > > >
> > > > I think to reproduce this the instance needs to be deleted
> > > after the
> > > > resource is added.
> > > > Even if the instance is then re-created, the jms resource
> > > becomes
> > > > ghosty.
> > > >
> > > >
> > > > Thank you,
> > > > Pawel.
> > > >
> > > > On Mon, Mar 3, 2014 at 5:40 PM, David Zhao
> > > <liang.x.zhao_at_oracle.com>
> > > > wrote:
> > > > Hi Pawel,
> > > >
> > > >
> > > >
> > > > It works for me.
> > > >
> > > >
> > > >
> > > > D:\glassfish-3.1.2.2\glassfish\bin>asadmin
> > > create-jms-resource
> > > > --target miServer --restype
> > > javax.jms.QueueConnectionFactory
> > > > jms/QueueConnectionFactory
> > > >
> > > > Connector resource jms/QueueConnectionFactory
> > > created.
> > > >
> > > > Command create-jms-resource executed successfully.
> > > >
> > > >
> > > >
> > > > D:\glassfish-3.1.2.2\glassfish\bin>asadmin
> > > list-jms-resources
> > > > miServer
> > > >
> > > > jms/QueueConnectionFactory
> > > >
> > > > Command list-jms-resources executed successfully.
> > > >
> > > >
> > > >
> > > > D:\glassfish-3.1.2.2\glassfish\bin>asadmin
> > > delete-jms-resource
> > > > --target miServer jms/QueueConnectionFactory
> > > >
> > > > Command delete-jms-resource executed successfully.
> > > >
> > > >
> > > >
> > > > D:\glassfish-3.1.2.2\glassfish\bin>asadmin
> > > list-jms-resources
> > > > miServer
> > > >
> > > > Nothing to list
> > > >
> > > > Command list-jms-resources executed successfully.
> > > >
> > > >
> > > >
> > > > D:\glassfish-3.1.2.2\glassfish\bin>asadmin
> > > create-jms-resource
> > > > --target miServer --restype
> > > javax.jms.QueueConnectionFactory
> > > > jms/QueueConnectionFactory
> > > >
> > > > Connector resource jms/QueueConnectionFactory
> > > created.
> > > >
> > > > Command create-jms-resource executed successfully.
> > > >
> > > >
> > > >
> > > > D:\glassfish-3.1.2.2\glassfish\bin>asadmin
> > > list-jms-resources
> > > > miServer
> > > >
> > > > jms/QueueConnectionFactory
> > > >
> > > > Command list-jms-resources executed successfully.
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > David Zhao
> > > >
> > > >
> > > >
> > > > From: Pawel Veselov [mailto:pawel.veselov_at_gmail.com]
> > > > Sent: Saturday, March 01, 2014 4:17 PM
> > > > To: users_at_glassfish.java.net
> > > > Subject: Re: Phantom JMS resource? (3.1.2.2)
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hi Liang,
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Feb 28, 2014 at 3:43 PM, Liang Zhao
> > > > <liang.x.zhao_at_oracle.com> wrote:
> > > >
> > > > Hi Pawel,
> > > >
> > > > Could you please share your domain.xml so that we
> > > can check
> > > > what existing resource caused that?
> > > >
> > > >
> > > >
> > > >
> > > > Is this sufficient?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > <domain>
> > > >
> > > >
> > > > ...
> > > >
> > > >
> > > > <resources>
> > > >
> > > >
> > > > <connector-connection-pool max-pool-size="250"
> > > > steady-pool-size="1"
> > > name="jms/QueueConnectionFactory"
> > > > resource-adapter-name="jmsra"
> > > >
> > > connection-definition-
> > name="javax.jms.QueueConnectionFactory"></connector-connection-pool>
> > > >
> > > >
> > > > <connector-resource
> > > pool-name="jms/QueueConnectionFactory"
> > > >
> > > jndi-name="jms/QueueConnectionFactory"></connector-resource>
> > > >
> > > >
> > > > ....
> > > >
> > > >
> > > > </resources>
> > > >
> > > >
> > > > ...
> > > >
> > > >
> > > > </domain>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > This does only happen after resources are created,
> > > then
> > > > deleted, then created again. But I expect them to
> > > show up in
> > > > the output of the list-* commands, and this one
> > > doesn't
> > > > anymore.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > David Zhao
> > > >
> > > >
> > > > > On Mar 1, 2014, at 6:52 AM, Pawel Veselov
> > > > <pawel.veselov_at_gmail.com> wrote:
> > > > >
> > > > > Hi.
> > > > >
> > > > > That's weird, any idea why this may be
> > > happening,
> > > > and how to fix this?
> > > > > I assume it's not really failing because
> > > the
> > > > resource already exists, but rather because
> > > some
> > > > connection pool(?) fails to create...
> > > > >
> > > > > asadmin> list-jms-resources
> > > > > Command list-jms-resources executed
> > > successfully.
> > > > > asadmin> list-jms-resources miServer
> > > > > Command list-jms-resources executed
> > > successfully.
> > > > > asadmin> create-jms-resource --target
> > > miServer
> > > > --restype javax.jms.QueueConnectionFactory
> > > > jms/QueueConnectionFactory
> > > > > remote failure: Unable to create
> > > connection pool.
> > > > > A resource named
> > > jms/QueueConnectionFactory already
> > > > exists.
> > > > > Command create-jms-resource failed.
> > > > > asadmin>
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > With best of best regards
> > > Pawel S. Veselov
> >
> >
>



-- 
With best of best regards
Pawel S. Veselov