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 37798 - Plugins must have more control over the location of server specific data files
Summary: Plugins must have more control over the location of server specific data files
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-05 14:36 UTC by Petr Jiricka
Modified: 2003-12-16 19:13 UTC (History)
0 users

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 Jiricka 2003-12-05 14:36:17 UTC
Server plugins must be able to specify the name
and location of the file where the server specific
data should be stored.

For example, the S1AS plugin wishes to store its
config file as WEB-INF/sun-web.xml (inside the WM
dir).

A related issue is that currently the
ServerConfigurations folder is created in the web
module, which is inappropriate and wrong.
Comment 1 _ gfink 2003-12-08 18:35:07 UTC
server plugins shouldn't need to specify location - just name.
Should be a devmodules spi to specify the location.  The implementing
module should be able to figure out the right location - ie for
web modules developed in the WEB-INF structure it should be WEB-INF/xxx,
for web modules developed in the blueprints structure it should be
src/xml/xxx or something similar.  Point is, plugins should specify
name but not location.  And there already is an spi for specifying names.
Comment 2 Pavel Buzek 2003-12-08 19:15:18 UTC
Ok, I agree with most of this. Changing the default to WEB-INF is
good. What is the method for specifying name of file? I have not found
that in documentation. J2eeserver seems to be creating the file like this:

baseName = "J2eeProject" + "_" +
serverString.getServer().getShortName();   // !!FIXME!!

it may be jut a matter of fixing this.

This is still not ideal for tomcat where the config file does not
belong into WEB-INF folder, it is actually supposed to be outside of
web module. This is not a showstopper (an additional file in WEB-INF
will just be ignored by the server) and until we have new projects
there is not good place for it but it would be nicer to have the
location as a parameter. That would be a P4 if the other issues are
reolved.
Comment 3 _ gfink 2003-12-08 19:22:18 UTC
Well, this is related to splitting up the deployment plan, whatever
that issuezilla is.

In FileDeploymentLayout, there is a method, getDeploymentPlanFilenames()

thats used to get the filenames.

Then, DeploymentPlanSplitter enables write of these files.

Probably need an associated read method in DeploymentPlanSplitter.

Then the constructors in ConfigurationStorage need to be adjusted
so that the DeploymentConfiguration can be created from the
DeploymentPlanSplitter read input.
Comment 4 Pavel Buzek 2003-12-08 20:56:04 UTC
From the documentation and from the source code it looks like
getDeploymentPlanFilenames and the DeploymentPlanSplitter is for the
files on server, not in module folder in IDE.

BTW:I think that this SPI is not really necessary, see:
http://www.netbeans.org/issues/show_bug.cgi?id=37865

So I still do not know how does the plugin specify the name of
configuration file under WEB-INF folder in web module? Please let me
know if I got it wrong.
Comment 5 Pavel Buzek 2003-12-16 19:13:52 UTC
config files are stored in location given by dev module (WEB-INF for
web module) and the name is given by plugin.