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 62758 - Can't use other pointbase db
Summary: Can't use other pointbase db
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on: 65426
Blocks:
  Show dependency tree
 
Reported: 2005-08-22 11:44 UTC by Michal Mocnak
Modified: 2008-04-25 17:53 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 Michal Mocnak 2005-08-22 11:44:46 UTC
Found in nb42dev build 200508161800

1. start nb
2. add sun app server
3. add web logic 9
4. add new db connection for web logic pointbase
=> everytime you want to use this connection the sun app server pointbase tries
to connect and due to i am not able to use any other pointbase without the error
messages from sjsas pointbase.
Comment 1 Vince Kraemer 2005-09-22 17:46:30 UTC
The Tools->Pointbase->Start Local... item starts the server associated with the
SJSAS instance.  (It is registered by the sjsas plugin)

It seems like the Databases->connection instance node is using some hook that
knows how to start an instance.  It may be using stuff that it should not...

I will dig in a bit more...

Comment 2 Vince Kraemer 2005-09-23 01:56:35 UTC
The connection's Connect... ends up calling RegisterPointbase.start()

This is due to the fact that RegisterPointbase implements DatabaseRuntime.

This is a great idea, but doesn't scale as this issue shows.
Comment 3 Andrei Badea 2005-09-23 09:15:45 UTC
Some background first, just to be sure: each server which bundles a database can
implement the DatabaseRuntime interface, which allows the server to start the
database when a connection is made to it. Upon connecting, the following methods
are called on DatabaseRuntime:

- isStarted() - if it returns true, this DR is ignored
- canStart() - if it returns false, this DR is ignored
- acceptsConnectionUrl() - if it returns false, this DR is ignored

RegisterPointbase returns true from acceptsConnectionUrl() when the url
parameter starts with "jdbc:pointbase", which is obviously incorrect. It should
compare the url parameter to its DATABASE_URL and DATABASE_URL2 fields.

Please note that the acceptsConnectionUrl() method will be renamed to the more
correct acceptsDatabaseURL soon.
Comment 4 Andrei Badea 2005-09-23 09:50:35 UTC
Just realized that comparing to the DATABASE_URL fields is not correct either.
If you create another database, the server won't be started for it. So probably
you should only test the host and port, i.e, jdbc:pointbase://localhost:9092.
Comment 5 Vince Kraemer 2005-09-23 19:35:30 UTC
What host/port does the weblogic install use for their pointbase install?
Comment 6 Michal Mocnak 2005-09-25 11:10:48 UTC
wl pointbase uses same options like sjsas's pointbase localhost:9092
Comment 7 Andrei Badea 2005-09-26 15:44:07 UTC
In an e-mail conversation with Vince he suggests adding a method for retrieving
the JDBCDriver instance to DatabaseConnection and passing a DatabaseConnection
instance to DatabaseRuntime.acceptsDatabaseURL(). Then it would be possible to
decide whether to start the server based on the JDBCDriver URLs. While the
latter is doable, the former is not, since DatabaseConnection doesn't maintain a
JDBCDriver instance (it only has properties for the driver class and name).

Since WebLogic uses the same host and port as appserver, we could to check the
database name in the implementation of DR.acceptsDatabaseURL(). 

To reporter: could you get a list of the databases in the WebLogic's Pointbase?
Comment 8 Andrei Badea 2005-10-13 17:46:02 UTC
Please note that the correct fix of this issue depends on issue 65426, which is
an incompatible API change. Because of this and because the required API change
is not the nicest one I want to drive issue 65426 through an API review. If the
API review is denied because we're after feature freeze, this issue will be
either not be fixed in 5.0, or it will have to be fixed in another way (for
example the one I suggested in my comment from Sep 26).
Comment 9 Vince Kraemer 2005-10-18 19:58:09 UTC
The 26 Sep 2005 suggestion isn't very bullet-proof.  I have another work-around
that may be better, but even that isn't bullet-proof.  Basically, most of the
"fixes" that I can figure out will be trading a P3 bug for a P3 bug...
Comment 11 Vince Kraemer 2005-11-07 19:14:02 UTC
NOTE: This fix ONLY addresses new instance registrations.  Existing registered
instances may still exhibit this issue.
Comment 12 Andrei Badea 2005-11-08 13:00:55 UTC
Vince, if you want, I could add some code to the Database Explorer to set
database.home to Poinbase connections. True, it would be a bit of a hack. But
the question is what to set it to. Should I try to do
System.getProperty("com.sun.aas.installRoot") and if returns a non-null value,
set database.home to something based on it?
Comment 13 _ ludo 2005-11-08 13:01:15 UTC
rollbacked
Comment 14 Jaroslav Pospisil 2006-03-13 13:49:24 UTC
TM 5.0->TBD
Comment 15 _ ludo 2006-04-26 00:15:32 UTC
p4: pointbase is not the key feature going forward... Only old 8.1 users might
see this.
Comment 16 Petr Jiricka 2006-06-28 10:21:01 UTC
This was marked as fix-in-50, I am changing to fix-in-55, but is this still
important? Pointbase is now deprecated.
Comment 17 Vince Kraemer 2006-06-28 16:40:41 UTC
ludo lowered the priority to p4. I would infer that he does not think this is a
critical issue.
Comment 18 Petr Jiricka 2006-06-28 16:58:21 UTC
Ok, removing fix-in-55; QE, please speak up if you disagree.
Comment 19 Vince Kraemer 2007-12-08 03:49:10 UTC
I need to play with this again... probably in the 7.0 time frame.  Pushing back up to p3.. to get it back 'on the radar'.
Comment 20 Vince Kraemer 2008-01-05 01:52:16 UTC
not enough need to justify possible stop-ship
Comment 21 Vince Kraemer 2008-04-25 17:53:28 UTC
No supported servers ship with pointbase, so this is fixed by changes in the servers and the support matrix.