Bug 886119 JON is using JNDI when referring to child Datasource resource instead of specified Resource name"
Larry O'Leary
loleary at redhat.com
Tue Jul 23 18:05:39 UTC 2013
On Tue, 2013-07-23 at 16:53 +0200, Thomas Segismont wrote:
> Hi everyone,
>
> I'm working on Bug 886119 [1] "JON is using JNDI when referring to child
> Datasource resource instead of specified Resource name".
>
> When a user wants to create a child resource, we ask him to supply a
> resource name in the first step of the wizard. Plugin developers are
> encouraged to use this name in their
> CreateChildResourceFacet#createResource implementation.
>
> But there is no guarantee that the resource inventoried will have this
> name, because there is no connection between the resource creation
> request and the later discovery of this resource by the plugin container.
>
> In AS7 plugin, the supplied name is not ignored because as7 management
> nodes have this "name concept". So in
> CreateChildResourceFacet#createResource we give the new node the
> supplied resource name and in
> ResourceDiscoveryComponent#discoverResources it is discovered.
>
> In EAP5 plugin, at least with Datasources and Connection Factories, this
> is not possible.
>
> I think we should update the wizard to tell the user the name he
> supplies will be taken into account if the agent plugin allows it.
I would prefer that the wizard actually be driven based on the plug-ins
capabilities. If the plug-in can/does use the resource name, then the
wizard should ask for it as optional or required. If the plug-in can not
use the name, the wizard shouldn't ask for it.
I understand that we do not have this capability at this time (without
putting this directly in plug-in configuration) but this would be the
most appropriate fix. The UI shouldn't ask the user for things that
don't matter or lead one to believe a capability exists that isn't
there.
As a temporary measure, updating the fields description as you suggest
may be sufficient assuming the actual fix happens down the road.
> Another option would be to look for a CreateResourceHistory entry in
> DiscoveryBossBean#persistResource. But how can we reliably connect a
> CreateResourceHistory entry with a new resource in an inventory report?
Although this is an interesting idea, it may actually introduce
confusion. If I were to create a resource and name it *My Fun and
Interesting Resource* that is what I would expect to see in the
inventory. However, if the actual resource that was deployed ended up
getting named *jboss-as-helloworld* I now have to understand that the
name I know it by is an RHQ only name and the real name is something
else.
Perhaps this would be better as a completely new feature? Not only would
the wizard ask for resource name but also provide an optional resource
alias.
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=886119
--
Larry O'Leary
https://plus.google.com/u/0/112645929986009801513
More information about the rhq-devel
mailing list