Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 74329 - API for listening on metadata changes
API for listening on metadata changes
Product: db
Classification: Unclassified
Component: Code
All All
: P2 (vote)
: 5.x
Assigned To: Andrei Badea
Depends on:
  Show dependency treegraph
Reported: 2006-04-03 17:16 UTC by Andrei Badea
Modified: 2006-04-09 19:22 UTC (History)
2 users (show)

See Also:

The db/dbapi module (45.89 KB, text/plain)
2006-04-03 17:16 UTC, Andrei Badea
The changes in the db module (8.36 KB, text/plain)
2006-04-03 17:17 UTC, Andrei Badea
Javadoc of db/dbapi (41.43 KB, application/x-compressed)
2006-04-03 17:18 UTC, Andrei Badea
Commit log (6.51 KB, text/plain)
2006-04-09 19:21 UTC, Andrei Badea

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2006-04-03 17:16:10 UTC
I would like to ask for a review of the following inter-cluster friend API.

The code completion for Java Persistence API annotations (in the
j2ee/persistence module) displays database metadata (information about the
database structure, such as the list of tables or columns). The code completion
needs to refresh its metadata cache when the metadata change due to user
activity in the Database Explorer (e.g. adding a table or a column). 

The Database Explorer (db module in the ide cluster) needs to provide an API
allowing the code completion to listen on these changes. This API should not be
public, as it will be replaced by the database metadata model in a future
version. Since the db module already provides a public API, the API cannot be
friend either. 

In order to avoid an inter-cluster implementation dependency between
j2ee/persistence and db, I propose the introduction of a db/dbapi module in the
ide cluster, providing the friend API for j2ee/persistence and having an
implementation dependency on the db module.

The db module provides a DbMetaDataListener interface whose methods it invokes
when the metadata change. A single implementation of this interface is
registered by the db/dbapi module in the default lookup. The db/dbapi module
provides a MetaDataListener interface, implementations of which the
j2ee/persistence module (or other clients if needed) register in a folder in the
a folder in the system file system. The implementation of the DbMetaDataListener
in db/dbapi passes the metadata change events received from  db to the
registered MetaDataListener-s.

The target milestone is NetBeans 5.5. The change is compatible, so I request a
fast-track review.
Comment 1 Andrei Badea 2006-04-03 17:16:43 UTC
Created attachment 29560 [details]
The db/dbapi module
Comment 2 Andrei Badea 2006-04-03 17:17:12 UTC
Created attachment 29561 [details]
The changes in the db module
Comment 3 Andrei Badea 2006-04-03 17:18:42 UTC
Created attachment 29562 [details]
Javadoc of db/dbapi
Comment 4 Andrei Badea 2006-04-07 10:02:11 UTC
Since based on the comments (or the lack thereof) it looks this issue is
non-controversial, I would like to commit it over the weekend. Thank you for the
Comment 5 Jaroslav Tulach 2006-04-07 10:12:40 UTC
Looks like the cleanest possible solution. Go on.
Comment 6 Andrei Badea 2006-04-09 19:21:43 UTC
Created attachment 29717 [details]
Commit log
Comment 7 Andrei Badea 2006-04-09 19:22:54 UTC

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