This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 141064 - V3:jdbc connection pool does not appear after deployment
Summary: V3:jdbc connection pool does not appear after deployment
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 160326 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-21 20:12 UTC by davisn
Modified: 2009-09-14 05:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davisn 2008-07-21 20:12:58 UTC
A JDBC Conenction Pool does not appear at the Resources node after deploy a WebApp Project

Steps To Reproduce:
1. Install Glassfish V3 Promoted b15 build
2. Install Netbean 6.5 nightly build (07/21/2008)
3. Select to add the recently installed V3 b15 build to the Server list
4. Create a new Web project (use default value)
5. Right-click at the recently created project > select New > Other > Glassfish > JDBC Connection Pool > Next to create
a new JDBC Connection Pool (use default values)
6. Righ-click at the project and select Run menu
7. Expand > Servers > Glassfish V3 > Resources node and verify 
BUG:
    The Recently created jdbc conenction pool is not listed under the Resources node
Comment 1 _ pcw 2008-07-21 20:24:40 UTC
Did you try refreshing the node (right click, select <Refresh>)?
Comment 2 _ pcw 2008-07-21 20:24:53 UTC
Did you try refreshing the node (right click, select <Refresh>)?
Comment 3 davisn 2008-07-21 22:37:32 UTC
I tried to refresh the node several times and even go to admin gui console to look for the connection pool, but still
didn't see it
Comment 4 _ pcw 2008-07-22 19:30:22 UTC
General registration of sun-resources.xml on deploy step is missing.  Should be easy to fix.

Note that UI choices that can create resources as a side effect (entity classes from Db, etc.) follow a different code
path that does a special registration step.  This is working fine.
Comment 5 Vince Kraemer 2008-07-24 06:20:31 UTC
my plate is p2 clean... do you want me to look at this one?
Comment 6 _ pcw 2008-07-24 08:27:11 UTC
This one will be tricky due to the combining of deploy resource with the existing deploy action (which handles starting
the server if required).  You can take a crack at it if you like.  I would like to review it though as I have some ideas
on how to fix it.
Comment 7 Vince Kraemer 2008-07-29 01:36:10 UTC
tricky and kinda random... I did a little testing and was not able to reproduce the issue... then i did a bit more
testing and was able to reproduce the issue....

still looking at it though.
Comment 8 Vince Kraemer 2008-07-29 02:03:58 UTC
OK.  I can replicate this issue.

I am going to lower it to a P3 though... here is the justification.

If I create a CP in the project, the CP doesn't register... but it also isn't useful... a JDBC resource is useful.

If I create a project, a jdbc resource and a CP BOTH of the resources appear when the project is deployed.

Should this get fixed? YES. Should it block the Beta? No.

Will I get it fixed by the time for Beta? Probably... But I have to make sure that there is "room" to fix an issue that
SHOULD block the beta. Lowering the priority gives us that room...
Comment 9 Vince Kraemer 2008-07-29 07:21:28 UTC
It looks like the call to deployDatasources only fires if there is a JDBC resource in the project's sun-resources.xml
because the Hk2Datasourcemanager only says... yup, here are some data sources... when there is a JDBC resource in the
sun-resources.xml file AND there is a connection pool with the name used by the Resource IN THE SAME sun-resource.xml file.

I tried adding a bogus resource if there is a connection pool, but that bogus resource starts to show up in the UI, so
that is the wrong approach.

Still looking.
Comment 10 _ pcw 2008-07-29 07:35:05 UTC
deployDatasources is a specialized call, IIRC.  The intent is certain to ensure that if there are datasources in the
project (as defined by the DB module I believe), then they exist on the server.  Note that creating an arbitrary
resource, including a JDBC resource & CP) via the Sun resource wizards probably bypasses this.

So while there may be a bug in Hk2DatasourceMgr when dealing with the "zero-config" apis', etc, there is also the
missing pieces of "deploy resource at deploy time".  We also need to look at new deploy cycle, as impacted by
compile-on-save support.  I saw your message regarding whether or not there were notifications of changed resource files.
Comment 11 Vince Kraemer 2008-07-29 15:17:31 UTC
I was not using the zero config code paths to do any of my testing yesterday... it was all based on the use of the
resource wizards followed by Run and/or Undeploy and Deploy from the project's right click menu...
Comment 12 _ pcw 2008-07-29 15:31:38 UTC
Interesting.  Thanks for that little tidbit.
Comment 13 Vince Kraemer 2008-10-25 04:59:45 UTC
this did not make it into the 6.5 code.  it is dependent on some of the changes to simplify doing "substasks" like
restart and the like during a deploy request.
Comment 14 Vince Kraemer 2009-03-16 15:02:15 UTC
*** Issue 160326 has been marked as a duplicate of this issue. ***
Comment 15 Martin Schovanek 2009-09-09 15:45:33 UTC
If the created resource is not deployed it is simply broken feature => P2.

With GF2.1 it works fine. 
Comment 16 Quality Engineering 2009-09-13 21:05:54 UTC
Integrated into 'main-golden', will be available in build *200909131354* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/442c42bf3b87
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #141064: connection pool resources do not deploy when defined in 'isolation'
Comment 17 Vince Kraemer 2009-09-14 05:25:28 UTC
in build