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 109398 - It is not possible to unregister a Java DB
Summary: It is not possible to unregister a Java DB
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-07-11 16:38 UTC by Sherold Dev
Modified: 2007-07-26 15:50 UTC (History)
1 user (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 Sherold Dev 2007-07-11 16:38:30 UTC
I've registered a Java DB and because it was not working correctly I decided to unregister it. Since there is no
unregister action I tried to clear the db installation and location input fields in the Java DB Settings dialog, but the
finish button was disabled.

I rm'ed the user dir to work around the issue.
Comment 1 Andrei Badea 2007-07-11 16:53:20 UTC
Pavel promised to do this.
Comment 2 Pavel Buzek 2007-07-16 17:24:43 UTC
We talked about this, Andrei's point was that it would be logical to allow unregister the DB if it is allowed to
register it, but he could not come up with a real use case. I am not sure I promised to implement it :-)

1. The proposed UI is unintuitive, I think the user will hardly find that entering empty values will unregister the DB.
2. What is the exact semantics of "unregister"? I still do not understand what you gain by entering empty values?
Deleting the location of Java DB runtime? If you remove all connections (which you can) and drivers (which you also can)
then the registered Java DB does not appear anywhere in UI, AFAICT. Removing drivers and connections is very easy to find.
Comment 3 Andrei Badea 2007-07-16 18:01:15 UTC
In our private conversation you wrote:

> I can make it pass with an empty location of course, but it does not seem
> intuitive at all and I do not see why anybody would need to do that. 

I replied to that:

> as a principle, if you allow to register stuff you should also allow to
> unregister it. Imagine it wasn't possible to remove registered Java EE
> servers, would that make sense?
> 
> I agree it's not exactly intuitive though. But at least it would do what it
> used to do before. 

You didn't reply, so I took your silence after saying "I can make it pass with an empty location" above as an agreement.
Sorry for that.

Now to your concerns:

1. You already have an user (Stepan) who tried the proposed UI:

> I tried to clear the db installation and location input fields in the
> Java DB Settings dialog

2. Java DB is started when you deploy to GlassFish. If you enter an invalid location, as Stepan did, you can never
remove it later. Also as an user, I welcome flexibility in tools: when entering a location on my hard disk in a program,
there should also be a way to remove it from that program.

I don't claim that clearing the fields in the Settings dialog is the best way. Feel free to come with a better one.
Stepan said he had looked for an unregister action first, maybe that's what needs to be done.
Comment 4 David Vancouvering 2007-07-18 01:01:44 UTC
I agree clearing the fields seems unnatural and unintuitive.  I would like to see a Deregister Java DB action.

How do you deregister a server like Glassfish that you've registered?

Comment 5 Andrei Badea 2007-07-18 09:24:01 UTC
The more I think about clearing the field the more it seems to me entirely natural and intuitive. I let NB know about my
Java DB installation by entering the path to it in a field in a dialog. When I don't want NetBeans to know about it
anymore, I clear that field.

Just to make sure I understand David's proposal. Are you suggesting to add a new "Unregister" item to the Java DB
Database menu? So the menu would show:

Start Server
Stop Server
Create Database
Settings
Unregister

Does that really look good to you?
Comment 6 David Vancouvering 2007-07-19 18:33:28 UTC
Andrei says:
> Just to make sure I understand David's proposal. Are you suggesting to add a new "Unregister" item to the Java DB
> Database menu? So the menu would show:

> Start Server
> Stop Server
> Create Database
> Settings
> Unregister

Hm, actually, it does.  I would rather it say "Unregister Java DB location", but it looks good to me.  And clearing a
field to deregister a Java DB location seems just wrong to me.  

One thing that concerns me is side effects.  What is the impact on existing connections to Java DB when you unregister a
location?  It seems to me those connections need to be closed and removed.  That is something that would be unexpected,
in my mind, as a side effect of clearing a field.  

I don't know what we can do when one engineer thinks X is intuitive and right and not Y, while another engineer thinks
that Y is intuitive and right and not X.  I don't think I'm a usability expert, and am not comfortable making a call one
way or another.

Why don't we pass this by the usability alias.
Comment 7 Andrei Badea 2007-07-20 19:42:20 UTC
> I would rather it say "Unregister Java DB location".

The other items in the submenu don't contain the "Java DB" string, so it should be just "Unregister location". I still
don't think this is the right thing to do.

> It seems to me those connections need to be closed and removed.

The user can just start a Java DB server outside NetBeans, and uses the connections defined in the DB Explorer to
connect to this server. In other words, the user can have Java DB connections in the DB Explorer, but doesn't have to
register a Java DB instance in NetBeans. We should not remove those connections.
Comment 8 Pavel Buzek 2007-07-20 19:56:24 UTC
Gyus, if you feel like this is an important issue for the users (or for yourself) feel free to continue and beat this to
death. Personally, I do not see this critical for 6.0 and do not plan to work on it.
Comment 9 Andrei Badea 2007-07-26 15:50:05 UTC
> Why don't we pass this by the usability alias.

Because it will just result into a longer discussion. IMHO Pavel, as the NB architect, is the one to decide, but he
doesn't seem to have a strong opinion. My proposal is both easier to implement and keeps the UI simpler, so fixing that
way. Reopen or file an usability issue if you strongly disagree.

Checking in src/org/netbeans/modules/derby/ui/DerbySystemHomePanel.java;
/cvs/db/derby/src/org/netbeans/modules/derby/ui/DerbySystemHomePanel.java,v  <--  DerbySystemHomePanel.java
new revision: 1.15; previous revision: 1.14
done