users@glassfish.java.net

Re: Bug with jdbc resources in the Admin Console?

From: <glassfish_at_javadesktop.org>
Date: Tue, 15 Jan 2008 21:01:27 PST

This may be related to issue# 4002.
https://glassfish.dev.java.net/issues/show_bug.cgi?id=4002

Basically there is a 'switch' <resource-ref> that controls the status of this JDBC resource. Theoretically the resource is either enabled or disabled for the target which is the cluster and thats what Console changed.
Turns out there is yet another <resource-ref> for the cluster's instance which wasn't changed.
So, if the jdbc resource was disabled during creation, then even enabling it later still won't make it available or show up in the Jndi browser for that instance.

When i look at the JNDI browser, i can see the jdbc resource only IF it was enabled during creation.

One work around to ensure that the jdbc resource will show up in the jndi browser is to use CLI.
If the cluster has 2 instances, eg ABC and DEF, and the JDBC resource name is 'MyTest', do the following:

asadmin set ABC.resource-ref.MyTest.enabled=true
asadmin set DEF.resource-ref.MyTest.enabled=true

You should see this resource in the Jndi browser.
[Message sent by forum member 'anilam' (anilam)]

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