Bug 103872 - Introduce a method to run an action when a metadata model becomes ready
Introduce a method to run an action when a metadata model becomes ready
Status: RESOLVED FIXED
Product: javaee
Classification: Unclassified
Component: Code
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Andrei Badea
issues@javaee
: API, API_REVIEW_FAST
Depends on:
Blocks: 95534
  Show dependency treegraph
 
Reported: 2007-05-13 20:28 UTC by Andrei Badea
Modified: 2007-05-22 21:18 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Proposed change (22.03 KB, text/plain)
2007-05-13 20:29 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2007-05-13 20:28:12 UTC
Because most known implementations of metadata models delegate to the Java
infrastructure, a method such as must be introduced to allow a client to run an
action on the model when the Java classpath scan has finished. The method is the
equivalent of the JavaSource.runWhenScanFinished() introduced in issue 101787.
Comment 1 Andrei Badea 2007-05-13 20:29:56 UTC
Created attachment 42348 [details]
Proposed change
Comment 2 Andrei Badea 2007-05-13 20:52:49 UTC
Please review. The change is incompatible, but the API hasn't been released yet,
all known implementors are in the NetBeans Java EE team and it is extremely
unlikely the change would break anyone.

I would especially like to get a review of the exception handling of the
runReadActionWhenRead() method. Should it immediately rethrow exceptions in the
action when executing the action synchronously (as suggested in the diff) or
should it throw the exception as an ExecutionException when get() is called on
the Future result? The latter is perhaps nicer for clients (doesn't need to
check for a runtime exception twice -- for both runReadActionWhenRead() and
Future.get()). But then if the client doesn't call Future.get() the exception
will be just swallowed. But then again the exception can be swallowed anyway
(when the action is run asynchronously and the client doesn't call
Future.get()). And I guess the former is needed because unchecked exceptions
need to pass through when the action is called synchronously.
Comment 3 Jaroslav Tulach 2007-05-15 06:07:43 UTC
incompatible changes before release are ok. please make sure your functional 
contract is tested and continuous build succeeds.
Comment 4 Andrei Badea 2007-05-20 23:49:42 UTC
If there are no more comments I will commit on Tuesday.
Comment 5 Andrei Badea 2007-05-22 21:18:07 UTC
Integrated.

Checking in j2ee/metadata/apichanges.xml;
/cvs/j2ee/metadata/apichanges.xml,v  <--  apichanges.xml
new revision: 1.2; previous revision: 1.1
done
Checking in j2ee/metadata/manifest.mf;
/cvs/j2ee/metadata/manifest.mf,v  <--  manifest.mf
new revision: 1.7; previous revision: 1.6
done
Checking in
j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModel.java;
/cvs/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModel.java,v
 <--  MetadataModel.java
new revision: 1.3; previous revision: 1.2
done
Checking in
j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelImplementation.java;
/cvs/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelImplementation.java,v
 <--  MetadataModelImplementation.java
new revision: 1.3; previous revision: 1.2
done
Checking in
j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModelCompatibilityTest.java;
/cvs/j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/MetadataModelCompatibilityTest.java,v
 <--  MetadataModelCompatibilityTest.java
new revision: 1.3; previous revision: 1.2
done
Checking in
j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/SimpleMetadataModelImpl.java;
/cvs/j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/api/SimpleMetadataModelImpl.java,v
 <--  SimpleMetadataModelImpl.java
new revision: 1.3; previous revision: 1.2
done
Checking in
j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelFactoryTest.java;
/cvs/j2ee/metadata/test/unit/src/org/netbeans/modules/j2ee/metadata/model/spi/MetadataModelFactoryTest.java,v
 <--  MetadataModelFactoryTest.java
new revision: 1.3; previous revision: 1.2
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo