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 27386 - Compatible implementation of TopManager.currentClassLoader()
Summary: Compatible implementation of TopManager.currentClassLoader()
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@java
URL: http://java.netbeans.org/doc/projects...
Keywords:
Depends on:
Blocks: 27112
  Show dependency tree
 
Reported: 2002-09-17 14:43 UTC by Jaroslav Tulach
Modified: 2007-09-26 09:14 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-09-17 14:43:20 UTC
As part of the new project implementation it will
be hard to keep the original meaning of
TM.currentCL() from openide or core, but it should
not be as hard to provide that meaning from java
module.

That method is used to provide access to
ClassLoader that can load all JavaClasses being
developed and deployed (modules) in current state
of the ide. 

The Java module should be able to monitor all
opened projects and their classpath and be able to
compose a classloader that will union all classes
of these modules. Then there is just one problem -
how openide or core will communicate with java
module to get this classloader and show it to the
user, but that is secondary problem.
Comment 1 Jesse Glick 2002-09-20 03:31:43 UTC
Is this not dupe of issue #27112? Or perhaps a blocker for it?
Comment 2 Svata Dedic 2002-10-02 08:02:12 UTC
Would adding that union as a (hidden) filesystem to the Repository help ?
Comment 3 Jaroslav Tulach 2002-10-02 10:58:40 UTC
Union FS would definitively solve this issue. The trouble is that I
would like to make the UnionFS voluntary extension - it would be there
just for some users. But I would like the currentClassLoader to work
"right" all the time.

I suggest to change TM.currentClassLoader in openide to use lookup to
find all ClassLoaders, and test that one is marked as the "right"
(java.util.Map or other trick). If no right is found it would delegate
to the first one => currentClassLoader == systemClassLoader.

Comment 4 Svata Dedic 2002-10-02 11:20:28 UTC
You know - (singleton)currentClassLoader will work just as bad (or as
well) as the UnionFS: it still has to merge all execution paths from
opened projects since it does not know what its client really wants.
Comment 5 Jaroslav Tulach 2002-10-02 12:22:19 UTC
You are right, but somehow I feel that it can do less harm. In
FileSystem people can do different kind of things, for example
modifications. When using currentClassLoader, the only reasonable
thing is to search for a class, potentially resource. I believe that
this is more easy to mess up than the union FS.
Comment 6 Jaroslav Tulach 2002-10-02 12:23:36 UTC
Sorry for last sentence, I have meant: The currentCL is less dangerous
than union fs.
Comment 7 Svata Dedic 2002-10-07 16:37:51 UTC
See the unionfs/filesystem compat issues document linked in the URL field.
Comment 8 Jesse Glick 2004-01-27 23:15:22 UTC
Probably impractical.