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 190387 - j2ee.server.home works only for server with single root
Summary: j2ee.server.home works only for server with single root
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 09:23 UTC by Petr Hejl
Modified: 2010-11-03 03:56 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 2010-09-16 09:23:15 UTC
Recently the improvement was implemented in order to make the server configuration for headless builds simpler (iirc). In this solution the j2ee.server.home is configured to make paths in j2ee.platform.classpath variable based. It does not work for servers with multiple roots, such as for example binaries and domain.
Comment 1 Petr Hejl 2010-09-16 09:24:11 UTC
David's comment from issue 189141:

I'm not sure what can be done with some paths not being relative - the solution
implemented was very simple (without an API contract): as most of the server
jars are under server installation directory then let's store server
installation directory and use relative paths to access jars. For WL this is
not true as some of the jars are outside of server installation directory.
Perhaps an API contract might be necessary to give a chance to WL to make paths
relative?
Comment 2 Petr Hejl 2010-09-16 09:34:46 UTC
(In reply to comment #1)
> David's comment from issue 189141:
> 
> I'm not sure what can be done with some paths not being relative - the solution
> implemented was very simple (without an API contract): as most of the server
> jars are under server installation directory then let's store server
> installation directory and use relative paths to access jars.
Ok for me. I'm not sure whether we should spend some more time implementing this enhancement.

> For WL this is
> not true as some of the jars are outside of server installation directory.
> Perhaps an API contract might be necessary to give a chance to WL to make paths
> relative?

Well I think API would not help as there is no guarantee that the paths have common ancestor. In other words server dir, domain dir and (perhaps even) middleware dir can be located on completely different paths.

Simple and clear solution would be to map platform roots to multiple j2ee.server.home vars such as j2ee.server.home.1, j2ee.server.home.2 etc. Naming of such props (replacing .2 with .domain) would be better but could significantly increase the complexity and cost of the solution imo with ugly corner cases and only a small benefit for users.
Comment 3 Petr Jiricka 2010-09-16 12:21:17 UTC
I am not sure how often you have server dir outside of the middleware dir. Would it be good enough to just use middleware dir and relativize classpath against that? This would solve this for the common cases, no?
Comment 4 David Konecny 2010-09-28 22:51:22 UTC
PetrH, I agree with you.
Comment 5 Petr Hejl 2010-10-27 18:33:40 UTC
Considering server sharability it is a defect.
Comment 6 Petr Hejl 2010-11-01 14:07:35 UTC
Separate properties for home, domain and middleware: web-main 8f528cc092cb.
Comment 7 Quality Engineering 2010-11-02 03:59:28 UTC
Integrated into 'main-golden', will be available in build *201011020000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8f528cc092cb
User: Petr Hejl <phejl@netbeans.org>
Log: #190387 j2ee.server.home works only for server with single root
Comment 8 Petr Hejl 2010-11-02 12:29:33 UTC
Shared server libraries disabled - web-main 3ed8f955f8b9 and 7be1522822a8.
Comment 9 Quality Engineering 2010-11-03 03:56:21 UTC
Integrated into 'main-golden', will be available in build *201011030000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3ed8f955f8b9
User: Petr Hejl <phejl@netbeans.org>
Log: #190387 j2ee.server.home works only for server with single root - disabling sharable server