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 141982 - resource changes not deployed on redeploy with DoS
Summary: resource changes not deployed on redeploy with DoS
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P2 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks: 173216
  Show dependency tree
 
Reported: 2008-07-29 05:52 UTC by Vince Kraemer
Modified: 2009-10-23 13:20 UTC (History)
2 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 Petr Hejl 2008-08-20 13:03:17 UTC
What kind of resources is not redeployed?
Comment 1 Vince Kraemer 2008-08-21 15:00:25 UTC
if the user changes the content of the setup/sun-resource.xml file, the changes are not detected and a redeploy
operation is not triggered.
Comment 2 Petr Hejl 2008-08-28 16:36:50 UTC
Hi Vince,
afaik files (resources) in setup directory are bit specific. The j2eeserver code is calling serverplugin's apis to
deploy datasources, message queues etc. So usually these resources are not part of the application but separately
delivered to server.

The bad thing is that this usually means server restart -> so the semantic would be very unfriendly (Restart on Save).
perhaps it is not usuall, I'm not sure. It would probably need some api change (j2eeserver & serverplugin) to do it right.

Maybe we can just notify user these case is not supported (for 6.5).

Can you comment this from the GF point of view? Any ideas?

Thanks.
Comment 3 Vince Kraemer 2008-08-28 17:33:57 UTC
The resources in the setup directory are registered/updated every time an app is deployed to GF.  Registering/updating
resources have not required a server restart on GF for a while (read couple years).

The plugin could listen to changes on the sun-resources.xml file and trigger a deploy....

Is there an API I could use?  What is it?

We need to create an API/SPI if we don't have one for this.
Comment 4 Petr Hejl 2008-08-28 18:00:47 UTC
Actually I was thinking about these resources in general (jboss, tomcat,..). If we are talking specifically about
sun-resources.xml it is probably doable. I'm bit afraid of things such as jdbc driver deployment (which itself can take
long time and perhaps needs restart).

I'll look into this in more depth tomorrow.

Thanks.
Comment 5 Nitya Doraisamy 2009-10-14 07:07:51 UTC
Any update/progress on this? 
The IDE should expand the list of objects it listens to for changes to include the contents of the resource folder too.
This applies to resources in general (glassfish, jboss, tomcat,..) not just sun-resources.xml

Comment 6 Nitya Doraisamy 2009-10-21 18:25:05 UTC
This is a blocker for issue 173216. DoS should detect when user changes the content of the 'Server Resources' folder, in
GF's case the sun-resources.xml file. Currently the changes are not detected. 
Comment 7 Petr Jiricka 2009-10-22 09:39:51 UTC
BTW, what is the behavior of this feature for Maven projects? Could this also affect Maven?
Comment 8 Milos Kleint 2009-10-22 09:51:37 UTC
in maven projects when DoS is enabled, 
items in src/main/webapp are automaticaly copied to the webapp root upon save
generic resources (src/main/resources and elsewhere) are copied to <webroot>/WEB-INF/classes upon save.
and of course classes are copied.

Not sure where this sun-resources.xml file resides, if outside of the described areas, it will be ignored.

Comment 9 Petr Hejl 2009-10-23 13:20:04 UTC
Fixed in web-main 862e74390b77.