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.
The sun app server plugin starts Java DB when started from NB. This is taking resources that may not be needed if the application does not use database. OTOH, the DB is not started when deploying to tomcat. It should be possible to detect if a j2ee module uses the Java DB that is registered with NetBeans and start it then - similarly as we start the DB when the user wants to connect, e.g. in entity from DB wizard. I did not look into details, the solution may be partly in sun plugin an partly in j2eeserver and db.
Should this really be tracked as a defect. It seems more like an enhancement to me.
Same for me. This is optimization. I think this side effect is in any case better than if we did not start the DB. In this case, they are really hard to understand errors in the server lgo file. Net CAT filed a P2 for that, and this is why we start the DB now.
I filed this as a defect for 2 reasons: First, this is a performance issue. Unless you have tons of memory an additional 20 megs or so every time you start glassfish is noticable. Second, I was hoping that if we come with a better mechanism to start DB only when needed we could also make it work for tomcat or jboss. Because the same issue - which you say is a P2 defect - applies to these servers. I won't set it back to defect now, but please comment. Tx.
My comment is that we are way past the date where we can even discuss behaviour for current 5.5 product. Now, if we have time to 'find a way for a better mechanism to start DB only when needed' (I guess in J2EE projects), then implement it, then add it to the 5.5 feature list so that we can approve it, I am fine with this :-) Of course, this needs to be locked at for 6.0, don't get me wrong there.
for me it's defect too... I realy don't need to start derby with glassfish for one reason... I have already started external derby database on 1527 port...
If we can't easily determine whether starting Derby is "needed", could we at least add a checkbox that will allow the user to disable the automatic start? Keep the user in control...
yes...Could do that, when we can change the ui. Can we now?
Yes, if we follow the Late UI changes process (notify the Tutorial team).
Most of the work for this is at the j2eeserver API level... The project needs to be able tell something (likely the DB modules or a serverplugin), "hey, start this DB since we have an app that is about to use it". Pushing to the j2eeserver component to get the ball rolling again.
This is in fact a performance bug, not an enhancement request.
According to desc3 and desc7 I would go with solution described in desc7 rather than designing some complicated api for db start (not even sure if it should go through j2eeserver).
This seems to have come back to the plugin with the suggested fix (I think) of adding a checkbox that will allow the user to disable the automatic start. That should be simple and can be done for this release
Fixed. Added checkbox to Options tab of server propeties to enable/disable automatic start of Java DB with server http://hg.netbeans.org/main/rev/f1bb27d9898e